In the following the changes to CLUScript from one version to the next are presented. This should help you to get an overview of what is really new in a new version.
Jump to the change log of
The most important changes in this release are:
-
You can read XML files with ReadXML().
-
List() can now split a string into a list of substrings given a delimiter string.
-
Strings can contain control symbols, like a new line '\n'.
The following functionality has been changed or added:
-
Strings may now also contain control symbols for new line ('\n'), tabulator ('\t') and the backslash itself ('\\'). This is in line with the syntax of generating a quotation mark in a string via '\"'. Make sure to check your old CLUScripts, where you wrote latex code. The backslash symbols need to be doubled now!
-
Scalar() now accepts lists of elements. It is then applied to each element separately.
-
List() now accepts a string and a delimiter symbol string, whereby the string is split into a list of substrings separated by the delimiter symbol.
-
Function name Str() is obsolete and replaced by String(), which now also allows you to automatically concatenate the elements of a list with delimiter symbols.
This is a list of functions that have been added:
-
ReadXML() allows you to read arbitrary XML files, which are represented in CLUCalc as nested lists.
-
ReadText(), reads a text file and stores it in a string variable.
-
WriteText(), writes a string to a text file.
Pre-defined variables added are:
The most important changes in this release are:
-
Read and write images of 'png', 'jpg', 'bmp' and other formats, and use them for texture mapping standard geometric objects and arbitrary surfaces.
-
Work directly with the image of rendered latex code, for example for texture mapping.
-
New variable type 'Tensor', which supports arbitrary dimensional tensor (limited by available memory) and allows for automatic contraction of tensors in products. Additionally, functions that generate algebra product tensors are available, which allows you to represent virtually all algebra operations as tensor products. See Working with Tensors for a detailed description.
-
It is now possible to read from and write to a serial port, which allows you to control peripheral hardware. Currently this is only implemented under Windows. See Serial Port I/O for more details.
-
You can now assign to a list. For example, the code [U,D,V] = SVD(M), sets variables U, D and V to the resultant matrices returned from SVD(). See Variable Lists for more details.
The following functionality has been changed or added:
-
Twists are now visualized. That is, if T is a translator and R a rotor in conformal space, then objects of the type T*R or R*T are now visualized properly.
-
AnalyzeMV() can now also be applied to twists.
-
Operators
==
and !=
are now defined between image and color. They return an image with white pixels where the condition is true and black pixels where it is not true.
-
SetTextPrec() allows the displayed precision of numbers to be set between 0 and 17 digits. This number now refers to the number of significant digits.
-
New variable type
tensor
. Encodes tensors of arbitrary dimension. The standard operators have been extended to apply to variables of this type. See Working with Tensors for a detailed description.
-
Tensor and List variables are cast automatically to Matrix variables in functions SVD(), Eigen(), EigenValues() and det().
-
Function StartView() now allows the view size to be given either as a percentage or as pixel values.
-
Function DirVecP3() now also accepts variable lists, multivectors and mouse modes as parameters.
-
Passing a single list to a pre-defined function is like passing the elements of the list separately. For example,
VecE3([1,2,3])
is equivalent to VecE3(1,2,3)
.
-
Can now also scale color variables with scalars.
-
Function Color() now casts vectors that represent points to color space.
-
Can now specify a texture coordinate function in Plot(). This allows for user defined texture mapping.
-
Tool
Input()
now only returns a value when 'RETURN' is pressed.
-
Function atan() now also accepts two parameters Y and X and evaluates angle of vector (X, Y) to x-axis.
-
Operator
^^
evaluates power. That is, x^^y
is equivalent to pow(x,y).
-
All tools now accept as last parameter a tool tip that appears when the mouse is placed over a tool.
This is a list of functions that have been added:
-
WriteImg() writes images in formats jpg, png, bmp, tiff, ico, eps (wrapped jpeg).
-
ReadVar(), WriteVar() can be used to read and write variables. Variables are stored in a XML file. This also allows variable lists and vertex lists to be stored.
-
ResizeImg(), ReshapeImg() for resizing and reshaping images.
-
CopyImg() generates a copy of an image. Note that the operator <code>= only copies a reference to an image.
-
InsertImg() inserts an image into another one. Can also specify a channel map.
-
SetTexture() sets the current texture image.
-
SetTextureRepeat() sets the repetition factor of a texture.
-
EnableAbsTexCoords() enables/disables the use of absolute texture coordinates. When enables, the size of an object influences the texture repetition.
-
GetLatexImg() returns the image object of a rendered latex text. This image may then be used for texture mapping.
-
SetArrowShape() sets the shape of arrows as length and opening angle of arrow tip.
-
SetMouseMode(), GetMouseMode() set and get the current mouse mode.
-
SetMouseValue(), GetMouseValue() set and get mouse values for different mouse modes.
-
SetMouseSens(), GetMouseSens() set and get the current mouse sensitivity.
-
SetVisWinSize() sets the size of the visualization window.
-
DrawIcosahedron() draws an icosahedron.
-
EnableFog(), SetFogDensity(), SetFogColor() implement OpenGL fog functionality.
-
Tensor() creates a tensor variable.
-
GAOpTensor() creates a tensor representing a GA operator.
-
MV2Tensor(), Tensor2MV() transform multivectors into tensors and vice versa.
-
GetLineWidth(), GetPointSize() get the current line width and point size.
-
EnableAnimate() replaces
_DoAnimate = [0 | 1]
.
-
SetAnimateTimeStep() sets time step between animation executions in milliseconds.
-
GetTime() returns the current system time in millisecond precision.
-
ResetLight() resets all lighting settings.
-
Sym2Col(), Col2Sym() transform the upper triangular part including the diagonal of a symmetric matrix into a column vector and vice versa.
-
List() creates a list of given size.
-
InsList() inserts elements into a list.
-
TransList() transposes the elements in a list. This can also be used to transform index lists into lists of numbers.
-
sign() gives the sign of a scalar value.
-
sort() sorts variable lists. Can also sort according to user defined function.
-
InputText() creates tool for text input by user.
-
Stepper() creates a tool that returns a single scalar value and offers buttons to increase and decrease the value in two different step sizes.
-
OpenSP(), ReadSP(), WriteSP() open, read from and write to a serial port. Currently only implemented under Windows.
Pre-defined variables added are:
-
MVOP_REVERSE, MVOP_INVOLUTE multivector operation IDs, for the reverse and main incolution, as, for example, used by GAOpTensor().
-
GA_E3, GA_P3, GA_N3, GA_C2, geometric algebra IDs for different spaces.
-
VERSION contains current CLUCalc version.
-
true, false are defined as 1 and 0.
None, I believe.
The most important changes in this release are:
-
The Plot() function now draws point-, circle- and line-valued functions.
-
You can now use the functions SetInfoText() and SetInfoWidth() to print simple HTML text next to the visualization window. Also see User Interactive Text for more details.
-
With the function DrawText() you can now draw simple text into the visualization without parsing it with LaTeX.
The following functionality has been changed or added:
-
The Plot() function now draws point-, circle- and line-valued 1D-functions, as well as point-valued 2D-functions. You can also give a color function that defines the color of each point, circle or line. For 2D-functions you can also pass a normal function that gives the normal at each point, in order to improve the visualization. Furthermore, the normal vectors, whether they are automatically estimated or given, can be drawn on top of the surface.
-
MV2Matrix() now also accepts a list of multivectors, which generates a matrix whose columns reflect the separate multivectors.
-
floor() and ceil() now also accept multivectors, whereby they are applied to all components separately.
-
Matrices that consist of a single element are now automatically cast to scalars if necessary.
-
The operator '
==
' can now compare multivectors and scalars.
-
Point operators
.*
and ./
are extended to work row-wise between two matrices if the matrix on the RHS consists of a single column.
This is a list of functions that have been added:
-
You can now use the functions SetInfoText() and SetInfoWidth() to print simple HTML text next to the visualization window. Links in this text can be defined such that the script is reexecuted in execution mode EM_LINK, everytime the user click on a link. This allows for tutorial scripts and better user interaction. The new introduction script ('Intro_4_1.clu') is an example of this.
-
With the function DrawText() you can now draw simple text into the visualization without parsing it with LaTeX. This allows you to display constantly changing text like the contents of a vector. Note that CLUCalc in version 4.1 also displays the script output text in simple HTML.
-
SetTextSize() sets the size of the text drawn with DrawText().
-
ReadMatrix() reads a text file of a particular format and stores the values in a matrix.
-
oprod() and iprod() evaluate the outer and inner product of the elements of a list, respectively.
-
sub() subtracts from the first element in a list all other elements. For matrices this works row-wise, by subtracting from the first element in each row all other elements in the row.
-
round() rounds scalars, all elements of lists, multivectors and matrices.
-
FindAllDegConics() finds all degenerate 2D-conics that can be constructed through the linear combination of two given conics.
-
SetEvalPrec() and SetVisPrec() set the numerical precision for evaluations and visualizations, respectively.
-
Scalar() transforms strings and other variables into scalars.
Execution mode variables added are:
-
EM_LINK. This execution mode is set when the user clicks on special links in either the info window or the output window. See User Interactive Text for more details.
-
LinkData. This variable contains the data of a link clicked by the user in the info text window or the output window. See User Interactive Text for more details.
None, I believe.
A lot of things have been changed in CLUScript since the last version. In particular, the syntax with respect to creating lists and selecting elements of a matrix or list are now different. In short the use of square ('[]') and round ('()') brackets has been exchanged. This was necessary since the old syntax led to a number of problems when working with lists. However, it also means that you will probably have to adapt the scripts you have written so far to the new syntax.
Another important change in the parser is the reduced scope of variables. A variable defined in the main part of a script is not directly available in a macro defined within that script. In oder to access globally defined variables, you need to write '::' in front of the variable name. This is also true if you want to call a macro from within another macro, in which case you will have to write '::' in front of the name of the macro.
Not just the syntax was changed but also the internal working of the parser. For example, the parameters passed to macros in CLUScript are now passed by reference if possible. This allows you to write macros that simply change a parameter passed but need to give a return value. It is also possible to create a reference to a variable explicitly using the new operator <b>->. For example, the script
func = { b -> _P(1); b = 2; }
?a = 1;
func(a);
?a;
produces the output
Apart from the parser changes, many new functions and also a new Clifford algebra space were added to CLUScript. The new Clifford algebra space is the Clifford algebra over the vector space of symmetric 3 by 3 matrices. Such matrices can be used to represent conic sections and this is also how elements of that Clifford algebra are visualized. In particular, the outer product of five points represents the conic section through these five points (which is unique). Have a look at the function VecC2() for more details.
Here follows now a listing of all changes.
The following functionality has been added.
The following functions have been added.
-
Drawing Functions
-
Image Functions
-
Matrix Functions
-
AddCols(). Add a number of columns to a matrix.
-
AddRows(). Add a number of rows to a matrix.
-
Eigen(). Evaluate eigenvalues and eigenvectors of a matrix. (Uses LAPACK functions)
-
EigenValues(). Evaluate eigenvalues of a matrix. (Uses LAPACK functions)
-
FindMainNRows(). Get a sorted list of N rows of a matrix, which mainly span the row space.
-
GetRows(). Construct a matrix from a set of rows of another matrix.
-
inv(). Invert components of matrix separately. Zero components are left zero.
-
ReshapeMatrix(). Change the form of a matrix while keeping the number of elements constant.
-
ResizeMatrix(). Change dimensions of matrix.
-
RowSpace(). Reduce matrix to those rows that span the row space and have highest magnitude.
-
Geometric Algebra Functions
-
AnalyzeMV(). Get geometric interpretation of multivector as text.
-
BladeIdxList(). Returns the indices of the basis blades that are contained in a multivector.
-
DefVarsC2(). Defines the basis vectors for the vector space of 2d-conics.
-
DegConic(). Makes a non-degenerate conic degenerate.
-
MV2Mask(). Generates a mask, for example for the function GetMVProductMatrix(), from the basis blades contained in a multivector.
-
ReflectorC2(). Generates a reflection operator for the space of 2d-conics.
-
RotorC2(). Generates a rotor for the space of 2d-conics.
-
VecC2(). Generates a vector that represents a point in the space of 2d-conics.
-
Tool Functions
-
Button(). Tool that simply displays a button but does not return any value.
-
Choice(). New tool that lets the user select an element from a list.
-
Mathematical Functions
-
prod(). Evaluates the product of the elements of a list and the rows of matrices.
-
sum(). Sums lists and rows of matrices.
-
Miscellaneous Functions
-
argmax(). Get index of matrix or list, where element with the maximum value is located.
-
argmin(). Get index of matrix or list, where element with the minimum value is located.
-
argtrue(). Get indices of matrix or list, where the elements are not equal to zero.
-
CombIdxList(). Generates an index list of all combinations of a set of numbers.
-
FileChooser(). Pops up a dialog box that lets the user choose a file.
-
PermIdxList(). Generates an index list of all permutations of a set of numbers.
-
RemList(). Remove a number of elements from a list.
-
SaveScreen(). Saves the current visualization to a bitmap file.
-
ShowFile(). Currently only works for Windows. Shows a file with the viewer defined by the operating system. This allows you to run videos or show web pages from within CLUCalc.
-
Size(). This function replaces the obsolete function Len(). It also gives the dimensions of matrices and images.
-
WriteData(). Write a list to a file.
The following variables have been added.
-
Alpha, MAlpha, DAlpha. Color variables that contain a negative alpha value. In this way a color can be made transparent by simply adding one of these variables to it.
-
EM_KEYUP, EM_KEYDOWN. Execution modes 'KEYUP' and 'KEYDOWN'. They occur when the user pressed and released a key, respectively. In this way, it is possible to control a script through the keyboard.
-
Len(). Use Size() instead.
-
Operator
#
is no longer defined.
A few changes and additions have been made since version 1.4. Probably the most visible change is the new feature of defining tools. In this was custom made dialog boxes can be added to a visualization. Apart from this a number of bugs were fixed and the functionality of a number of functions was extended. See the following detailed list for more information.
The following functionality has been added.
The following functionality has been changed.
-
Latex Text Rendering In order to render Latex you now need to have Ghostscript installed and not ImageMagick.
The following functions have been added.
The following variables have been added.
-
grp_VarMVStyle
-
grp_VarMisc
There have been many additions to CLUScript. It is now, for example, possible to prepare presentations, annotate your visualizations with LaTeX text, affect the lighting, do error propagation in Clifford algebra and to draw 2d-functions (DrawPointSurface()) and also circle-valued functions (DrawCircleSurface()). Another nice extension is that you can now create purely 2d visualizations (see _2dView). Here are the details of all changes.
The following functionality has been added.
The following functions have been added.
The following variables have been added.
The following functions do not exist any more.
A number of features have been added between version 1.2 and 1.3.
-
DrawPoint(): Draws a point directly at given coordinates.
-
DrawLine(): Draws a line directly between given end point coordinates.
-
DrawPlane(): Draws a plane at given offset and with given basis.
-
_FrameBoxSize: This variable controls the size of the frame box always shown. Setting this variable to a value smaller or equal to zero, removes the frame box from the visualization.
-
_BGColor: This variable controls the background color of the visualization. You need to parse the script twice for this variable to take effect.
-
N3_SHOW_IMAG: For conformal objects allows visualization of imaginary objects, like circles and spheres with imaginary radius.
-
N3_HIDE_IMAG: Switches to visualization mode where imaginary objects are not shown.
-
The visualization of objects in conformal space was improved.
-
Spheres, Circles and Point Pairs with imaginary radius can now be visualized. They are drawn either as transparent objects or as dotted line objects.
-
The function Color() now accepts 3 or 4 parameters, whereby the fourth parameter gives the value of translucency. A value of 1 is a completely opaque object and a value of zero a completely transparent object.
Only two features have been added between version 1.1 and 1.2.
-
Repeat(): This function basically implements a
for
-loop. It repeats some code a given number of times.
-
You can now define macros, which encapsulate a portion of code. This facilitates the repeated execution of complex operations.
There hasn't been much time between versions 1.0 and 1.1 but quite a number of features have been added. There have been no changes to the syntax, but a number of additional functions have been introduced and the functionality of some operators has been extended. In the following these changes are listed.
- Attention:
- All angles are now given in radians and {not} in degrees as in version 1.0. However, an additional variable {RadPerDeg} has been introduced which gives the ratio of radians per degree.
-
exp(): exponential of scalars and multivectors.
-
log(): natural logarithm of scalars.
-
proj(): projection of blades.
-
rej(): rejection of blades.
-
GradeList(): list of grades contained in multivector.
-
Len(): number of elements in string, list or vertex list.
-
Str(): conversion of element in string.
-
Type(): get type of variable.
-
Plot(): plot 1D-parametric vector function.
-
Color(): create color.
-
RadPerDeg: ratio
to convert degrees into radians and vice versa.
-
All angles are now given in radians. Use the variable RadPerDeg to convert radians into degrees.
-
A new variable type vertexlist has been added which typically contains the result of a function plot.
-
The functionality of the operator <tt># has been extended.