Pen, Colour and Fill
The turtle carries one pen, and you are in charge of it. You can lift it to move without leaving a line, make it thick or thin, change its colour, and tell it to fill shapes in solidly instead of drawing only the outline.
π‘ The idea
The pen has settings: a colour, a width, up or down, and fill on or off.
- penup lifts the pen. pendown puts it back. Use them to move without a trail.
- width 1 is a thin line and width 20 is very fat.
- fill on means shapes come out solid. fill off goes back to outlines.
- A filled shape uses the pen colour, so set the colour first.
- colour rainbow changes the colour a little with every line you draw.
π Words to know
- pen
- the tool the turtle draws with
- fill
- colour a shape in solidly
- outline
- only the edge of a shape
π Watch this
A solid green circle on the right, and beside it a blue square that is only an outline.
colour green fill on circle 40 fill off penup goto -130 -45 pendown colour blue square 90
βοΈ Your turn
- Run it and spot the difference between the two shapes.
- Move fill off to the very end and run it again. Now both are solid.
- Delete the penup line and see the stray line that appears.
- Add width 8 at the top.
- Fill a star: colour yellow, fill on, star 80.
π― Challenge: Draw one filled red square, and beside it a red square that is only an outline.
Show me one answer
colour red fill on square 70 fill off penup goto -110 0 pendown square 70
Your program