# 3d coordinates

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

## 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 on other sites
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 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 );

• 10
• 17
• 9
• 13
• 41