GAViewer 0.43 manual (.pdf)
GAViewer 0.43 manual (.pdf)
GAViewer 0.43 manual (.pdf)
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Chapter 4<br />
The Programming Language<br />
and the Console<br />
<strong>GAViewer</strong> contains a small internal programming language. It is basically a C-<br />
like language, with features like functions and conditional control structures,<br />
global and local scopes. It has a very limited set of types (3D Euclidean multivectors,<br />
4D homogeneous multivectors, 5D conformal multivectors). These<br />
types can be automatically coerced. Functions can be overloaded. There is limited<br />
support for arrays. Dynamic statements allow for quite amazing flexibility.<br />
Dynamic statements depend on the variables used to evaluate them. Every time<br />
such a variable changes, the dynamic statement is reevaluated.<br />
The programming language can be used on the console, and in .g files.<br />
These files typically contain functions and batches.<br />
A large number of built in functions are provided too handle all kinds of<br />
typical GA operations.<br />
4.1 Comma, semicolon and space<br />
As in Matlab, the symbol used to terminate a statement determines if the result<br />
is shown on the console/view window. Typing<br />
>> a = e1,<br />
will pop up a vector in the view window and show you the coordinates of a on<br />
the console. On the other hand, typing<br />
>> a = e1;<br />
hides the vector and does not print its coordinates. The multivector a still exists,<br />
but it is simply not shown. You can use the menu view→hide→show<br />
hidden object to make it appear again. Using no symbol to end a statement is<br />
equivalent to a comma:<br />
>> a = e1<br />
This will again pop up a vector in the view window and show you the coordinates<br />
of a on the console. In .g files, you must always terminate all statements<br />
with either a semicolon or a comma.<br />
27