A Rimu Tutorial
Have you ever heard of turtle geometry?
Watch on tube.arthack.nz (opens in a new tab) or archive.org (opens in a new tab)
We could implement a Logo-inspired turtle game using Rimu, where kids could move turtles with code.
If we wanted to make a star (opens in a new tab):
- setwidth: 10
- setcolor: 4
- right: 18
- forward: 50
- $map: range(5)
each:
- right: 144
- forward: 50
- left: 72
- forward: 50
Then the output is a list of commands for the turtle to execute.
Now we might start to think about a better data model, how do we want users to describe their turtle actions?
Actions
Set
Rotate
Move
Example
- $type: "set"
width: 10
color: 4
- $type: "rotate"
right: 18
- $type: "move"
forward: 50