LINZIK interprets the same name internal language. Files of optical schemes (*. lnz) and forms for analysis (*.an) save by program in this language. The language has operators for modifying of surfaces and tables. The operators duplicate virtually all menus and input fields.
The language potential enough to write own user optimizers and other complex scenarios.
Of course, LINZIK is just another optical CAD. It did not claim to revolutionary. The author is keen on optical telescope design and is trying to express his vision of the subject matter in a minimalist manner. The word "minimalism" here refers not to functionality, but to minimize the apparent "control room": only necessary for supervision during optimization. It is an attempt to make the user interface is not too ramified and easy extendable.
Version 1.1d - free and does not require registration until the number of variables in the Optimizer is not exceed 4. The program is distributed "as is". The author is not responsible for the possible wrong calculation and/or damage from using the program.
Thank you for your constructive criticism and suggestions.
Version 1.1d is tested on Windows XP SP1, SP2 and Vista on computers with 512 MB of RAM. Note: The screen rezolution must be at least 1024x768 pixels.
If you plan to use functions for quick calculation of the spot sizes using ray-tracing as parallel computing on many processors, it will require a video card compatible with NVIDIA CUDA and the related special driver.
The AMD Stream technology is supported also and can be used instead CUDA.
Version 1.1d is tested with NVIDIA GeForce 260 GTX and AMD Radeon HD 4870.
Attention! Letter "d" in the version name means that only double precision supported in CUDA and AMD Stream. So check this capability for your video card.
Expand the "File" menu. Select the "Open". Try to load the scheme from the list.
Scheme "Demo-Film-Runme!. Lnz" is not just a scheme,
it is a demo scenario.
It imitates the user behaviour and builds achromatic
doublet "from scratch".
Enter the half of scheme view field (degrees) in the "Half Field Angle":


If "Thickness" of "Object"(surface 1) is 0,
then it is deemed that the object is in infinity.
Otherwise, the object is located at a distance specified
in this field.

If the input is completed by Enter key the recalculation of the state occurs. (the same as when you press the button "Recalc").

For a glass in the "Glass" field should input a string, for example, BK7. If glass will found in catalog the glass information will present in the lower left-hand corner of window: refraction indexes, etc.

For add glass to the catalog,
click the "Edit Glass" button.
Input in the "nr, nC, nd, ne, nF, ng"
the refraction indexes.
Comments can be added in the "Info".
Then click "Save Glass." button.
The glass catalog is in the glasses.dat file.
Is the possible to import the glass catalogues from ZEMAX - menu item "File - Import *. agf (glasses)."
The "File" menu has items:
"New Analyse / Tool" -
the creation of new file analyse.an.
If you already have such file, it's content will display in editor.
"Edit Analyse / Tool Source"
- the choice of the *.an file and editing them.
"Edit Library.lib" - go to the library editing.
The functions described
in the library can be called
from the field "Cond", "Goal"
and "Calc".
The right upper third of the main window is busy by layout drawing.
Here you can specify an interval for displayed surfaces
(field "From" - "to") and
the scaling mode: "by Length"
or "by Dia"
Here you can make a comment - in the edit box
on the left under the drawing.

At the spot diagram on the right-secondary
part of the main window, you see points of ray intersections
with the surface "Image".
There wavelengths specified in the "Select Wavelengths".;
You can choose reference point
and scaling modes.
The characteristics of spot are visible as
root mean square (RMS)
deviation and maximum deviation of points
from a reference point.

It placed on the middle bottom of the main window. There wavelengths specified in the "Select Wavelengths". You can change the scale of diagram. And on top of diagram is "focuser" - slider for a smooth changing back focal length.

The program generates a list of files with type *.an. The names of these files (forms in language LINZIK) present in the menu. For example, selecting "OPD" we run opd.an form in the window and see the results (in this case, the analysis of difference of optical path lengths).

The form window has the "File-Edit Source" menu item. When it selected the text editor starts with the source text of form. If an error occurs when the form running the control will be passed to the text editor and the error place will be pointed by cursor.
If the form name begins with an underline ("_"), it will be shown in the second section of the menu, where the Tools are clustered rather than actually Analysis. This division made for showing that Tools can modify the table and options while Analysis should not modify them. Of course, this is conditional, and the actual content of Analysis and Tools can be anything, it is not checks by LINZIK. However, the presence of the underline "_" in the form name prohibits updating (restart) of this form when you click on Recalc - if this form are suspended on screen.
The appointments of forms from the installer package:
Analysis:
The optimizer dialog is in the lower right corner of the main window.

