module Glilis:sig
..end
type
pos = {
|
mutable x : |
|
mutable y : |
|
mutable d : |
type
color = {
|
r : |
|
g : |
|
b : |
|
a : |
type
orders =
| |
Forward |
| |
Forward' |
| |
Turn |
| |
Save |
| |
Restore |
| |
Color |
val orders : (string * (orders * int)) list
type 'a
turtle = {
|
get_pos : |
(* |
Get the curent position of the turtle.
| *) |
|
get_color : |
(* |
Get the curent color of the turtle.
| *) |
|
turn : |
(* | turn a turn the turtle by a degrees. | *) |
|
move : |
(* | move ~trace d will move the turtle by d unit.
A line should be traced only if trace is true.
It's up to the graphical implementation to respect this. | *) |
|
save_position : |
(* |
Save the position of the turtle in the stack.
| *) |
|
restore_position : |
(* |
Restore the position of the turtle from the stack.
Raises Empty_Stack if the stack is empty. | *) |
|
color : |
(* |
Apply a color for the next drawings.
| *) |
|
handle_lsys : |
(* |
Take a function with drawing side effects, handle the bureaucracy before executing it.
| *) |
val turtle : unit -> unit turtle
LisCairo
and LisTyxml
for use examples. See Glilis.turtle
for methods documentation.val transform_rhs : 'a turtle -> string -> ('c -> float) array -> 'c -> unit
Lilis.Engine.map_crules
to use Lilis.Engine.eval_iter_lsys
.val transform_lsys : 'a turtle ->
(string * 'b) Lilis.lsystem ->
(('c -> float) array -> 'c -> unit) Lilis.lsystem
Lilis.Engine.eval_iter_lsys
.