| Computers Forum Index » Computer - Graphics - API (Opengl) » How to draw conical surfaces with OpenGL? |
|
Page 1 of 1 |
|
| 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 |
|
|
| Back to top |
|
|
|
| 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 |
|
|
| Back to top |
|
|
|
| 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 |
|
|
| Back to top |
|
|
|
|