• Advertisement
Sign in to follow this  

3d coordinates

This topic is 4807 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

hi all, i've a 2d coordinate representing the position of the pixel in screen and would like to the corresponding 3d coordinate in the scene. how do i compute this ? thanks, boyd

Share this post


Link to post
Share on other sites
Advertisement
Hi kid.
Sounds a bit to "simple" too me,
2 dimensional has like it says 2 dimensions: X (horizontal) and Y (vertical).

When you want to convert them too 3 demensional, you need the third dimension (Z).

The answer to your question is not that difficult if you want to keep the coordinate's 2d (flat that this), or with a depth of 0 (just how you call it).

Just add a third value (Z) to your coordinates, for example 0.

I don't quite understand what your trying to do.

Share this post


Link to post
Share on other sites
You might want to research raytracing on the internet. Basically, you have to project a ray from the point of the camera through the pixel in question and then find which object it collides with first. This is all pretty well documented on the web, but I haven't done much serious research in it in the last few years.

Other posters: Any good links to ray/polygon intersection tutorials?



~BenDilts( void );

Share this post


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

  • Advertisement