How to Find 4 point of plane in 3D

Started by
9 comments, last by usman1266 13 years, 9 months ago
I Have Plane which have 4 points,I want to find the new position of 4 points after apply transformation and rotation with these values.(x,y,z,yaw,pitch,roll).any one tell me how to find these point i want to implement in c++.

--------------------------------------
USMANWEB
Advertisement
Are you asking how to apply a matrix transformation?
Yes,But problem is that i only know one point of rectangle from this point i want to know all other points
In this Image example i know one point which have values

x=12 y=3 z=4 yaw=120 pitch=60 roll=20

I want to find all other 4 points,i know the height and width of plane 12cm X 12 cm.



--------------------------------------
USMANWEB.COM
Are you using DirectX, OpenGL or some matrix library? What is the plane's normal?
No I use simple c++,My requirement is i don't want to use any library opengl or directx.I need these four points,and the plane is simple 2D.
A plane is always 2D, I'm confused by what you mean with that. What do your yaw, pitch and roll represent?
Yaw pitch roll for rotation.Plane move with respect to xyz and rotation yaw pitch roll.Yes plane is always in 2d.
Quote:Original post by usman1266
Yaw pitch roll for rotation.Plane move with respect to xyz and rotation yaw pitch roll.Yes plane is always in 2d.


So the plane has a normal. Right now you have too little information to do any calculations with. One point does not define a plane, you need a normal for the plane as well. You can read up a bit on planes here.
Quote:Original post by usman1266
Yaw pitch roll for rotation.Plane move with respect to xyz and rotation yaw pitch roll.Yes plane is always in 2d.


For Yaw/Pitch/Roll to make sense you need a starting orientation atleast, you need to define which axis represent forward, up and right and you need to specify the order in which those transformations are applied and also if you are doing your rotations based on the world axis or the objects local axis.

Also , a plane doesn't have 4 points, (What you seem to want is a rectangle that lies in a plane) , you need more information to create a rectangle than a plane (There is an infinite number of different rectangles you can place in exactly the same plane)
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!
Here's how I understand the set-up:

We have a rectangle in the X-Y plane (maybe X-Z plane, I don't know) with side lengths 12x12. We want to apply a transformation to it given by the position of the mid-point of one side and the yaw, pitch, and roll the plane create relative to it's original position. Probably yaw, pitch, and roll are just rotation around Z, Y, and X axes, respectively.

So setup the for points where the mid-point of one side is the origin. So, (-6,0,0), (-6,12,0), (6,12,0), and (6,0,0). Transform these by the appropriate matrix and the OP gets the final points.

Of course, much of this is guesswork since the OP was rather vague.

This topic is closed to new replies.

Advertisement