- j2e – j2code – LOGO
- Start with: reset setpensize 4
SQUARE
- Draw a square using the repeat command
SQUARE with VARIABLE
- To make a spiral, we need to increase the length each time it repeats.
- To do this we will make a variable called “length” that we can control.
- Before the square code, type: make “length 30
- Replace your fd 40 by fd :length
- Try your code – try changing the number after make “length to make different sized squares.
SPIRAL
- Start with make “length 30
- Inside the repeat brackets put the following line:
- make “length :length +10
- NOTE the difference between “len and :len (“len is for changing it; :len is for using/calculating with it)
- Increase the number of repeats
What variations can you create? Save different versions for each one you do.