By click to the "Search" button the optimizer will try to find such values of variables in the table that the merit function [goal] (described in the the"Goal:" line) will have a minimal value. In this process the optimizer checks the value of function [cond], (described in the the"Cond:" line) which must be TRUE (1). If [cond] have value FALSE (0) the optimizer automatically adds 1000000 to result of [goal].
In other words, the violation of conditions [cond] increases the value of merit function [goal] and forces the optimizer to avoid this violation.
By click to the "Search" button (or when the operator SEARCH) executes) the optimizer performs the number of iterations specified in the "N Iter" (or due to the precision required in the "Tol") and stops, shows the value of [goal] and redraws the main window with the achieved optimization results.
Right on the button "Search" there is a menu to choose the method of optimization. Now the optimizer supports four methods: Simplex, Broyden's, Simulated Annealing and Global-random.
The choice of optimization method can be performed not only manually, but using the operator of METHOD from forms.
User (man who clicks on the "Search" or form that called the operator SEARCH) can take a decision to continue searching, analyzing the value [goal].
If the user (man) decide to abandon the current changes to SEARCH, he can click "Undo".

If you want to interrupt the iterations, you can click on "Cancel" or "Stop". Clicking on "Cancel" is equivalent to "Stop" and "Undo".
It should be noted that the contents of the "Cond "and" Goal "is not confined to expressions containing only embedded functions. It is possible to have own user's functions in file library.lib and call them from these fields. Thus, the [goal] and [cond] functions can be very complex.
The variable can be defined in the table as follows:
1) Manual: Right-click on the desired field,
and then choose the "Variable" from the PopUp menu.
2) From form: using the VARIABLE operator.
This field-variable highlights by yellow.

