Sign in to follow this  
Cirus

OpenGL Projecting a Straight Triangle on a Sphere

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this