8 2D L-system turtles
(require lindenmayer/turtle) | package: lindenmayer |
lindenmayer/turtle provides support for 2D turtle graphics in L-systems.
Moves the turtle forward and draws a line.
If len is supplied, the turtles moves that distance (negative values move backwards). If len is not supplied, F checks for a variable named l and uses its value. Otherwise, it moves two steps forward.
Like F, but does not draw a line.
Rotates the turtle counterclockwise. It rotates by θ degrees if that variable is
defined, and by 90 degrees otherwise.
Like -, but rotates clockwise.
Set the turtle line drawing with. The default width is 1.
Save the current turtle state.
Restore the turtle to the state of the matching |[|.
procedure
(start variables) → turtles?
variables : hash?
Creates an initial, with the turtle facing
to the right.
Turns the given turtles into a pict.
parameter
(scale-final?) → boolean?
(scale-final? scale?) → void? scale? : boolean?
= #t
Determines if finish scales the resulting pict so that
it fits in a 300x300 rectangle.