Jump to content
• Advertisement

#### Archived

This topic is now archived and is closed to further replies.

# perspective projection problem

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

say I have a straight line in world space,and now I use perspective projection to project it onto the projection plane,then the shape I''ll get on the projection plane is of course still a strait line,but if you take a look at the math,there''re some problems(d is the viewing distance or the projection plane''s Z value,Xper and X denote the X coordinate in perspective space and world space respectively): since Xper = dX/Z -->X = ZXper/d, Yper = dY/Z -->Y = ZYper/d, and because Y=kX+b in world space,we plug the above X,Y in: ZYper/d=kZXper/d+b -->Yper=kXper+bd/Z which means Yer is not linear with Xper(because of the 1/Z),then the shape we got on the projection plane isn''t a straight line?

#### Share this post

##### Share on other sites
Advertisement
Ah,I know where goes wrong.I didn''t take into consideration that X,Y,Z''s relationship are regulated by the 3D line''s equation.Say X=aZ+b,Y=pZ+q,then I have
Xper=dX/Z=da+db/Z
Yper=dY/Z=dp+dq/Z
thus Xper and Yper are linear.

#### Share this post

##### Share on other sites

• Advertisement
• Advertisement

• ### Popular Contributors

1. 1
2. 2
Rutin
21
3. 3
4. 4
frob
18
5. 5
• Advertisement

• 9
• 33
• 13
• 13
• 10
• ### Forum Statistics

• Total Topics
632582
• Total Posts
3007216

×

## 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!