Notes:
Loops plus arrays of TNTColors yield a TNTPie! Study this code to see how to deal with arrays. Interesting effects play out if 'null' TNTStrokes are used for pie-segment dividers.
TNTPie Features and Usage:
| Primary Attributes: |
7 Parameters:
|
|---|---|
| To Create: |
The example above was created by:
var rainbow = new Array(red, orange,
yellow, green, blue, indigo, violet);
blackStroke.lineWidth = .8;
var n = rainbow.length;
var colorWheel = new TNTPie(origin,
15, 14, rainbow, blackStroke,
true, 10);
colorWheel.drawTNTPie(context);
|
| To Draw: | colorWheel.drawTNTPie(context); |
| Comments: |
Be sure to play with various settings for the TNTStrokes! Notice also what happens if you have 'x' slices and an array of colors that is less than x: the colors 'circle back' and repeat again. See an example at our Test Pattern Challenge. |
