Visual Math
Turtle Geometry
Write Logo-style turtle programs, replay the drawing process, and inspect coordinate geometry with shareable visual state.
Scratchpad (not saved)
Save to create a persistent, shareable workspace.
Turtle Viewport
Pan to inspect geometry, pinch or wheel to zoom, and replay the program action by action.
Program Summary
- Actions
- 0
- Procedures
- 0
- Segments
- 0
- Last Output
- None
- Turtle Position
- (0.00, 0.00)
- Heading
- 0.0°
Active State
Semantics
- `HOME` resets both position and heading, matching classic turtle behavior.
- `CS` clears the drawing history and returns the turtle to HOME.
- `SETHEADING 0` points up, `90` points right, `180` points down, and `270` points left.
- Reporter procedures can be used inside expressions, for example `FD DOUBLE 5`.
- Use the Help drawer for runnable examples; the page-level reference book sits below the workspace.
Reference Book
Turtle Geometry
The Computer as a Medium for Exploring Mathematics
Harold Abelson and Andrea diSessa · MIT Press
A canonical reference for Logo-style turtle commands, recursive drawing, and geometry by program.
View BookTurtle Geometry Help
Controls
REPEAT, TO ... END, and MAKE to build more complex programs.Replay Build or the playback slider to step through the drawing sequence command by command.Movement
FORWARD n / FD n: move forward n turtle steps.BACK n / BK n: move backward n steps.SETX n: move to an absolute x coordinate.SETY n: move to an absolute y coordinate.HOME: move to (0, 0) and point the turtle straight up.Rotation
RIGHT n / RT n: rotate clockwise by n degrees.LEFT n / LT n: rotate counter-clockwise by n degrees.SETHEADING n / SETH n: set an absolute heading where 0 is up.Pen And Screen
PENDOWN / PD: draw while moving.PENUP / PU: move without drawing.CLEARSCREEN / CS: clear the drawing and reset to HOME.Procedures And Variables
TO name :arg ... END: define a procedure with zero or more inputs.REPEAT n [ ... ]: run a block n times.IF [condition] STOP: halt the current procedure when the condition is true.MAKE "NAME value: assign a numeric variable.OUTPUT value / OP value: return a numeric result from a procedure.Suggested Examples
Square
The basic Logo square using a repeat loop.
REPEAT 4 [ FD 10 RT 90 ]
Procedure Spiral
Procedure, variable, and IF STOP working together to stop a spiral.
TO SPIRAL :SIZE IF [:SIZE > 30] STOP FD :SIZE RT 89 SPIRAL :SIZE + 1 END CS SPIRAL 2
Coordinate Frame
Absolute moves with SETX and SETY.
CS PU SETX -15 SETY -10 PD SETX 15 SETY 10 SETX -15 SETY -10 HOME
Reporter Procedure
OUTPUT used to report a value back into a movement command.
TO DOUBLE :N OUTPUT :N * 2 END MAKE "SIDE 6 REPEAT 4 [ FD DOUBLE :SIDE RT 90 ]