๐ Step-by-Step Tutorials
Tutorial 1: Your First Square
PENDOWN
REPEAT 4 [
FORWARD 40
RIGHT 90
]
Explanation: Draw 40mm line, turn 90ยฐ, repeat 4 times = square!
Tutorial 2: Hexagon
PENDOWN
REPEAT 6 [
FORWARD 30
RIGHT 60
]
Formula: For N-sided polygon, turn angle = 360รทN degrees
Tutorial 3: Circle Basics
# Simple circle
PENDOWN
CIRCLE 25
Draws a 25mm radius circle from current position
Tutorial 4: Creating Holes (Washer)
# Outer circle
PENUP
HOME
SETHEADING 0
FORWARD 20
SETHEADING 90
PENDOWN
CIRCLE 20
# Inner hole
PENUP
HOME
SETHEADING 0
FORWARD 8
SETHEADING 90
PENDOWN
CIRCLE 8
Key: Larger shape = outer, smaller shape inside = hole!
Tutorial 5: Star Outline
PENDOWN
REPEAT 5 [
FORWARD 40
RIGHT 144
FORWARD 20
LEFT 72
FORWARD 20
]
PENUP
HOME
Creates a 5-pointed star by alternating between outer and inner points
Tutorial 6: Custom Position
# Draw triangle at specific location
PENUP
SETXY -20 10
SETHEADING 0
PENDOWN
REPEAT 3 [
FORWARD 30
RIGHT 120
]
Use SETXY to position shapes anywhere on the canvas
Tutorial 7: Nested REPEAT
# Create a flower pattern with nested loops
PENDOWN
REPEAT 6 [
# Each petal
REPEAT 4 [
FORWARD 10
RIGHT 90
]
# Rotate to next petal
RIGHT 60
]
Nested loops: Outer loop creates 6 petals, inner loop draws each petal as a square