Graphics Programs Reference
In-Depth Information
Figure 6.12 x-z rotation of multiple objects
There have been a few minor changes from the last example for presentation purposes.
The origin of the screen coordinate system is still located at the top middle of the Stage,
but the distance has been shortened to 400. There have been a few adjustments to the
path characteristics to fit conveniently on the Stage. The original values from the previ-
ous example are included as comments for reference.
1
2
3
4
5
6
7
8
9
10
11
12
13
// set the viewer distance d from the screen
var d:Number = 400;
// define the origin xo, yo of the screen coordinates
var xo:Number = Stage.width/2;
var yo:Number = 0;
// define the path characteristics
var xc:Number = 0; // xc = horizontal center of path
var yc:Number = -250; //-280 // yc = vert. center of path
var zc:Number = 50; // 0; // zc = depth center of path
var r:Number = 160; //200;// r = path radius
Search WWH ::




Custom Search