The field in the table can be "linked" by it's value to the other fields, see PICKUPPLUS, PICKUPMINUS. PICKUPPLUS highlights by reddish fields, and PICKUPMINUS - by bluer colors.
The field in the table can be make again as not changeable:
1) Manual: Right-click on the desired field,
and then choose the "Fixed" from the PopUp menu.
2) From form: using the FIXED operator.
The "Cond & Goal by default" loads fields "Goal" and "Cond" by default definitions.
The "Test" calculates performance of LINZIK plus computer system ans shows a window with the measured raytracing speed.
Beginning from Version 0.9 the syntax highlighting of optimizer'z fields
was added with the indication of wrong conditions in optimizer:
the compare operation ("<", ">", "<=", ">=", "<>") will be highlighted
when returns 0 (FALSE).
Example:
![]() |
1 - wrong condition; 2 - the syntax error; |
Beginning from Version 1.1 added the indicator of currect GPU and button AntiLoop for exit from local minimums using small random variation of optimizer's variables.
LINZIK can be called BASIC-like language. The main difference is a syntax of function call: instead sin (x) should write [sin x]. That is the function call begins with square brackets, followed by the name of the function and its arguments (if present).
Names consist of letter, or letter and number, or two letters. Only Latin letters are allowed. There is no case-sensitivity. In this guide characters of operators are shown in upper case, and functions in lowercase: to emphasize the difference between the respective corresponding to each other functions and operators. For example, the operator SCALE corresponds to the function [scale].
There is only one data type - numeric.
In the lower right corner of the main window is the "Calc". This is the calculator, which can compute any language expression (formulas).
Starts a new table consisting of two surfaces: Object and Image. This operator is equivalent to clicking on "New" or choosing the "New" from menu.
Adds new row to the table, below the current selector position. This operator is equivalent to clicking on "Insert After."
Removes the row from the table. This operator is equivalent to clicking on "Delete".
Sets the half-diameter v for surface s. This operator is equivalent to the manually recording in the table.
Sets the radius of curvature (v) for surface s. This operator is equivalent to the manually recording in the table.
Sets thickness (v) for surface s. This operator is equivalent to the manually recording in the table.
Sets the value of the half of angle in degrees in the "Half Field Angle."
Sets checkbox "Select Wavelengths" for wave w. Values of v: 1 - selected 0 - unselected
Sets that the layout drawing will be shown with such scale that the selected interval of surfaces takes the whole length. This is equivalent to manual selection of radio-button "Scale: by Length."
Sets that the layout drawing will be shown with such scale that the largest diameter in the selected interval of surfaces takes all the proposed height. This is equivalent to manual selection of radio-button "Scale: by Dia".
Sets that the scheme will be shown in the layout drawing from surface f to t inclusive. This is equivalent to manual input of f and t in the "From:" and "to:" respectively.
Sets the number of rays on the radius of the entrance pupil. This is equivalent to manual input of n in the "Rays: ". Allowed values of n: 2 .. 40.
Sets whether to show the Airy disk on the spot diagram. The values of f: 0 - do not show 1 - show. This is equivalent to manual input of f in the "Airy Dia."
Sets size v (microns) of scale ruler on the spot diagram. This is equivalent to manual input of v in the "Scale: ".
Sets the mode of reference point. The reference point can be set
as the centroid of spot, as the chief ray or as a place
corresponding to lack of distortion (W/o distorsion).
This is equivalent to manual selection in the "Reference".
Values of v: 0 - Centroid,
1 - Chief Ray, 2 - W/o distorsion.
Sets the scale of longitudinal spherical aberration diagram. This is equivalent to manual input of v. Calling operator LASCALE 0 sets the automatic scaling mode.
Moves "focuser" within the scope of the longitudinal spherical aberration diagram. Value v: -100 .. 100. This is equivalent to manual displacement of the slider located on the diagram.
Sets the comment for the layout drawing. This is equivalent to manual input text in the field.
Sets the name of material (str) for the surface s. This is equivalent to manual input of string str in the table column "Glass" for the surface s.
Sets the number of material (g) for the surface s. The number of material can be obtained as a result of the function [glassn ..] or as a content of element of array MEM after calling the operator LOADGLASSES.
Sets the content of field "Cond: " which accessible by function [cond]. The [cond] will interprete string str as an expression. This is equivalent to manual input str in the "Cond: ".
Sets the content of field "Goal: " which accessible by function [goal]. The [goal] will interprete string str as an expression. This is equivalent to manual input str in the "Goal: ".
Sets the content of field "Calc: " This is equivalent to manual input str in the "Calc: ".
Sets that the value of cell (row r1, column c) will automatically repeat the value of cell (row r2, column c). This is equivalent to the right mouse click and choice the item "Pickup Plus" from PopUp menu with the input in the proposed dialogue.
Sets that the value of cell (row r1, column c) will automatically repeat the value of cell (row r2, column c) multiplied to -1. This is equivalent to the right mouse click and choice the item "Pickup Minus" from PopUp menu with the input in the proposed dialogue.
Sets the v (square of eccentricity multiplied to -1) for the surface s. This is equivalent to manual input v in the table column "Conic" for surface s.
Sets the wavelength L for wave 7, nanometers. This is equivalent to manual input of L in the "Select Wavelength. "
Creates a window: x and y are coordinates of the upper left corner, w and h are width and height. All sizes in pixels.
Draws a pixel with the coordinates x,y and color c.
The color coded as three components R (red), G (green) and B (blue)
using the formula:
B * 256 * 256 * 256 + G + RValues of R,G,R: 0 .. 255.
Draws the plot of function [eval],
for values listed in the interval fx .. tx.
The plot can be built in the different modes t (values 0 .. 3),
the upper left corner has coordinates (x,y) - pixels,
the width and height (w,h) (pixels),
the estimated interval of values of
[eval] is defined as fy .. ty.
Example: building plot of function [sin x]
in the range 0 .. 10, the estimated value -1 .. 1:
EVAL [sin X]
PLOT 1, 20, 30, 100, 150, 0, 10, -1, 1
Attention!
Operator PLOT modifies the value of the variable X.Values of t:

