Handbook
Glossary
L-parser-dialect ( -- commands )
Vocabulary
L-system
Inputs
None
Outputs
commands
an
object
Definition
USING:
accessors
kernel
math
sequences
;
IN:
L-system
:
L-parser-dialect
( -- commands )
{
{
"+"
[
dup
angle>>
turn-left
]
}
{
"-"
[
dup
angle>>
turn-right
]
}
{
"&"
[
dup
angle>>
pitch-down
]
}
{
"^"
[
dup
angle>>
pitch-up
]
}
{
"<"
[
dup
angle>>
roll-left
]
}
{
">"
[
dup
angle>>
roll-right
]
}
{
"|"
[
180.0
rotate-y
]
}
{
"%"
[
180.0
rotate-z
]
}
{
"$"
[
roll-until-horizontal
]
}
{
"F"
[
dup
length>>
draw-forward
]
}
{
"Z"
[
dup
length>>
2
/
draw-forward
]
}
{
"f"
[
dup
length>>
move-forward
]
}
{
"z"
[
dup
length>>
2
/
move-forward
]
}
{
"g"
[
dup
length>>
sneak-forward
]
}
{
"."
[
polygon-vertex
]
}
{
"["
[
save-turtle
]
}
{
"]"
[
restore-turtle
]
}
{
"{"
[
start-polygon
]
}
{
"}"
[
finish-polygon
]
}
{
"/"
[
1.1
scale-length
]
}
{
"'"
[
0.9
scale-length
]
}
{
";"
[
1.1
scale-angle
]
}
{
":"
[
0.9
scale-angle
]
}
{
"?"
[
1.4
scale-thickness
]
}
{
"!"
[
0.7
scale-thickness
]
}
{
"c"
[
dup
color>>
1
+
color-table
length
mod
set-color
]
}
}
;