A cat-eared teacher holding a pencil

Draw with a turtle

Turtle GraphicsPlayground

Draw, turn, pick a color, and explore.

Onscreen joypad

Hold a button. Arrows or W A D do the same.

Up
forward 20
Left
turn 15°
Right
turn 15°
Down
pen up

Pen color

Tap a color. The pen goes down.

Turtle drawing area

Ready to draw

Tap forward, or type FD 100 and press Enter.

x 0 y 0

heading 0°

pen down · green

Command input

Type commands and press Enter. Shift+Enter adds a line.

Try one

Polar to cartesian

Heading 0° points up. Right turns go clockwise. A step of 20 from here moves:

x changes by 0 · y changes by 20

Math angle 90°. On a unit circle that point is (cos 0, sin 1).

Basic commands

FD N

Move forward N steps. BK N goes backward.

PU / PD

Pen up skips drawing. Pen down draws again. Down on the pad toggles.

LT N

Turn left N degrees.

RT N

Turn right N degrees.

PC C

Set the pen color by name or number. PC blue, PC 4, or PC 0 for black.

CLEAR

Wipe the page and send the turtle home.

Also: HOME, PW N for pen width, and REPEAT 4 [ FD 100 RT 90 ]. Inside REPEAT, REPCOUNT is the lap number.