For each point of plot the operator PLOT aumatically executes operator HINT with corresponding number. Thus, if the mouse pointer contacts the curve the ballon appears with this number; then on right-click the pop-up menu will be open for copying this number to clipboard.
Loads string str into the internal buffer which available for function [eval]. Function [eval] iterpretes this string and returns its value. Example:
EVAL [sin x] + [cos y]
Moves "pencil" to the point
with the coordinates (x, y).
This movement points the position where
the text writing will begin or from where
the operator LINE will start draw the line.
Draws a line to a point with the coordinates (x, y). The color of line can be set by the operator COLOR. If the color is not specified there it will be 0 (black).
Sets the color for the operator LINE and for the text output using operator - (minus). The color coded as three components R (red), G (green) and B (blue) using the formula:
B * 256 * 256 * 256 + G + RValues of R,G,R: 0 .. 255.
Sets the background color for operator CLEAR and for operator - (minus).
This operator is a string with character "-" in the first position. The remainder of string will be put to the form window from the "pencil" coordinates. The string can contain the format statements for the numerical output. Syntax of the format statement, here v is the variable name, "^" is character place(s):
^v^
Example 1:
- OPTICAL PATH DIFFERENCE, Waves
Example 2:
color 0
move 250,30
-^^ak^^ Deg
Example 3:
-^^x^^^^^^^^ ^^y^^^^^^^^
This operator is a string with word "HINT" in the first four positions.
The remainder of string will be put to the buffer and associated
with the "pencil" coordinates. The string can contain the format
statements for the numerical output - same as operator "-".
If the mouse pointer contacts with point with these coordinates
the balloon appears with this string from buffer. Example:
move x, y
hint ^c^^^^^^
Operator HINT can be used for adding the mouse sensitivity to
two-dimensional diagrams.
For single-dimensional plots drawed by operator PLOT the HINT will be
called automatically for each point of curve - with corresponding value.
Sets the current font for the "minus" operator.
f1 - type of font: 1 - Arial, 2 - Courier New, 3 - MS Sans Serif
f2 - font size
f3 - effect 0 - normal, 1 - italic, 2 - fat, 3 - underlined.
Clears the content of the form window.
Runs the optimizer. This is equivalent of clicking on button "Search". The optimizer works using the method selected in the operator METHOD.
Sets the optimization method.
Here:
m - number of method: 1 - Simplex, 2 - Broyden, 3 - Annealing (global); default selected Simplex;
n - the number of iterations, the default 10000;
t - tolerance, the default 0.0000001.
Sets that the cell of table (row r, column c) is a variable for optimization. This is equivalent to the right mouse click and choicing the item "Variable" from the PopUp menu.
Sets that the cell of table (row r, column c) is not a variable for optimization. This is equivalent to the right mouse click and choicing the item "Fixed" from the PopUp menu.
Sets the default strings in the fields "Goal:" and "Cond:".
For "Goal:"
[srms 0.0] + [srms [angle], 0]
For "Cond:"
([Aedge]> 0) & ([Gedge]> 3) & ([Athick]> 0) & ([Vig 0.0] <0.0001)
This is equivalent to clicking on "Cond & Goal by default".
Stops running of form.
Declares local variables. The values of variables listed in the operator are stored in the stack and will be restored from there by operator RETURN.
Returns from subroutine.
Returns from function with value e.
Goes to label label.
It is a word with length up to 10 characters which is located after the first character ":".
Calls subroutine labeled by label.
Conditional operator.
The loop operator.
The loop operator.
Informs the program about the version in which was written the running form. If v is higher than the current version, a warning will be shown.
Displays the message str and raises the error situation.
Runs recalculation of the state. This is equivalent to clicking on the "Recalc.
Delays the running of the form on n milliseconds.
Sets in the element with index i of array MEM the value v. Array MEM - the single array in the language. The allowed index values: 0 .. 1000000. The value of the element can be obtained by function [mem i].
Performs complex two-dimensional fast Fourier transform of array MEM. Array MEM is seen as a square matrix of size n x n. The even elements of MEM are the real parts of complex values and the odd elements are the imaginary parts.
Performs reshuffle of quadrants of square matrix n x n.
Left with right upper quadrant becomes lower, and vice versa;
top right becomes the left lower quadrant and vice versa.
This operator is used to bring the result to the operator
FFT form when the upper frequencies
should not lie in the corners or in the center or vice versa.
Initializing the all variables to zero.
Initializing the all elements of array MEM to zero
Fills the elements of array MEM starting from element 1 by numbers of glasses. These numbers can be used in the operator PRINTGLASS and function [rindex ..]. In element 0 will be entered the total number of glasses so you can use [mem 0] or function [nglasses].
Prints a text in the form window - the name of glass with number g. Number g can be obtained as the element of array MEM after the operator LOADGLASSES or as a result of the function [glassn ..].
The glass name with number g will be put to the buffer
and associated with the "pencil" coordinates.
Number g can be obtained as the element of array MEM
after the operator LOADGLASSES
or as a result of the function [glassn ..].
Example:
move x,y
hintglass g
When the mouse cursor contacts the glass-point on the diagram
the balloon appears near cursor with glass info.
On right-click the popup menu (with single position) opens
that contains the selected glass name; on click to this menu
the glass name will be copied to the clipboard and can be used
in "Glass" fields of the scheme editor (Ctrl-V or Shift-Ins).
Thus, now this diagrams are more comfortable for navigation
and selection in the glass catalog.
Fills the elements of array MEM starting from element 1 by numbers that are radii of test plates from file plates.txt so you can use [mem 0] or function [nplates]. As the file plates.txt can be used files *.tpd prepared for ZEMAX.
Displays a dialog with the invitation text_of_question
to inputing the value of variable v.
Example:
? k N of times?
The thickness of the edge between the surface s
and the surface s +1.
Result in mm.
The function finds the "glass" element with a minimum thickness of the edge and gives this thick.
The "glass" refers to items with index of refraction, is not equal to 1.
Result in mm.
The function is "air" element with a minimum thickness of
the edge and returns this thickness.
The term "air" refers to items with index of refraction, equal to 1.
Result in mm.
The distance between the surface s and the surface s +1,
on axis.
In other words, this is an element thickness
concluded between the surfaces.
Result in mm.
The function returns the minimal thickness of "air" element.
Result in mm.
The function finds the "glass" element
with a minimum thickness of the axis, and returns this thick.
The "glass" refers to items with index of refraction, is not equal to 1.
Result in mm.
Returns the content
of the field "Half Field Angle".
Result in degrees.
Half-diameter (radius) of surface s.
Result in mm.
The curvature radius of surface s.
Result in mm.
Calculates expression recorded in the internal buffer by operator EVAL and returns its value. This function can be used by operator PLOT.
If the "Select Wavelengths" with the number n is selected, the function returns a non-zero value, which can be interpreted as a color of wave; this color-number can be used in operators PIXEL and COLOR. If the field is not selected, the result - 0.
Returns the square of eccentricity of surface s taken with the minus sign.
Returns the reference point mode.
The reference point can be set as the centroid of spot,
as the chief ray, or as a place that corresponding the lack of distortion.
Modes: 0 - Centroid, 1 - Chief Ray, 2 - W/o distorsion.
Returns the number of rays on the radius of the entrance pupil which specified by operator RAYS or manually.
Returns: whether the operator
AIRY (or was set by hand)
is showing the Airy disk.
0 - not showing 1 - showing:

