Jump to content
  • Advertisement

Archived

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

tj963

Curved Triangles

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

Hi, I''m writing a raytracer that raytraces triangles. I am using the ray-triangle intersection code by Moller and Trombone and it worked well until I added camera rotation. When I rotate the camera, the edges of the triangles get curved way out of shape. For a simple scene, I have four triangles in a square, all sharing the middle point. When I rotate the camera (by rotating the rays), the triangles change shape but the square is the same size no matter which angle I look at it from. If this is the original shape: +------+ |\ /| | \ / | | \/ | | /\ | | / \ | |/ \| +------+ When I move the camera to the left and look at it it looks like: +------+ |\_ /| | \_ || | \/| | _/\| | _/ || |/ \| +------+ The picture''s not the best but the square is the same shape and the edges of the triangle are curved. Hopefully that was clear enough to understand. If anybody has any idea what''s going on, it would be greatly appreciated. Thanks, tj963

Share this post


Link to post
Share on other sites
Advertisement
Hi again,
The pictures didn''t turn out but oh well. I wasn''t quite clear last time when I said the square stays the same shape. It looks thinner on screen when viewed from an angle but the top and bottom edges are flat in relation to the screen. Any ideas?

tj963

Share this post


Link to post
Share on other sites

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