Logo Interpreter

I have finished the first version of my logo interpreter, using javacc and jjtree.
Check it out below.

All programs must start with the word Program and the other commands are illustrated here:


Program
MAKE :NS 5
MAKE :a 30
TO drawPoly :numSides, :sideLength
RPT :numSides [FD :sideLength RT (360/:numSides)]
END
drawPoly :NS+1, :a*2


Click to open the jjt file

Click to download the full sources

Old stuff with flash – AS2 3d stuff

Get Adobe Flash player

Get Adobe Flash player

Get Adobe Flash player

Old stuff in flash…

Get Adobe Flash player

Old stuff with flash…

Phase plane diagrams

Get Adobe Flash player

Get Adobe Flash player

Old stuff with flash…

The 17 plane symmetry (wallpaper) groups

Draw on the red shape and the images under each group are shown.

Get Adobe Flash player

Old stuff with flash…

Some work I did years ago in AS2

L systems

L systems are a formal grammar (whatever one of those is) invented by Lindenmayer to study the structure of plant growth. Loosely speaking an L system is specified by a re-writing rule, which gives a string of letters to replace a given letter by. Starting with a single letter F (meaning one step forwards) and replacing it by the string gives a new longer string of letters, which encodes the shape of Plant 1 (1st generation). Feeding this string back and doing the replacement on that gives a more complicated longer string, encoding the information for Plant 2.

Repeating this procedure can give a realistic looking fractal plant structure, although my flash program cannot cope with more than 3 iterations except for simple replacement strings.

Information about what the letters stand for still needs to be done.

Enter your replacement string in the box provided, choose the number of iterations and the angle of bend of the branches.
Then click ‘draw’and rotate the plant with the mouse.

Or just check out the presets.

Get Adobe Flash player

Flip book engine

Flip book engine

Flip book engine

Flip book engine

Flip book engine

Return to Mechania

Return to Mechania

Return to Mechania

Return to Mechania

Return to Mechania

Test swf


Get Adobe Flash player

Create your own gear trains!

Drag different sized gears/cogs onto the board, connect a motor and choose the speed. How do the speeds of the cogs (in rpm) depend on the number of teeth they have?

Download files (AS2) cogs.zip

johngrindall.com © 2010
brought by WordPress Themes