Datasheet

26
Part 1: Getting Started
You must orient the planes to the correct angles so that they uniformly hug the sphere as shown in
Figure 1.11.
plane.rotationX=phiTilt[i];
plane.rotationY=-j*thetaStep[i];
For this particular example the vectors for the plane positions and angles were obtained from Flash &
Math ( http://www.flashandmath.com/ ).
Figure 1-11
As in the previous example, you use the z - sorter and
mouseX displacement algorithm code to sort the
rectangles correctly in depth and move the entire container using the
rotationY method.
The complete image ball code is listed below:
//imports sprite and stage class
import flash.display.DisplayObject;
import flash.display.Sprite;
import flash.display.Stage;
import flash.geom.Vector3D;
//Add Particle Array
var particles_ary:Array = [];
var myDisplayObject:Sprite= new Sprite();
//Image Ball Parameters
//Parameters adapted from Flash & Math
// http://www.flashandmath.com/
var jLen:Vector. < Number > =new Vector. < Number > ();
jLen=Vector. < Number > ([1,6,10,12,10,6,1]);
var thetaStep:Vector. < Number > =new Vector. < Number > ();
thetaStep=Vector. < Number > ([0,60,36,30,36,60,0]);
c01.indd 26c01.indd 26 12/14/09 3:03:32 PM12/14/09 3:03:32 PM