Jump to content
  • Advertisement
Sign in to follow this  
Cirus

OpenGL Projecting a Straight Triangle on a Sphere

This topic is 4450 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. An interesting task for me. I am given a planar triagnle and I need to project it on the surface of a sphere of known radius "R". I also know th distance between the center of the sphere and the point closest to the sphere's center perpendicularly, lying on the triangle. How to realize the projection in OPenGL? [In short I need to make a spherical triangle.] All right I make my task simpler. I need to project a striaght line segment on a curved surface with known radius of curvature. How to do in OpenGL ? Is this have some connection with using NURBS?Or I will have to do it mathematically and then write a code for it?

Share this post


Link to post
Share on other sites
Advertisement

OpenGL isn't really related to your problem, unless you are trying to solve the problem somehow graphically. OpenGL can be used to visualize the resulting patch however.

Perhaps this is a special case, but you could do line-sphere intersection test from each vertex of the triangle to the center of the sphere. This way you would find the three points which lay on the sphere and very easily you could calculate the normals / tangents for each vertex.

this is the end of my knowledge ... as far as I know, you should be able to create a higher order surface with this information.

I can't help it, but this sounds a bit like a school assignment ...

Cheers

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!