If you set "Post Process", the expression would be executed after reading each snapshot data.
Predefined commands to access internal data of Zindaiji 3 is registerd with a prfix "C", like other commands.
For example, command to set position of i-th particle is
C.SetDataPosition(i, x, y, z)
As an other example, command for set 1-dimensional parameter "type" is
When you consturuct data or append additional particles to the data, you must allocate memory by following command at first.
Above sample is a script to make rotating particle disk. You can make a movie like this from the script.
The post process expression is enable to access only to the data just loaded.
It is not implemented to access data of other steps.
Thus, simulation-like data making, constructing data from data of previous frames according to its interactions and time difference dt, is impossible for now.
Lua script is relatively fast script, but not so fast as compiled code. You may want to use your original C or C++ functions to make data.
There is a some tips to include your code to Zindaiji3 when compiling it.
If C.CallUserDefinedFunction(index, arg...) is called in lua script, user defined function UserDefinedFunction0x() would be called. (x = index (1 - 3)).
UserDefinedFunction0x is defined in source code SRC/PARTICLEDATA/clsUserDefinedFunctions.cpp. As default, function01 is a routine to make spherical particle distribution, and function02 is a routine to make chaos particle distribution. You can rewrite these functions and compile Zindaiji3 to use your own data make functions.