PDA

View Full Version : bezier surface



curonia
11-15-2004, 10:42 AM
Hi,

need some help with bezier surfaces. Got an assignment in university to draw an umbrella with OpenGL. Something similar to this. (http://img6.exs.cx/my.php?loc=img6&image=osgtSuperShape_Paramaters_Umbrella.jpg)

In order to do this, as I understand, I have to draw a triangular curved surface, then rotate it few times. Now the problem is - I don't get how to draw a triangular surface. All examples (red book and internet) I found, draw a quad surface. Can anyone give some hints or even better - examples, how to draw a triangular. Thnx in advance.

mikael_aronsson
11-15-2004, 02:09 PM
Hi !

OpenGL (glu) cannot create a true triangular surface, but you can make any bezier/spline surface look triangular depending on how you define the control points, when you let some control points have the same coordinates the surface will collapse at that point and this makes it possible to create a triangular surface, not sure how good OpenGL will tesselate it though, it might look crappy at the poles but give it a try and see what it looks like.

Mikael