The clue for your solution is to set a rotation for matrix and then multiply 
you vectors by it . Also why don't you look into as3dmod . I think you have got 
all you need there 

Sent from my iPhone

On Nov 25, 2010, at 2:42 PM, Darcey Lloyd <[email protected]> wrote:

> Hi,
> 
> I need some R&D on this but if anyone could assist. I am trying to rotate a 
> plane but with a twist effect.
> 
> So I thought, make 2 planes, 1 visible and 1 not visible with identical 
> number of segments and dimensions.
> Rotate plane 2 (the invisible 1 180 degrees + of the visible plane) then 
> tween each of it's vertices to match the invisible planes vertices. However I 
> find that:
> 
> p1.vertices[0] = new Vertex(-400, 0, -400)
> p2.vertices[0] = new Vertex(-400, 0, -400)
> 
> How is rotation calculated?
> 
> I know the above would just tween from point to point and give a messed up 
> effect, but once I get this working I was going to extend it to have a 1/2 
> circle sin/cosine equation to tween from p1.vertex[0].x,y,z to 
> p2.vertext[0].x,y,z
> 
> I did some googling and then ended up in c++ forums where matrix translations 
> went a tad over my head lol
> 
> In the Away3D examples there is the code - which applies a sin and cosine 
> wave to plane via its vertices.
>                               for (var x:int = 0; x <= plane.segmentsW; x++){
>                                       for (var y:int = 0; y <= 
> plane.segmentsH; y++){
>                                               plane.vertex(x, y).y = 
> 150*Math.sin(dist(x-plane.segmentsW/2*Math.sin(t/2000), 
> y-plane.segmentsH/2*Math.cos(t/9000))/2+t/200);
>                                       }
>                               }
> 
> I am trying to adapt this to create a plane flip that achieves this rotation 
> in a twist effect.
> 
> Any ideas?
> 
> 
> Thanks
> 
> Darcey
> 

Reply via email to