Our 17-gon is going to be
multi-colored
so we need to utilize the capabilities in the "Turtle Colors'' area in
the Turtle Controller window. One can change the drawing color of
the turtle at anytime by clicking on one of the colors in the Color
Palette.
Additionally, one can change colors grammatically by specifying a table
of colors and then indexing through the table by the use of the two
symbols
` and '. They function as follows:
To construct a color table we make use of the Color Palette and the "Add Color" button in the "Turtle Colors'' area in the Turtle Controller window. Let's see how we would do this in the construction of a regular 17-gon.
We will not actually
construct the 17-gon using compass and straight-edge techniques as
Gauss did, but will "cheat" a bit by caculating the angle needed to
construct the 17-gon. This angle is 360/17 degrees or approximately
21.176471. We first define
a vector DE and a 21.176471 degree angle ABC as shown
below (if you need help with this refer back to the main page on Turtle
Geometry). Create a point F and a turtle at F.
Now, we will define a table
of colors
that the turtle can use to draw segments. We do this by using the Color
Palette in the lower left corner of the Turtle Controller window in
conjunction
with the "Add Color'' button of the Controller window. Click on one of
the blue colors in the Color Palette and then on the ``Add Color''
button.
The color will appear in the area above the ``Add Color'' button. Now
click
on a red color and add it to the color table. Fill out the rest of the
first row of four colors in the table with orange and green. Then, fill
out the rest of the table as you wish. Note that the table has a
maximum
of 16 colors.
This table will serve as an
indexed
color table for the ` and ' symbols as described above. To draw a
17-gon
we can use a sequence of 17 draw and turn commands as described by the
sentence F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F. We will also change color
at
each step by inserting a ` after each F, yielding
F-`F-`F-`F-`F-`F-`F-`F-`F-`F-`F-`F-`F-`F-`F-`F-`F.
The turtle will then move
forward one index in the color
table each time it reads the ` symbol. Type in
F-`F-`F-`F-`F-`F-`F-`F-`F-`F-`F-`F-`F-`F-`F-`F-`F
in the axiom box in the Turtle Controller, Type in 0 in the rewrite
level
box and hit return. Then, hit the Turtle Interpret button to get a
multi-colored
17-gon. You may have to move F or shrink DE to keep the polygon in view.