- #1

- 409

- 0

"

All measurements are assuming that the pixel width/height is one)

Let fov = the field of view, you can decide how much field of view your user will have from the target viewing point. For example, if you look at your screen and say that there is 30 degrees between the edges of your screen from the target viewing area, then 30 is your fov.

Let d = (screen width / tan(fov)) to the nearest integer.

Given the 3D point [x,y,z]

Your 2D point is [x * d/z, y * d/z] where z is the pixels from 0 being the screen to 1000 being A kilometer away from your screen (of course, all virtually) Here's in example:

Let my screen be 20 pixels wide.

Make a V with my hands by placing my palms together, point the edges of my hands to the edges of my screen as shown on my computer monitor, and estimate the angle to be thirty degrees (Of course this will be different with different monitors, so there should be a suggested monitor width) Then:

d = 20 / tan 30 ~= 35 (This should be pretty close to the actual distance the user is from the screen!)

Now, Given the point [x,y,z]

My 2D point is [x * 35 / z, y * 35 / z]

"

Will this work or does it have any limitations?

Thanks

AL