Jump to content
  • Advertisement
Sign in to follow this  
Cirus

OpenGL Projecting a Straight Triangle on a Sphere

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

Hello All, Another interesting problem for me. I have a triangle that I need to project on a sphere.I can understand it conceptually but not able to realize it practically. I am supplied with coordinates of the traingle and also know the radius of the sphere. I also know the distance between the center of the sphere and the plane where the traingle is located. How to project a planar triangle on a sphere? In otherwords how to create a specherical triangle ? (i.e If you draw a triangle on Earth's surface and view it from space, it would appear to be a triangle with curved edges.) OR I simplify my task : How to project a straight line segment on a curved surface in OPENGL? Is there a specific function or do I need to se NURBS? Help Appreciated.

Share this post


Link to post
Share on other sites
Advertisement
How would you render a sphere in 3d if you are not allowed to use textures?

You would have to make a 3d sphere out of small triangles.

By clipping these new triangles with your projected triangle you will get the effect you want.

So what you need is a very good algorithm for generating the triangles of a sphere

http://www.cfxweb.net/modules.php?name=News&file=print&sid=1849

And then look into clipping a triangle by a plane.

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!