Notes:
Add an array of colors to arc (see TNTArc technology and you have a good ole rainbow, which students were always attempting to add manually; with a loop it is so much easier!
This shape was utilized in a TNT design: Random Kirby.
TNTRainbow Features and Usage:
| Primary Attributes: |
7 Parameters: |
|---|---|
| To Create: |
The examples above were created by:
var colors = new Array(white, pink, magenta, maroon, red, orange, brown,
darkFlesh, lightFlesh, gold, yellow, green, medGreen, lightBlue,
blue, purple, navy, indigo, violet, black);
var startAngle = 30;
var endAngle = 150;
var r = 3;
var R = 30;
var center = origin.translate(0, -10);
//TCAGraphic Objects
var rainbow = new TNTRainbow(center, startAngle, endAngle, r, R, colors);
rainbow.drawTNTRainbow(context);
var beeColors = new Array(black, gold, yellow, gold, black, gold, yellow, black);
var beeBody = new TNTRainbow(center, 110, 430, 4, 8, beeColors);
beeBody.drawTNTRainbow(context);
|
| To Draw: | rainbow.drawTNTRainbow(context); |
