Results 1 to 4 of 4

Thread: Ellipsoid. How?

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2001
    Location
    Almeria, Spain
    Posts
    26

    Ellipsoid. How?

    Hi

    I want to make an Ellipsoid using triangle primitives but i dont know how. Does anyone know where can i find the solution please?.

    Now I have made it using a glSphere and Scaling it by (xLong,yLong,zLong) where xLong, yLong and zLong are the three axis length of the ellipsoid (They can be different) but the light effects dissapear and it looks poor.

    What can I do?. Thanks

  2. #2
    Senior Member Regular Contributor
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    431

    Re: Ellipsoid. How?

    Lighting won't work any more because the normals are scaled too and become non-unit normals. If you want the lighting to work, you could try glEnable(GL_NORMALIZE);

    Hope that helps.

  3. #3
    Senior Member Regular Contributor
    Join Date
    Jul 2001
    Posts
    352

    Re: Ellipsoid. How?

    Good idea, but GL_NORMALIZE is very slow. If you want something faster, draw your ellipsoid yourself. To achieve this, decompose it in horizontal slices. Each slice could be drawn as a gluCylinder with Radius1 different form Radius2. Of course it would be fastest if you drew everything yourself with a vertex array...but it would be more complicated, too.

    Hope that helps
    Morglum

  4. #4
    Junior Member Newbie
    Join Date
    Aug 2001
    Location
    Almeria, Spain
    Posts
    26

    Re: Ellipsoid. How?

    Thakyou.

    I used the aproach propossed by ffish because it works fine and I did not understand the cylinders one .

    Bye and thanks again

Similar Threads

  1. 3d-Ellipsoid
    By hlewin in forum OpenGL: General
    Replies: 10
    Last Post: 07-25-2013, 02:19 AM
  2. gluCylinder and Ellipsoid
    By BR in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 09-15-2005, 11:52 PM
  3. How to draw an ellipsoid with arbitrary axes?
    By dolphinmark in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 11-10-2003, 09:40 PM
  4. drawing ellipsoid
    By in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 11-10-2003, 07:43 AM
  5. Cut an ellipsoid where you need (half, 3/4, y axis,...)
    By Cisne in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 01-14-2001, 09:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean