|
|
|
< walk commands |
Turn Commands |
other commands > |
|
|
The 'turn' commands tell the turtle to rotate left or right
They can be used alone, in which case the turtle turns the angle-of-turn held in $>. For example this program... | > | ...draws two lines at right-angles to each other, because the default angle-of-turn is pi/2 radians (90 degrees). The turn commands can also be combined with other characters to change the angle turned. Each combination forms a single Tymless keyword:
For example: | >/2 | < | >=$pi/3 | <:1 | > | This program draws a chain of six lines, and turns alternately right and left between each one. The angle of turn varies in each case:
Two other commands related to turning are:
Both of these can be used in combination commands:
|
|
< walk commands |
other commands > |