Jump to content
  • Advertisement
Sign in to follow this  
usman1266

How to Find 4 point of plane in 3D

This topic is 3088 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
Are you using DirectX, OpenGL or some matrix library? What is the plane's normal?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
A plane is always 2D, I'm confused by what you mean with that. What do your yaw, pitch and roll represent?

Share this post


Link to post
Share on other sites
Yaw pitch roll for rotation.Plane move with respect to xyz and rotation yaw pitch roll.Yes plane is always in 2d.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!