hls-0.11: Haskell Lindenmayer Systems

LSystem.Turtle

Description

Standard Turtle graphics.

Synopsis

Documentation

data Turtle Source

Turtle.

Constructors

Turtle 

Fields

ta :: Double

turning angle

tai :: Double

turning angle increment

loc :: Pt

location

hdg :: Double

heading

ll :: Double

line length

ls :: Double

length scalar

stk :: [Turtle]

turtle stack

turnRight :: Turtle -> TurtleSource

Right turn by ta.

turnLeft :: Turtle -> TurtleSource

Left turn by ta.

turnBack :: Turtle -> TurtleSource

180 degree turn.

incrLine :: Turtle -> TurtleSource

Increment line length (ll) by multiplying by line scalar (ls).

decrLine :: Turtle -> TurtleSource

Decrement line length (ll) by dividing by line scalar (ls).

forward :: Turtle -> TurtleSource

Move loc of Turtle by ll on current hdg.

push :: Turtle -> TurtleSource

Push Turtle onto stk.

pop :: Turtle -> TurtleSource

Fetch Turtle from stk.

stepTurtle :: (t -> Pt -> Pt -> b) -> Turtle -> t -> (Turtle, b)Source

Given state processing function f, a Turtle and an initial state, step Turtle and state.