Basic: Papervision3D , Plane and Movieclip Meterail

This is my first Papervision3D. I am starting to learn papervision3d. Download the source if you want to start with Papervision3D:

Uh! sorry Blogger not allow to upload . so please let view the very summary code as below:

package
{
import flash.display.Bitmap;
import flash.display.GradientType;
import flash.display.Graphics;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.Event;
import flash.geom.Matrix;
import org.papervision3d.materials.ColorMaterial;
import org.papervision3d.materials.MovieMaterial;
import org.papervision3d.objects.DisplayObject3D;
import org.papervision3d.objects.primitives.Plane;
import org.papervision3d.view.BasicView;

import AssetManager;

/**
* ...
* @author Ratha
*/
public class Main extends BasicView
{
private var plane:Plane;

public function Main():void
{
super(640, 480);
gradBg();

var mc1:MovieClip = new MovieClip;
var imgClass:Class = AssetManager.MyImg;
var img:Bitmap = new imgClass as Bitmap;
img.smoothing = true;
mc1.addChild(img);

var mat:MovieMaterial = new MovieMaterial(mc1, true, true, true);
mat.smooth = true;
mat.doubleSided = true;
plane = new Plane(mat, 351, 487, 4, 4);
scene.addChild(plane);
camera.zoom = 100;
startRendering();

addEventListener(Event.ENTER_FRAME, makeItMove);
}

private function gradBg():void
{
var g:Graphics = this.graphics;
var gMat:Matrix = new Matrix;
gMat.createGradientBox(this.width, this.height, ( -90 * Math.PI/180)) ;
g.beginGradientFill(GradientType.LINEAR, [0x000000, 0xffffff], [100, 100], [0, 255], gMat);
g.drawRect(0, 0, this.width, this.height);
g.endFill();
}

private function makeItMove(evt:Event):void
{
plane.rotationY += 2;
}

private function init(e:Event = null):void
{

}

}

}

p1

AS3: Short statements

Call function

this[shapes[currentShape]]();

Meaning:
shapes is array of function.
exp: shapes[currentShape] = "drawingLine"
so it mean drawingLine();

Object Name

this['ship' + i]

Meaning:
this is current object. there object named ship1, ship2, ship3, ship4
so in for loop, when i = 2 , it means calling to object ship2.

p1

Width and Hieght of Rectangle that fill the Area of inner oval


I don't have the detail formula. I just get the answer by experiment drawing Oval and Rectangle. I measure the width of oval and width of rectangle, then I got the answer as below:

wRec = wCir / 1.41
hRec = hCir / 1.41

It is useful when we want to add the textbox area to an oval without make text show out of the oval.

p1