Results 1 to 3 of 3

Thread: Accessing Triangles when using glut function

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2009
    Posts
    2

    Accessing Triangles when using glut function

    Hi,

    I want to change the shape of the sphere when I use,
    glutSolidSphere()

    which is available in glut.

    So, how can I access the triangles in this object?

    Are there any existing deformable object libraries in opengl community?

    Thanks in advance,

    Janaka Prabhash

  2. #2
    Senior Member Regular Contributor
    Join Date
    Dec 2008
    Location
    USA
    Posts
    134

    Re: Accessing Triangles when using glut function

    How do you want to deform the sphere? You can certainly modify the modelview matrix before drawing the sphere (scale it, rotate it).

  3. #3
    Junior Member Newbie Optik's Avatar
    Join Date
    Jun 2009
    Location
    Los Angeles, CA
    Posts
    22

    Re: Accessing Triangles when using glut function

    The only flat polygon you will get is by using glutSolidSphere(radius,2,2)
    which means 2 stacks and 2 slices(this is a bare minimum condition).

    with this call you will get a rhombus.

    however if you want something close to a triangle you might want to try with 3 stacks and 2 slices or vice versa, in which case the result will be a tetrahedron.

    I'm writing a new tutorial for beginners to OpenGL programming do visit it

Similar Threads

  1. glut picking function
    By simtekz in forum OpenGL: General
    Replies: 0
    Last Post: 05-26-2012, 12:22 AM
  2. What's wrong with glut function?
    By Debugger in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 01-21-2007, 05:54 PM
  3. Replies: 4
    Last Post: 07-27-2004, 06:56 PM
  4. glut timer function burns my CPU (still..)
    By jean-bobby in forum OpenGL: General
    Replies: 3
    Last Post: 06-03-2004, 07:48 PM
  5. using macros in a GLUT function
    By imported_Moritz in forum OpenGL: General
    Replies: 4
    Last Post: 05-25-2002, 12:10 PM

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