View Full Version : Help drawing a disk
Can anyone help me draw a disk given the center (x,y,z) and the radius?
02-14-2005, 04:43 PM
use quadratics. for a disk it would be:
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:
02-15-2005, 12:43 AM
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.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.