instructor : Peter Gerstmann
student
: Scott Shelton [email]
task 02 | thursday, 0ctober 07, 2004
 

task02 swf file :



right-click to download task02 files :
FLA file
SWF file
task02 code :
#include "Canvas.as"

var c = new Canvas();

c.setBackgroundColor(.92, .92, .92);
c.setPenWeight(.001);

//Start Post-Iteration Day Progress

// farthest nearly white triangle

c.setPenColor(.99, .99, .99);
var a = 0;
var b = 0.5;
while(a < b) {
C.drawLine(a,b, b,a);
a+= .01;
}

// middle pink triangle
c.setPenColor(.95, .85, .85);
var a = 0;
var b = 0.75;
while(a < b) {
C.drawLine(a,b, b,a);
a+= .01;
}

// large front triangle - the white under coat
c.setPenColor(.99, .99, .99);
var a = 0;
var b = 1;
while(a < b) {
C.drawLine(a,b, b,a);
a+= .01;
}

// large front triangle - top pink lines
c.setPenColor(1, .75, .75);
var a = 0;
var b = 1;
while(a < b) {
C.drawLine(a,b, b,a);
a+= .02;
}

// Begin work from pre-iteration knowledge - obviously.
// each step adds 0.1 to each R,G,B in PenColor...
// each step subtracts .05 to each position until >= 0.5
// some lines in arrows 8 + 9 are eliminated for aesthetic purposes

// 1st & darkest arrow shape

c.setPenColor(.1, .1, .1); // color
c.drawLine(.9, .9, .7, .9); // -
c.drawLine(.9, .9, .3, .4); // diagonal
c.drawLine(.3, .4, .5, .4); // -
c.drawLine(.5, .4, .5, .05); // |

// 2nd arrow shape
c.setPenColor(.2, .2, .2); // color
c.drawLine(.85, .85, .65, .85); // -
c.drawLine(.85, .85, .25, .35); // diagonal
c.drawLine(.25, .35, .45, .35); // -
c.drawLine(.45, .35, .45, .05); // |

// 3rd arrow shape
c.setPenColor(.3, .3, .3); // color
c.drawLine(.8, .8, .6, .8); // -
c.drawLine(.8, .8, .2, .3); // diagonal
c.drawLine(.2, .3, .4, .3); // -
c.drawLine(.4, .3, .4, .05); // |

// 4th arrow shape
c.setPenColor(.4, .4, .4); // color
c.drawLine(.75, .75, .55, .75); // -
c.drawLine(.75, .75, .15, .25); // diagonal
c.drawLine(.15, .25, .35, .25); // -
c.drawLine(.35, .25, .35, .05); // |

// 5th arrow shape
c.setPenColor(.5, .5, .5); // color
c.drawLine(.7, .7, .5, .7); // -
c.drawLine(.7, .7, .1, .2); // diagonal
c.drawLine(.1, .2, .3, .2); // -
c.drawLine(.3, .2, .3, .05); // |

// 6th arrow shape
c.setPenColor(.6, .6, .6); // color
c.drawLine(.65, .65, .45, .65); // -
c.drawLine(.65, .65, .05, .15); // diagonal
c.drawLine(.05, .15, .25, .15); // -
c.drawLine(.25, .15, .25, .05); // |

// 7th arrow shape
c.setPenColor(.7, .7, .7); // color
c.drawLine(.6, .6, .4, .6); // -
c.drawLine(.6, .6, .05, .1); // diagonal
c.drawLine(.05, .1, .2, .1); // -
c.drawLine(.2, .1, .2, .05); // |

// 8th arrow shape
c.setPenColor(.8, .8, .8); // color
c.drawLine(.55, .55, .35, .55); // -
c.drawLine(.55, .55, .05, .05); // diagonal
c.drawLine(.15, .05, .15, .05); // |

// 9th arrow shape
c.setPenColor(.88, .88, .88); // color
c.drawLine(.5, .5, .05, .05); // diagonal
c.drawLine(.1, .05, .1, .05); // |
rock on. [email scott]