Make your own free website on Tripod.com








zprogramming













































The advertisement is from tripod not mine









treenew.jpg
diamondsquare.jpg

click here to download file

KsVoxelLogo - V0.9, a small simple logolike interpreter that controls the voxelturtlegraphic to get easy graphics powered by polyvox and irrlicht - the goal are the graphics not the language. the exampleprogs for the pics above are also in the downloadfile.
you need no compiler to use it, only edit the txt-programfile with a texteditor.
Executable for Windows/DirectX and Linux/OpenGL both in the free download.
If you download please read readme.txt. this very good blog was helpful for the start: http://blog.strongminds.dk/post/2012/11/30/Writing-a-small-parser-interpreter-(Part-1).aspx


examples are:
- squares - test turtlegraphic
- spheres - test spheres like in polyvox basicexample
- lines - test turtlegraphic
- tree - test turtlegraphic and recursiv procedure
- fibonacci - test command for and print
- randomtrail - test turtlegraphic
- castles - test loading sproxel 0.6 csv files
- diamondsquare - test refreshing screen and diamondsquare


Latest Changes (full changehistory in readme.txt):
--------------
...
v0.6: LINUX! - a KsVoxelLogo for Linux/OpenGL is now in the download!
(+ 2 linuxfiles needed - configlinux.xml.txt + libIrrlicht.a )

