Investigating a Spiral Sequence.

The spiral sequence is constructed as follows.

  1. Draw a square. (You could use 1 square in your exercise book.)
  2. Draw in one of the diagonals.
  3. Now construct a square which has this as one of its sides.
  4. Carry the process on for several more squares such that they spiral around the origin.

Challenge

Tell me as much as you can about the properties of this spiral.



Logo Investigation

This a procedure which will draw the basic spiral shape. These commands can just be typed or pasted into the command line.
Squares sets the number of squares to draw and size set the edge of the initial square. The last part of the code must go in as one long command.

make "size 20
make "squares 5
cs ht repeat :squares [ repeat 4 [fd :size rt 90] rt 45 make "size :size*sqrt 2]

Or you can write a procedure to do the job.

to bwsqsp :size :number
repeat :number [
repeat 4 [fd :size rt 90] rt 45 make "size :size*sqrt 2
]
end

This is called using the command.

cs ht bwsqsp 40 6

Investigation Ideas

Get Logo to print out the value of :size (the edge of the squares).
You could also print out the area of each square too.
What is the connection to binary numbers?
How could you adapt the code to display base 10 numbers as coloured snail shells?


Last modified 9th may 2007