Main Page | Report this Page
Computers Forum Index  »  Computer - Graphics - API (Opengl)  »  How to draw conical surfaces with OpenGL?
Page 1 of 1    

How to draw conical surfaces with OpenGL?

Author Message
°×ÏþÁÁ(Bai Xiaoliang)
Posted: Mon Jun 19, 2006 6:50 am
Guest
Hi,
I'm trying to draw conical surfaces with OpenGL, and the surfaces have fixed
boundary and even holes in. It sames difficult to draw it with OpenGL APIs.
Has anone tried it and knows how to do it in opengl? Or better yet, source
code for it.

Thanks
Bai Xiaoliang
 
Aurélien Barbier-Accary
Posted: Mon Jun 19, 2006 5:21 pm
Guest
°×ÏþÁÁ(Bai Xiaoliang) a écrit :
Quote:
Hi,
I'm trying to draw conical surfaces with OpenGL, and the surfaces have fixed
boundary and even holes in. It sames difficult to draw it with OpenGL APIs.
Has anone tried it and knows how to do it in opengl? Or better yet, source
code for it.

Thanks
Bai Xiaoliang



You have to polygonize it.

--
Aurélien Barbier-Accary
 
Andreas Micheler
Posted: Mon Jun 19, 2006 11:43 pm
Guest
°×ÏþÁÁ(Bai Xiaoliang) schrieb:
Quote:
Hi,
I'm trying to draw conical surfaces with OpenGL, and the surfaces have fixed
boundary and even holes in. It sames difficult to draw it with OpenGL APIs.
Has anone tried it and knows how to do it in opengl? Or better yet, source
code for it.

This not very easy.

You could draw the conical surface using a function of two coordinates
which produces the third coordinate.

For the holes you can either skip a square where your hole fit into and
then approximate the hole drawing a flat tessellated polygon having a
hole with an approximated hole boundary.

Or, if you like it more correct,
you have to do some math to compute the hole boundaries,
and interpolate your conical mesh at the hole boundary points.

Cheers,
Andreas
 
 
Page 1 of 1    
All times are GMT
The time now is Sun Nov 29, 2009 10:43 pm