OpenMaXwell Reference Manual

Home  General  Menues  Dialogs  Movie Directives  Formula Interpreter  File Structures

Available directives

ADApt ADD BLOw CLEar CONvert COPy DELete DRAw END EXChange EXIt GENerate GET GOTo IF> IF< IF= INCrease ITEterate LABel LOOp MMP MOVe MULtiply PROcess REAd REFlect REName ROTate RUN SET SORt SUBtract WRIte

DRAw one of the following objects

BOUndary    CIRcle    COLor    CONnection    DERived-field    DOMain    EXPansion    FIEld    FUNction    LINe    OBJect    OGL(openGL)    PFD    TEXt    VARiable    WINdow

 

BOUndary

Arguments: (n scale)

Meaning: Draw the boundary number n. If the first argument is missing, n=0 is set. Special cases: n=0 – do for all boundaries, n<0 – do for boundary numbers 1 up to -n. If scale is specified, the error scaling factor for drawing the MMP errors along the boundaries is set equal to scale.

 

CIRcle

Arguments: x y r (n)

Meaning: Draw a circle with center (x,y) and radius r, color number n. If the last argument is missing, n=1 (black) is set.

 

COLor

Arguments: (n)

Meaning: Draw all 2D boundaries and expansions with color number n. If the first argument is missing, n=0 is set. Special cases: n=0 – do for all colors, n<0 – do for color numbers 1 up to -n.

 

CONnection

Arguments: (n)

Meaning: Draw all 2D boundaries and expansions with connection flagr n. If the first argument is missing, n=0 is set. Special cases: n=0 – do for all connections, n<0 – do for connection numbers 1 up to -n.

 

DERivedfield

No argument

Meaning: Draw the current derived field without recomputing it. This is especially important for movies generated within the OpenGL window.

 

DOMain

Argument: (n)

Meaning: Draw the boundaries and expansions of domain number n. If the argument is missing, n=0 is set. Special cases: n=0 – do for all domains, n<0 – do for domain numbers 1 up to -n.

 

EXPansion

Argument: (n)

Meaning: Draw the expansion number n. If the argument is missing, n=0 is set. Special cases: n=0 – do for all expansions, n<0 – do for expansion numbers 1 up to -n.

 

FIEld

Argument(s): (Type Component Average)

Meaning: Compute and draw the derived field.

Type denotes the field type and can be one of the following: E, H, S, D, B, J, A, V, We, Wm, Wt, Pe, Pm, Pt (according to the notation in the Field dialog) and Current, Gradient, Line. Current means that the type that is currently defined in the Field dialog is used. Gradient means that the gradient of the current field type is evaluated numerically (finite difference approximation) and displayed. This only makes sense when the current field is a scalar field. It may be used for a rough estimate of the optical force.

Component denotes the field components of vector fields and can be one of the following: X, Y, Z, XY, XZ, YZ, XYZ. Average denotes the average field if its first character is equal to A or a or B or b. When the first character is P or p or B or b, the phase is drawn. Otherwise, the time-dependent field is drawn. When an argument is missing, the current settings are used.

Special case:

Type=Line: Draw field line or field tube. After the Type argument you may specify the following arguments: x y z r d nx ny col. i.e., the Cartesian coordinates of the start point, the radius of the tube, its step size along the line or tube, numbers of grid lines around and along the tube, and the color number. A field line is a tube with r =0 and ny=1.

 

FUNction

Arguments: x-argument y-argument (color x-scale y-scale ix1 ix2)

Meaning: Draw the function y(x) in the current graphic window using color number color and the scaling factors x-scale, y-scale. Use the row numbers ix1 up to ix2 of the function array. When color, x-scale, y-scale, ix1, ix2 are missing, these parameters are set equal to 1 except ix2 that is set equal to the number of rows of the function array, i.e., color is set to black, no scaling is applied, and the all values stored in the function array are used for drawing. Note that OpenMaXwell stores function values and the argument values in an array. The two arguments denote the numbers of the columns of this array that store the corresponding values in x and y directions. OpenMaXwell does not differentiate between function values and argument values.

If x-scale is negative, the maximum absolute x value xMax is searched and all x values are multiplied with -x-scale/xMax before plotting. Similarly, if y-scale is negative, the maximum absolute y value yMax is searched and all y values are multiplied with -y-scale/yMax before plotting. For example, when you set y-scale=-1, all plotted y values will fit into the window range -1<=y<=+1 - provided that the Yscale in the Function dialog is set to 1. If the original y values are all positive, the plotted y values will fit into the window range 0<=y<=+Yscale. Note that such scaled plotting is only available by this directive.

 

LINe

Arguments: C ... col

Meaning: Draw a line using color number col. C may be one of the following characters:

When C is character belonging to a real number, it is considered as x1 and three additional values y1 x2 y2 are expected before the color number. Then, a line is drawn from the point (x1,y1) to the point (x2,y2).

 

OBJect

Argument: (n)

Meaning: Draw the 3D object number n. If the argument is missing, n=0 is set. Special cases: n=0 – do for all 3D objects, n<0 – do for 3D object numbers 1 up to -n.

 

OGL

Argument: (n list)

Meaning: Draw the 3D objects number n in the OpenGL graphics window. When n is missing, all 3D objects are drawn. Special cases: n=0 – do for all 3D objects, n<0 – do for 3D object numbers 1 up to -n.

The OpenGL window may contain: 1) the Axes of the global coordinate system, 2) the Surfaces of the 3D objects, 3) the Grid lines of the 3D objects, 4) the Iso lines of the 3D objects, 5) the field Vectors, 6) the markers of the Expansions, 7) field tubes, 8) PFD point sources, 9) PFD sensors. The argument list is a character string with up to 6 characters. It defines what is visible. When list is missing or when it is ASGIVETPX, all of the above is visible. To make the Axes invisible, replace the first character A by any other character. Similarly, you may replace any character in list by another character to make the corresponding graphic object invisible. For example, to visualize only the Axes, the Grid lines, and the expansions, set list=ANGNNENNN.

 

PFD

Arguments: WHAt n

Meaning: Draw a component of the PFD (Predefined Finite Difference) solver.

 

TEXt

Argument(s): ix iy color text

Meaning: Draw the text string text with the color number color on the current graphic window, starting at position (ix,iy) (in pixel coordinates - (0,0) is the upper right corner). The text string should be written between quotes.

 

VARiable

Arguments: ix iy color variable (…)

Meaning: Draw variable with the color number color on the current graphic window, starting at position (ix,iy) (in pixel coordinates - (0,0) is the upper right corner). (…) denotes additional arguments that depend on the variable. variable  (…) can be one of the following:

 

WINdow

Argument(s): (n TYPe)

Meaning: Draw the standard graphic window number n. If n is omitted: Draw the current graphic window. Special cases: n=0 – do for all windows, n<0 – do for windows numbers 1 up to number -n.. TYPe specifies the graphic content of the window. If TYPe is FUNction, it is assumed that a function will be drawn in the window. Otherwise, it is assumed that the window will be used for drawing the field, boundaries, or expansions. TYPe influences the labeling of the window axes.

Responsible for this web page:  Ch. Hafner, Computational Optics Group, IEF, ETH, 8092 Zurich, Switzerland

Last update 17.03.2016