v0.7:   new variablesystem!
floatnumbers, floatvariables (example> MAKE "FLOAT 0.02 )
some new mathcommands -
ABS, NEG, ASIN, ACOS, ATAN, ATANTWO, SIN, COS, TAN, LOG, POW, SQRT
stringvariables (example> MAKE "astring "Teststring ) or ( MAKE "X "[hello world] )
some new stringcommands -
FIRST, LAST, INDEX
other things:
- label: changed label to #
- files: moved media/shaders in subdirectories
- for-command: new last parameter is the step (example> for "i 1 7 1 [ print :i ]  )
- new parameter in configfile for xeffects shadowmapfilter in configfile (default=0=hardshadow)
- new parameters in configfile to change size of cyberspacevolume (default 127, 127, 127)
- new command LOADCSV to load a csv-file from sproxel0.6 with rotation degree 0/90/180/270 (example> loadcsv "test.csv 0 )
(a palette-file with the defaultcolors of KsVoxelLogo is in dir media->in sproxel0.6 import filetype palettefile)
- new command REFRESHALL to refresh screen from program -> animation, action, movement
(caution: not allowed inside other commands, use smaller volume for quicker refresh)
(for example for movement you can clear the volume with CLEAR, draw new things and refresh with REFRESHALL)

0.7.1 found some bugs
new command ISKEYDOWN to check if a key is pressed (check for spacebar example> "key = iskeydown 32 )
(update with REFRESHALL to also update keys)
  (irrlichtkeycodes in hex http://irrlicht.sourceforge.net/docu/_keycodes_8h_source.html )
changed LOADCSV loading to turtleposition
new example castles.txt - loading sproxel0.6 csvfile



0.8 found some bugs

IF also works with strings/stringvariables (example> if :key = "true print :key endif )

LOADCSV now rotates 0, 90, 180 or 270 degrees around yaxis

PRINT prints a sentence if separated with commata (example> print "[variable x is ] , :x ) 

new command: PRINTSCREEN fontname integer integer integer string [, string] - print a string to screen at x, y with a color
new command: GETFONT fontpicturename - load a font from a picture (read irrlichtdocumentation)

new command: BACKGROUND integer integer integer - set the backgroundcolor from program

new command: LIGHTPOS x y z targetx targety targetz - set lightposition

new command: CAMERAPOS - set the camerapos with six numbers for position and target from program
        new command: CHANGECAMERA number - 0=change to fixed camera (and mousepointer is shown), 1=Freeflightcamera(invisible mousepointer)

        new command: varstring = MOUSEBUTTONLEFTDOWN - true if leftmousebutton is down in variable
        new command: varstring = MOUSEPOSITIONX - reads mousepositionx to variable
new command: varstring = MOUSEPOSITIONY - reads mousepositiony to variable

new parameter in configfile: set showcamerapos to true and see cameraposition in windowcaption
diamondsquarealgorithm:
new command: varstring = DSGET x y - get value from diamondsquare
new command: DSSET x y value - set value to diamondsquare
        new command: DSINIT size roughness - init diamondsquare
new command: DIAMONDSQUARE - start diamondsquare

new command: INITVOLUMESIZE integer integer integer - init cyberspacevolumesize from program at start of program
      (example> INITVOLUMESIZE 63 63 63 ) the defaultsize is 127x127x127, you can also change in configfile 

new example: diamondsquare shows how to init a volume with INITVOLUMESIZE, print to screen, read keys,
cameraposition/light move and set new diamondsquareterrain and refresh it with REFRESHALL.



0.9 CLI-mode reactivated - if you start KsVoxelLogo without parameter, youre in the CLI-mode where
you can write lines that are interpreted (example> repeat 4 [ forward 50 left 90 ] )
and you can see the result immediately, type commands and see whats happening

new command: OUTPUT :x - procedures now can give back something, use at end of procedure( number, string, value)
to get the output you have to call the procedure with a "variablestring = GO procedurestringname
(example> TO "test MAKE "X 7 OUTPUT :X END "A = GO "test print :A )

if you make local variables in a procedure with MAKE, they are now automatic popped from the stack when leaving the procedure.

new command: variablestring = READLIST - reads a list of words (a line) from console to a variable
(example> "line = READLIST  PRINT :line )

new command: variablestring = APPEND string - appends a string to a string
fileio:
new command: OPENFILE filenamestring "r or "w - opens one file for read or write (example> openfile "xfiles.txt "w )
new command: CLOSEFILE - closes the one opened file (example> closefile )
new command: varstring = READCHARFILE - reads a char from the opened file to variable (example> "c = readcharfile )
new command: WRITELINEFILE string - writes a string to the opened file followed by carriage return "\n" (example> writelinefile "[This is the first line.] )

removed command CALC, now after the equalsign "=" follows the expression (example> "x = 7 )

NEW! correct mathemathical expressions:
after the equalsign "=" a correct mathematical expression also with parentheses ( ) before */ before +-
is possible with the commands listed under language/math.
(example> "x = 7 + :y * 3 * ( :a + random 42 ) )








testtextureatlas.jpg

TextureAtlas - Test of  a TextureAtlas with Polyvox and Irrlicht.
The pic shows some voxels with the materialnumbers written as numbers in the texture.
Its in the polyvoxforum http://www.volumesoffun.com/phpBB3/viewtopic.php?t=152







vermeergirlwithpearlearring.jpg

Girl with a pearl earring and gravity - Jan Vermeers painting "Girl with a pearl earring" painted instead of oil in polyvox.

how to get an irrlichtimage to polyvox:
video::IImage* image = driver->createImageFromFile("girl.jpg");
for(s32 x = 0; x < image->getDimension().Width; x++)
for(s32 y = 0; y < image->getDimension().Height; y++)
        {
volData.setVoxelAt(x, y, zposition, image->getPixel(x,y));
}
}

click here to download file







watorvoxel.jpg

 Wa-Tor Voxel - With Polyvox and Irrlicht a Voxelversion of the old Wa-Tor -Simulation was done.

  • the fishes swim and after some time they reproduce
  • the sharks eat fishes or swim and if they dont eat they die or after some time they reproduce
  • i stopped population at 7777 - overpopulation (ok a break of the real rules)
  • link to wikipedia Wa-Tor: http://en.wikipedia.org/wiki/Wa-Tor

click here to download file







mandelbulb_128x128x128.jpg

mandelbulbsmooth.jpg


link to forum

 





Irrlicht and libmini-library:

  • zola wrote a node for the terrainengine libmini (look thread), with his permission the download of the files direct from thread are below

click here to download file

  • a tutorial (with help from Stefan Roettger) how to create a new mesh every frame, you see the face of mars (zip-file for Windows below)

mars.jpg

click here to download file
















Want to get in touch? You can send me e-mail at:

zprogramming at yahoo dot de


















Favorite Links

IRRLICHT 3D-Engine

Polyvox Engine

Stefan Roettgers terrainengine libmini