Jump to content
  • Advertisement
Sign in to follow this  

Transform 2D shapes on a 3D plane

This topic is 4070 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 am trying to find a way to put a 2D shape (say, a circle) on an arbitrary 3D plane. I have the plane's distance D and normal vector N. Right now my solution is to choose a "base" vector B (for example (0,1,0)), calculate the cross product B x N = X, the angle between the vectors Alpha = arccos(B dot N), then create a quaternion from X and Alpha. Rotate all 2D points (treating them as 3D ones, for example x,y,0), move them to the point D * N, finished. Now, I think there is an easier way, but I cant find it. Any ideas? EDIT: Stupid me. There are other ways to describe a plane than using the ABCD form. Parametric representation solves my problem. :)

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!