Jump to content
  • Advertisement
Sign in to follow this  
McGrane

Understanding Perspective Devide

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

**Divide** :/

 

Hi,

 

Im hoping someone can help me out here, Im blowing the dust off my maths knowledge, the little that there is tongue.png
I know that an understanding of the maths behind the perspective divide isint really needed, but I found it interesting, but unfortunatly I have got stuck on something basic, and while I am awating the maths book I have bought off amazon ( taking 3 weeks longer to come from america, but strangly still €30 cheeper smile.png ) I tought i could ask here.

 

I am currently following along a great guide here:

http://unspecified.wordpress.com/2012/06/21/calculating-the-gluperspective-matrix-and-other-opengl-matrix-maths/

 

I can follow along with this:

tan( fovy / 2 ) = y / -z
y               = tan( fovy / 2 ) x -z

( Nothing compliticated.. Its the next jump I dont understand )

 

We can simplify the following maths if we define:

f =  1 / tan( fovy / 2 )
then
y = -z / f

Now from what I have read, the 1/tan is the cotangent of the angle, but im just not sure how the tan of an angle multiplied to -z, is the equivalant to -z divide cotangant of angle.

 

This may make perfect sense to others, but as someone who had never heard of a cotangent before .. it was a bit confusing tongue.png

 

From what i under stand, the cotangent is just cos flipped. I have tried looking up some trig to help me along, but I cant seem to find what relates here, Im either getting too basic trig, or jumping onto what i would consider advanced.

 

If someone could point me in the right direction, i would appreciate it

 

Thanks

Edited by McGrane

Share this post


Link to post
Share on other sites
Advertisement

Thanks Diego,

 

That's quite easy to follow, and makes sense. And from your mention of known property, I know have something to research for helping me with the rest of the article. And as an added bonus, I have received a call to say my book has arrived 3 weeks early.. Good day all around :D

 

Thanks again !

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!