Advertisement

Perspective math

Started by February 05, 2004 09:50 AM
11 comments, last by Tree Penguin 21 years, 1 month ago
I went away for a few hours and what i came up with whas that i was doing this:



instead of:



So i didn't get the right angles.
(i doubt it but if this is incorrect, tell me )

[edited by - Tree Penguin on February 6, 2004 12:11:28 PM]
When trying to understand perspective, I find that FoV is only confusing. FoV is a consequence of perspective rather than an integral part of it. FoV also implies symetrical frustum, which is just a special case of frustum.

If you want to know how big an object appears at a distance, you must consider on what it appears. When working on a computer, this should generally be the computer screen. If you have the z-plane parpendicular to the screen plane (projection plane), the position of a point is simply: (point_x) / (point_z) * (screen_y)
Point ---->   o (-7,-7)                                                                  \ (-3,-3)Screen --->  ------\-------                                         Eye ------>           o (0,0) 
Think about looking out a window, where a point on the other side appears on the window's plane. The same forumla is also good if you want to know the apparent size of an object: (object_size) / (object_z) * (screen_y)

EDIT: Sorry for the diagram; after the first edit it refuses to get rendered correctly. Good to see that you solved it anyway.

[edited by - CWizard on February 6, 2004 12:38:36 PM]
Advertisement
Thanks, but that's not my problem anymore, the problem i still had was getting screen coordinates to projected opengl coordinates, in which i did wrong what i described. You can see this topic as solved .


EDIT: what i meant with FOV was the circle that is at an angle of the value i call FOV, the angle of the sides of the viewing frustum.

[edited by - Tree Penguin on February 6, 2004 12:38:09 PM]

This topic is closed to new replies.

Advertisement