Results 1 to 4 of 4

Thread: Help drawing a disk

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2005
    Location
    TX
    Posts
    4

    Help drawing a disk

    Can anyone help me draw a disk given the center (x,y,z) and the radius?

  2. #2
    Senior Member Regular Contributor
    Join Date
    Jun 2004
    Location
    mexico
    Posts
    125

    Re: Help drawing a disk

    use quadratics. for a disk it would be:
    Code :
    gluDisk(quadratic,inner_radius,outter_radius,subdivitions,subdivitions);

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2005
    Location
    TX
    Posts
    4

    Re: Help drawing a disk

    Thanks, I can now draw the disk, but it is not positioned correctly. My center is (10.0,20.0,2.0) and the radius is 2.0.

    I used the following code:
    gluDisk(quadratic,0.0,2.0,10.0,20.0);

    Please assist.

    Thanks

  4. #4
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,595

    Re: Help drawing a disk

    Have a peek at any OpenGL tutorial, it will explain how to do transformations, glTranslate() will come handy.

    You also need to have a look at the gluDisk parameters, it has no information about position so you cannot specify it, you specify inner/outer radius and the number of triangles to us to create the disk.

    Use glTranslate before calling gluDisk to set the position.

    Mikael

Similar Threads

  1. Drawing a "tesselated" disk
    By primalmx in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 08-21-2008, 09:07 AM
  2. How to draw a disk
    By Cumore in forum OpenGL ES
    Replies: 1
    Last Post: 12-17-2007, 11:50 PM
  3. a disk always on top
    By jyoung77 in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 05-24-2005, 01:40 PM
  4. creating disk?
    By sarahippo in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 07-24-2003, 05:38 AM
  5. How to put a Texture on Disk
    By in forum OpenGL: Basic Coding
    Replies: 10
    Last Post: 01-15-2003, 01:34 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