- turtle art
| Primitive | Alt | Action |
|---|---|---|
|
Set
X
x
Set Y y SetXY x y Set Position [x y] Home |
SetPos |
Move turtle to horizontal position x.
Move turtle to vertical position y. Move turtle to position (x y). Move turtle to position (x y). Move turtle to home position (0 0), heading 0. |
|
Set
Heading
h
Set PenWidth w Set PenShape n |
SetH
SetPW SetPS |
Set
turtle
heading
to h degrees, (cwise from North).
Set width of pen nib to w pixels. Set shape of pen nib to 0 (square) or 1 (round). |
|
Window
Wrap Fence Perspective |
Turtle can move beyond the screen
window
edges.
Turtle wraps from screen edge to the opposite side. Error message if turtle will move beyond the screen edge. Turtle moves in 3D space. (see Perspective ) |
|
|
Circle
r
Arc r h1 h2 Dot [x y] |
Draw
circle
of radius r steps. *
Draw arc of radius r, from heading h1 cwise to h2. * Draw dot at position (x y) in pen color, shape and size. * |
|
|
Fill
FillZone FillPolygon [list] |
Fill all neighbouring pixels of same color with pen color.
As Fill, but until pen colored pixels are reached. Fill shape defined by instructions in list. |
|
|
LoadImage
[list]
SaveImage "name |
LI
|
Load
image file specified in list and place upper left corner at turtles position. (file format .png or .jpg)
Save drawing area as name.png file. |
|
Distance
[x y]
Towards [x y] |
Return
distance
of turtle from point (x y), steps. *
Return turtle heading if turned towards (x y), degrees. * |
Underlined
Set
can be removed from a primitive name in order to return information.
eg.
SetHeading
sets the heading of the turtle.
Heading
returns the heading of the turtle.
* turtle position and heading remain unchanged.
Note