开发者

How can I make an Exact sphere using glu NURBS?

开发者 https://www.devze.com 2023-02-16 07:39 出处:网络
I\'m working on a program that slices up the surface of a sphere using great/small circles. I\'ve got all the math done. The circles on the surface intersect, make arcs, recognize compact regions, an

I'm working on a program that slices up the surface of a sphere using great/small circles.

I've got all the math done. The circles on the surface intersect, make arcs, recognize compact regions, and recognize repeated regions. Now the only thing left is to display my information. And because I've got to do a lot of trimming strange shapes, I think NURBS is the way 开发者_如何学Goto go.

I've been researching NURBS for the past couple days and I finally found a site that shows how to make a perfect NURBS circle, but I still don't know how to extend that into a sphere.


Try reading "Representing a Circle or a Sphere with NURBS".


OpenGL has no sphere or NURBS primitive, only polygons. This means that glu, which is an utility layer on top of OpenGL, cannot make perfect spheres. It will tesselate any primitive shape to polys.

Based on this, you could model a sphere with NURBS, which will finally be tesselated in a non perfect sphere to be sent to OpenGL. As the gluSphere primitive. So making a sphere out of nurbs is pretty useless, just use gluSphere

0

精彩评论

暂无评论...
验证码 换一张
取 消