Archived

This topic is now archived and is closed to further replies.

Plotting a 3d point in 2d space

This topic is 5307 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 a plane defined in terms of 3 points in space (a,b,c). I have another point (d) that is on this same plane. What I am trying to do is basically plot d in 2d coordinates (which i''m assuming I can do since all points are on the same plane) using a as the origin, and b defining the X-axis, and c defining the Y-axis. I''m not sure if this is even possible, or how to begin going about this. If I have not provided enough information, I apologize... I''m not really sharp on this type of math. Is there a way I can go about doing this that is not incredibly heavy on the math? Any help anyone can provide would be greatly appreciated. Thanks in advance!

Share this post


Link to post
Share on other sites
Could you describe better your problem ?
do you eed to get the u and v componet form the plane equation ?


Share this post


Link to post
Share on other sites
Yes. I am trying to map a texture onto a polygon, and the texture is being described as being on a plane (a,b,c), with (a) being the top left of the texture, (b) being the top right, and (c) being the bottom left. (d) is a point on my polygon that i am trying to map this texture onto. so I am trying to solve to the u,v texture coordinates that i need to assign to point (d). Does this help at all?

Share this post


Link to post
Share on other sites
So, the way I see it, your U coordinate would be:

U = DotProduct(d - a, b - a)

And V would be:

V = DotProduct(d - a, c - a)

Some assumptions were made. First, I assumed that your texture's u direction is aligned with the plane's x axis, and the v direction is aligned with the plane's y axis. Second, I assumed that b-a and c-a are unit length. Or that they are scaled as necessary based on the texture scale. Third, I assumed that (u,v) = (0,0) sits at location a on the plane.

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

[edited by - grhodes_at_work on June 2, 2003 2:27:06 PM]

Share this post


Link to post
Share on other sites
All valid assumptions, Graham. Thanks for the help. It looks like that is generating the correct U,V coordinates for me. I appreciate the help, a lot!

Share this post


Link to post
Share on other sites