PV3D and FLAR couldn’t achieve to solve… 

Software: Away3D 4.x

Erdem Köymen, Newbie
Posted: 23 September 2011 06:22 PM   Total Posts: 1

Hi Everyone!

I tried to code an Augmented Reality application with flartoolkit and PV3D. In my application I tried to locate a DAE model to markers plane according to my mouse click. For this, I use the “unprojected methot” to get intersection point of my mouse click and the plane. But for getting the intersection point I needed to get the normal of the plane as seen on this codes:

var ray:Number3D = flarCamera3D.unproject(mouse.x,mouse.y);
var p:Plane3D = new Plane3D();
var normal: Number3D = I DONT KNOW HOW TO FIND??
p.setNormalAndPoint(normal, markerPosition);
var intersect:Number3D = p.getIntersectionLineNumbers(flarCamera3D.position, ray);


But I could’nt achieve to get the normal of the plane. So I decided to observe AWAY3D. Can I find the normal vector of this plane with AWAY3D?

Thanks alot.
Erdem.

   

Avatar
Alejandro Santander, Administrator
Posted: 23 September 2011 10:04 PM   Total Posts: 414   [ # 1 ]

I believe this is what you’re looking for: http://blog.inspirit.ru/

Eugene is a master at computer vision and augmented reality and many of his articles have source code. I’m quite sure he uses Away3D 4.x for his latest experiments.

   

Richard Olsson, Administrator
Posted: 24 September 2011 01:27 PM   Total Posts: 1192   [ # 2 ]

If all you need to do is to find the normal of a plane, you can just calculate it using the cross product of two of the plane’s vertices, using a third as reference.

normal = (v2-v0) x (v1-v0)

This is a standard equation to calculate a face’s normal vector. Since a plane is flat, the normal of the entire plane is parallel to the normals for the individual faces.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X