Set turtle's X or Y coordinate
setx x
sety y
Moves a turtle to the position with changed one of the coordinates, x or y. If the turtle's pen
is down then the turtle draws a line.
Example:
pu
setxy 100 0
pd
setpc "blue
repeat 19 [
setxy
100 * cos 20 * (repcount-1)
100 * sin 20 * (repcount-1)
]
setpc "orange
repeat 19 [
setx 100 * cos 20 * (repcount-1)
sety 100 * sin 20 * (repcount-1)
]
Output: a drawing in the graphics window.
See also:
Table of Content