🐢 2D Turtle Graphics Interpreter

A real Logo-style command interpreter — forward/turn/pen/repeat — drawn live on Canvas2D.

x 0
y 0
heading 0°
pen down
commands 0
step 0/0

Presets

Commands

Animate speed 60

Low = draws command-by-command slowly. High = near-instant.

Turtle state

Position0, 0
Heading0°
Pendown
Instructions0

Command reference

forward N / fd N — move & draw
back N / bk N — move backward
turn N / right N / rt N — rotate clockwise
left N / lt N — rotate counter-clockwise
penup / pu, pendown / pd
push / pop — save/restore state (branches)
home — reset to center
color #hex — change stroke color
repeat N [ ... ] — real loop, nestable