LaserCanvas 5 > Data Files >

Renderer Statements


Renderer statements are typically placed at the end of a file. A Renderer is any interface component that occupies a separate window such as the Canvas editor or a System Graph.

LaserCanvas creates Renderer windows in the order in which the statements appear in the file. Thus, the last-created window is active when the file finishes loading.

If no renderers are defined within a file, LaserCanvas automatically creates a Canvas window.

Information about renderer statements:

Format and Type

Each renderer statement starts with the Renderer keyword, followed by the renderer type. The remaining lines defining the renderer are bracketed by { ... } braces. For example,

   Renderer 2d {
      System = Sys_00966444
      Window = 75, 70, 690, 200
   }

The renderer type keyword must be one of the following: 1d, 2d, 3d, Inventory, Solver, SystemGraph, VertexGraph. See the following sections for information about each renderer type. The renderer statement must include at least the System definition.

Unlike optic properties, renderer properties must be constant expressions or equations that evaluate to constants.

^ Top

Common Properties

The following properties apply to all renderers.


PropertyDescription

SystemDefines the system that the renderer applies to. The System line must specify the tag of a system defined within the file. If the specified system tag cannot be found, the renderer statement is ignored.
WindowDefines the position of the renderer window, in pixels. The first two numbers specify the horizontal and vertical offset from the upper left-hand corner of the LaserCanvas window. The last two numbers are the width and height of the renderer window, respectively.

^ Top

Renderer 1d Properties

The Renderer 1d statement creates a window of a cavity Mode plot.


PropertyDescription

FlagsThe sum of any or none of the following:
1: Display optic icons on the graph
2: Highlight beam waists with a vertical line.
XMaxMaximum X-axis (Cavity Position) value.
XMinMinimum X-axis (Cavity Position) value.
YMaxMaximum Y-Axis (Mode Size) value.
YMinMinimum Y-axis (Mode Size) value.

^ Top

Renderer 2d Properties

The Renderer 2d statement creates a Canvas editor window. If the a Renderer 2d statement is not supplied for each system defined in the file, LaserCanvas creates a Canvas window with default values.


PropertyDescription

FlagsThe sum of any or none of the following:
1: Show the grid and snap to it when dragging optics.
2: Display distances between optics.
4: Display annotations for optics.
8: Highlight beam waists with a vertical line.
GridSizeThe size of the grid, in mm. The grid is only used if flag 1 is specified.
ModeScaleThe display scale factor for the laser mode.
OpticScaleThe display size of optics, in mm.
XMiddleThe cavity X position that is to be centred within the Canvas window, in mm.
YMiddleThe cavity Y position that is to be centred within the Canvas window, in mm.
ZoomThe display zoom factor. A zoom factor of 1 corresponds to 100% zoom.

^ Top

Renderer 3d Properties

The Renderer 3d statement creates a wireframe window.


PropertyDescription

CameraAngleTthe camera viewing angle, in degrees.
CameraXThe camera X position, in mm.
CameraYThe camera Y (elevation) position, in mm.
CameraZThe camera Z position, in mm.
ModeScaleThe display scale factor for the laser mode.
OpticScaleThe display size of optics, in mm.
OriginXThe cavity Y position of the view centred in the window.
OriginZThe cavity X position of the view centred in the window.
FlagsThis property is currently not used.

^ Top

Renderer Inventory Properties

The Renderer Inventory statement creates an Inventory window.


PropertyDescription

Width0
Width1
Width2
Width3
Width4
Width5
Width6
Specifies the column width for each column. The width is nominally in pixels, but the displayed column widths are adjusted so that the entire Inventory fits within the window.
XScrollThis property is currently not used.
YScrollThe vertical offset, in pixels, for the Inventory rows.

^ Top

Renderer Solver Properties

The Renderer Solver statement creates a Solver window.


PropertyDescription

EquationThe function equation to be optimized. Unlike other equations, the Equation is enclosed in double quotation marks (") and can span multiple lines.
FunctionToleranceThe accuracy to which the function is to be optimized.
MaxIterationsThe maximum number of iterations.
SolveModeSolve strategy. Can be one of the following:
0: Solve for function minimum.
1: Solve for function maximum.

^ Top

Renderer SystemGraph Properties

The Renderer SystemGraph statement creates a new system graph window.


PropertyDescription

FunctionThe system property to be plotted, see table below.
VariableThe variable against which the Function is to be plotted. Must be one of the LaserCanvas variable names.
XMaxMaximum X-Axis (variable) value.
XMinMinimum X-Axis (variable) value.
YMaxMaximum Y-Axis (function) value.
YMinMinimum Y-Axis (function) value.

The Function property must specify one of the following system properties to plot.


System PropertyDescription

PhysicalLengthThe physical cavity length of the system, in mm.
OpticalLengthThe optical cavity length of the system, in mm.
ModeSpacingThe frequency spacing of adjacent cavity modes, in MHz.
StabilityThe system stability parameter g.

^ Top

Renderer VertexGraph Properties

The Renderer VertexGraph statement creates a new optic graph window. The VertexGraph statement must specify a valid Vertex property.


PropertyDescription

FunctionThe optic property to be plotted, see table below.
VariableThe variable against which the Function is to be plotted. Must be one of the LaserCanvas variable names.
VertexA tag specifying the optic whose property is to be graphed.
XMaxMaximum X-Axis (variable) value.
XMinMinimum X-Axis (variable) value.
YMaxMaximum Y-Axis (function) value.
YMinMinimum Y-Axis (function) value.

The Function property must specify one of the following optic properties to plot.


Optic PropertyDescription

AstigmatismThe distance between waists in the sagittal and tangential planes, in mm.
CurvatureThe wave front radius of curvature R, in mm, at the optic.
DistanceThe distance z0 to the waist, in mm.
ModeThe mode size w, in um, at the optic.
WaistThe waist size w0, in um.

^ Top