Java Turtle samples

Samples to the com.lrdev.turtle Java Turtle code.

Pentagon zeroth and first order, heptagon zeroth, first and second order:

[screen shot(s) (unscaled)]
[StringTurtleApplet polygons]

[applets (scaled, centered)]
[applet 5.0] [applet 5.1] [applet 7.0] [applet 7.1] [applet 7.2]

Turtle code for the pentagons and heptagons above:

repeat 5 [forward 20 repeat 0 [right 360/5] forward 20 repeat 1 [left 360/5]]
repeat 5 [forward 20 repeat 1 [right 360/5] forward 20 repeat 2 [left 360/5]]
repeat 7 [forward 20 repeat 0 [right 360/7] forward 20 repeat 1 [left 360/7]]
repeat 7 [forward 20 repeat 1 [right 360/7] forward 20 repeat 2 [left 360/7]]
repeat 7 [forward 20 repeat 2 [right 360/7] forward 20 repeat 3 [left 360/7]]

The first expression can of course be expressed in a simpler way as "repeat 5 [forward 40 left 72]". The former has been chosen to preserve symmetry in the generating expressions.

Interactive polygons of different orders:

[larger]

[applet]
[applet]

Get the focus on the applet [possibly by clicking the applet above with the pointing device], then type for interactive usage:

Interactive Turtle applet:

[screen shot]
[InteractiveTurtleApplet fL+36]
fL+ repeated 36 times

[larger]

[applet]
[applet]

Get the focus on the applet [possibly by clicking the applet above with the pointing device], then type for interactive usage:


Eric Laroche, laroche@lrdev.com / Fri Dec 27 2002 .. Sun Feb 16 2003