How to draw a Umbrella, Bell or Hemisphere?

Hi, I am trying to draw a very simple hemisphere, is there and algorithm around? any help will be much appreciated

Cheers
rS

Your question belongs in the “beginners” forum, really, but here’s the general method:

Loop over polar coordinates (latitude and longitude on the sphere) and use sine and cosine functions to generate the vertex coordinates. Then use sheer determination and force of will to sort out which coordinate indices should go with which triangles.
If you need code to get you started, look at glutSphere() in the open source Mesa implementation, or my simple OpenGL tutorial:

http://www.itn.liu.se/~stegu/OpenGLQuickstart/

Look in “planets6.c” for the function “drawTexturedSphere”. Note that my code is old and uses immediate mode rendering with glVertex(), which I do not recommend for modern OpenGL programming. You should use vertex arrays instead, but the math for the sphere coordinates is the same.

Sorry, I misspelled the web address. It should read:

http://www.itn.liu.se/~stegu/OpenGLquickstart/

Hi Stefan, I will check out that tutorial, thanks for the link, I also found the quickstrat guide very usefull aswell

Cheers
rS