Returns the size of scale ruler on the spot diagram (that was set by operator SCALE or manually). Result in micron:

Returns the scale of the longitudinal spherical aberration diagram that was set by operator LASCALE or manually, or automatically.
The number of surfaces in the scheme.
Returns wavelength of wave with number w, nanometers. For example, [wlength 4] is 546.07.
Returns number of glasses loaded into the MEM by operator LOADGLASSES.
Returns number of glass for surface with a number s. If air or surface is a mirror, the result - 0.
Returns the number of radii of test plates loaded in the MEM. by operator LOADPLATES.
Returns whether the cell (row r, column c)
is a variable for optimization:
0 - is not
1 - is
> 1 - for pickup there is a cell with this number
<-1 - for minus-pickup there is a cell with this number.
Returns the root mean squares (RMS) deviation of points of spot
from a reference point.
The reference point can be set as the centroid of spot,
as the chief ray, or as a place that corresponding
lack of distortion (W/o distorsion).
The current reference point mode is assigned
in the field "Reference"
or by operator REFERENCE from forms.
Here:
a - angle, degrees.
w - wave number (1 .. 7).
If w is 0, the RMS is calculated
for all waves selected in the "Select Wavelengths".
Result in microns.
Returns the maximum deviation of points of spot
from a reference point.
The reference point can be set as the centroid of spot,
as the chief ray, or as a place that corresponding
lack of distortion (W/o distorsion).
The current reference point mode is assigned
in the field "Reference"
or by operator REFERENCE from forms.
Here:
a - angle, degrees.
w - wave (1 .. 7).
If w is 0, the maximum deviation is calculated
for all waves selected in the "Select Wavelengths".
Result in microns.
Returns a percent of vignetting. Here:
a - angle, degrees.
w - wave (1 .. 7).
If the wave is 0
the vignetting will calculated for all waves,
selected in the "Select Wavelengths".
This is equivalent to [vig a,w] but it will be computed using the optimized accel.dll; twice more faster than [vig a,w].
Same as [vig ..] but it will be computed using NVIDIA CUDA or AMD Stream.
Quickly evals vignetting without ray tracing using data left in the cache by functions [cp_srms ..], [cp_maxr], [nv_srms], [nv_maxr].
Example. If the "Goal:" contains "[cp_srms [angle], 0] + [cp_srms 0,0]" the expression "[cp_srms 0,0]" will be calculated last. Then, if the "Cond:" contains "[vig 0,0]" (vignetting for the center, this is the case by default), it may be replaced at [__vig], because optimizer calculates "Goal:" before "Cond:".
The effective focal length in millimetres.
The focal ratio.
Returns length of the optical path for angle a, wave w; y and z are coordinates of the point located on the surface 2. Result in mm.
Returns the difference in optical path lengths as:
([opath a, w, y, z] - [opath a, w, 0, 0]) / LHere: a - angle, degrees, w - wave (1 .. 7), y,z - coordinates of points located on the surface 2, L - length of wave w.
Returns the coordinate z of centroid of spot.
Here:
a - angle, degrees.
w - waver (1 .. 7).
If w is 0, the coordinates of centroid
will be calculated for all waves
selected in the "Select Wavelengths".
Result in mm.
Returns the coordinate y of centroid of spot.
Here:
a - angle, degrees.
w - waver (1 .. 7).
If w is 0, the coordinates of centroid
will be calculated for all waves
selected in the "Select Wavelengths".
Result in mm.
Returns the longitudinal spherical aberration for wave w (1..7)
and point with coordinates (y,0) located on the surface 2.
Result in mm.
Returns the coordinate z of the point of spot
(point in the plane "Image") for angle a (degrees),
wave w (1 .. 7) for ray passing through
point with coordinates (y,z) located on the surface 2.
Result in mm.
Returns the coordinate y of the point of spot
(point in the plane "Image") for angle a (degrees),
wave w (1 .. 7) for ray passing through
point with coordinates (y, z) located on the surface 2.
Result in mm.
Returns the coordinate z of the point of Exit Pupil
for angle a (degrees),
wave w (1 .. 7) for ray passing through
point with coordinates (y, z) located on the surface 2.
Result in mm.
Returns the coordinate y of the point of Exit Pupil
for angle a (degrees),
wave w (1 .. 7) for ray passing through
point with coordinates (y, z) located on the surface 2.
Result in mm.
Returns value of expression in the field "Goal ". This function is used as a criterion of optimality (merit function) by optimizer. The example of this function by default ( when you click on "Cond & Goal by default"):
[srms 0,0] + [srms [angle], 0]Here is sum of root mean squares of deviations of points of spots in the center of view field and at its edge for all wavelengths.
Returns value of expression in the field "Cond ". This function is used by optimizer as a condition for the correctness of the system. The example of this function by default ( when you click on "Cond & Goal by default"):
([Aedge]> 0) & ([Gedge]> 3) & ([Athick]> 0) & ([Vig 0.0] <0.0001)It requires to have positive thick of air edges ([Aedge]> 0), glass edge at least 3 mm thick ([Gedge]> 3), positive thick of air elements in the axis ([Athick]> 0), and zero vignetting in the center of the view field for all waves ([Vig 0.0] <0.0001).
Sine of angle x, rad.
Cosine of angle x, rad.
Arctangent of angle x, rad.
Square root of x.
The absolute value of x.
Natural logarithm of x.
Square of x.
Converts degrees to radians.
Converts radians to degrees.
Rounds to the nearest integer number.
Random numbers in the range 0 .. 1.
Returns real part of raising number e to power i * 2 * pi * x. Used in the calculation of PSF and MTF. Here pi = 3.14159265358 ..., e = 2.718281828 .., i - imaginary 1.
Returns imaginary part of raising number e to power i * 2 * pi * x. Used in the calculation of PSF and MTF. Here pi = 3.14159265358 ..., e = 2.718281828 .., i - imaginary 1.
Returns version of the program.
Horizontal coordinates of the upper left corner of the main window. Result in pixels.
Vertical coordinates of the upper left corner of the main window. Result in pixels.
Returns value of element with number i of array MEM.
Returns index of refraction for wave with number w and glass with number g. If the number of wave is 7 (wave length determined by the user), it performs an interpolation of six fixed-length waves using the Schott's formula.
Operator RETURN can return a value of expression in round brackets. In this case the subroutine is a user defined function. Calling such functions has syntax: [:label] or [:label parameters] where parameters are expression(s) which delimited by comas.
Example 1:
x = [:max 3,5]
-^^^^^x
stop
*
:max (x, y)
if x > y return (x); else return (y); endif
Result: 5
The recursive calls are allowed. Example 2 (recursive calculation of factorial N! = N*(N-1)*(N-2)...*1 ):
x=[:factorial 5]
-^^^^^^^x
stop
:factorial(n)
if n=0 return (1); else return (n*[:factorial n-1]); endif
Result: 120
Version 0.1 - March 3, 2008
Version 0.2 - March 9, 2008:
Added functions [ln ..]
[p2 ..]
[ro ..]
[tr ..]
[rnd],
[wz ..]
[wy ..].
Added operators METHOD,
FFT.
Optimizer can use different
methods.
Library.lib: in this file can be defined
functions,
which can be called from the
"Goal", "Cond", "Calc."
Version 0.3 - March 17, 2008:
Added functions [nsurfaces],
[wlength ..]
[ere ..]
[eim ..].
Added operators: INITVAR,
INITMEM,
.. SHIFT.
Added forms: fft_PSF, fft_MTF -
Point Spread Function and Modulation Transfer Function respectively.
Version 0.4 - March 26, 2008:
In addition to the six fixed waves
can be entered the seventh wave with the required length.
Added functions [nglasses], [rindex ..] [glassn ..]
Added operators: LOADGLASSES, PRINTGLASS, GLASSN .., USERWAVE.
Added forms WAVEFRONT, FOCAL_SHIFT, GLASSES -
wavefront errors, chromatic curves, partial dispersion diagram.
Version 0.5 - April 5, 2008:
Added functions [nplates],
[variable ..].
Added operators:
LOADPLATES,?
...
Added forms: VIGNETTING - vignetting diagram,
_SCALE_SYSTEM - scaling system
_TEST_PLATES - selecting the standart curvature radii
from file plates.txt with optimization.
Menu "Analysis" expanded as
"Analysis & Tools."
Accelerated functions for working with the glass catalog.
Increased the maximum number of surfaces: from 22 to 126.
Version 0.6 - April 10, 2008:
In the menu "File" added items:
"New Analyse / Tool", "Edit Analyse /
Tool Source", "Edit Library.lib" -
for editing forms and libraries.
Added highlighting of the LINZIK language syntax.
Added form SPOTS - Expanded spot diagram.
Version 0.7 - April 30, 2008:
Added support for multiprocessor GPGPU computing on video card
compatible with the NVIDIA CUDA.
New functions [nv_srms ..] and
[nv_maxr ..] calculate
characteristics of spot tracing all rays simultaneously
on video card processors.
For example, using NVIDIA GeForce 8800GT (112 processors)
gives acceleration as 2 - 10 times or more compared
with functions [srms ..] and [maxr ..] on the central
processor Intel Pentium E2180 2 GHz. The gain from using CUDA will grow
with more optical surfaces in the scheme.
Added forms DISTORTION - calculation of distortion,
fft_PMTF - polychromatic modualation transfer function.
Added functions [tick] and [nv_rays].
Version 0.8 - May 7, 2008:
Improved interaction with CUDA: functions [nv_srms ..]
and [nv_maxr ..]
are 30% faster than in version 0.7.
New functions for computing on CUDA:
[nv_2_srms ..], [nv_2_maxr ..],
[nv_3_srms ..], [nv_3_maxr ..]
allows for one call to them to calculate the characteristics of spots
for the entire field: for 2 or 3 angles, respectively.
For example, the function [nv_2_srms ..] runs
almost the same time as [nv_srms ..], and are
equivalent of [nv_srms ..]+[ nv_srms ..].
Optimized ray-tracing code for central processor.
New functions [cp_srms ..] and
[cp_maxr ..] are twice faster
than [srms ..] and [maxr ..] respectively.
New functions [cp_2_srms ..] and
[cp_2_maxr ..] are
equivalents of the sum of two [cp_srms ..] or
[cp_maxr ..],
but if the system has two central processors it will be calculated
almost twice faster.
New function [rdtsc].
Version 0.81 - May 18, 2008:
Corrected the bug - versions 0.7 and 0.8 were not working in Windows x64.
The [nv_ ...] functions use not CUDA 1.1 but CUDA 2.0 BETA
for compatibility with Vista. If you intend to use these functions
then download a new version of a
suitable driver.
Version 1.1 - June 18, 2008:
Added operators: HINT.., HINTGLASS..
Added form: GLASSES_nd_Vd - the Abbe's diagram.
The form GLASSES (partial dispersion) was renamed to GLASSES_partial_dispersion,
and (same as GLASSES_nd_Vd) it now has the mouse sensitivity: when the
mouse cursor contacts the glass-point on the diagram the balloon appears
near cursor with glass info. On right-click the popup menu (with single
position) opens that contains the selected glass name; on click to this menu
the glass name will be copied to the clipboard and can be used in
"Glass" fields of the scheme editor (Ctrl-V or Shift-Ins).
Thus, now this diagrams are more comfortable for navigation and selection
in the glass catalog.
An indication was added to FFT_PSF and WAVEFRONT: the balloon with
function value in the mouse cursor point.
All the plots that drawed using operator PLOT are also mouse sensitive now.
Added the syntax highlighting of optimizer'z fields:
"Cond", "Goal", "Calc".
Added the indication of wrong conditions in optimizer: the compare operation
("<", ">", "<=", ">=", "<>") will be highlighted when returns 0 (FALSE).
Attention!
Functions [athick] and [gthick] now return the minimal thickness
of air and glass only for those cells that selected as variables
for optimizer (in column "Thickness").
Functions [aedge] and [gedge] now return the true sign of
the minimal edge nevertheless on signs of thicknesses (in column "Thickness")
Functions [gthick] and [gedge] will not consider now that MIRROR is a glass.
Version 0.91 - June 22, 2008:
Corrected the bug: versions 0.5 .. 0.9 can crash when "Save Glass" pressed.
Improved form _SCALE_SYSTEM.
These functions were undocumented:
[cp_vig..], [nv_vig..],
[__vig].
Version 1.1 - July 11 2008:
The optimizer can use the new method: Global-random.
Added button AntiLoop for exit from local minimums.
Added indicator of current GPU.
Function [cp...] has more precision.
Version 1.1d - October 30 2008:
Functions [nv...] here has the double precision - as CUDA 2 support for NVIDIA GeForce 280 GTX, 260 GTX,
and Tesla C1060. Version 1.1d cannot work with single precision and
it is not compatible with previous GeForces (8-th and 9-th).
for version 1.1 (single precision [nv...]) -
AMD_GPU_forLINZIK_1_1_XP_Setup
or AMD_GPU_forLINZIK_1_1_Vista_Setup for Vista
for version 1.1d (double precision [nv...]) - AMD_GPU_forLINZIK_1_1d_XP_Setup
or AMD_GPU_forLINZIK_1_1d_Vista_Setup for Vista
These Add-Ons replace the runcuda.dll library at the same
corresponding analog which uses the AMD Stream technology.
Attention! Use driver Catalyst 8.9
or higher.