ContentsIndex
LSystem.Command
Description
Turtle Command and LSystem types.
Synopsis
data Command
= Forward
| Jump
| ScaleLength Float
| ScaleAngle Float
| TurnLeft
| TurnRight
| ColorStep Int
| Save
| Restore
| Repeat Int Command
| Var String
type Axiom = [Command]
type Rule = (Command, [Command])
type Distance = Float
type Angle = Float
type Length = Float
type LSystem = (String, Angle, [Command], [(Command, [Command])])
Documentation
data Command
Turtle Commands.
Constructors
ForwardMove the turtle forward, drawing a line.
JumpJump the turtle forward, not drawing a line.
ScaleLength FloatScale the current draw distance.
ScaleAngle FloatScale the current turn step
TurnLeftTurn the turtle left by the current turn step.
TurnRightTurn the turtle right by the current turn step.
ColorStep IntIncrement the colormap index by the given amount (+ve or -ve)
SaveSave the current turtle state.
RestoreRestore the current turtle state.
Repeat Int CommandRepeat this command the given number of times.
Var StringA variable.
show/hide Instances
type Axiom = [Command]
An axiom is a list of commands.
type Rule = (Command, [Command])
A rule is a variable bound to a list of commands.
type Distance = Float
type Angle = Float
type Length = Float
type LSystem = (String, Angle, [Command], [(Command, [Command])])
The LSystem type.
Produced by Haddock version 0.7