Draw a line

line point
(line p1 p2)

Draws a line from the turtle position to the point. The point can be 2-element array or list of (x; y) coordinates; also another turtle can be used as an argument of the instruction. If version with two arguments is used then the line between these points is drawn.

Example:

repeat 18 [
  line array
  100 * cos 20 * repcount
  100 * sin 20 * repcount
]

Output: drawing in the graphics window.

See also:

Table of Content