View Full Version : Please advice - how to draw a circle in 3D space
07-06-2004, 07:33 AM
I need to draw a circle(not a ball!) in 3d space.
Please advice - what is the fastest and easy way to it?
07-06-2004, 07:56 AM
You could draw your circle in photoshop, save it onto a transparent background and then use it as a texture onto a quad and position your quad wherever you want in 3D Space.
or you could use math to approximate the circle using a series of lines.
07-06-2004, 11:01 AM
I think what you are looking for is gluDisk.
Don't know about speed, but its preety easy to learn. :)
07-06-2004, 12:13 PM
yup, that's it, gluDisc. Wow, that one completely slipped my mind :p
07-06-2004, 08:54 PM
Thanks for the answers,but gluDisk at first look
looks a little complicated.
Do Nehe has a sample code for it (somewhere in his tutorial)?
07-07-2004, 02:25 AM
First you have to make a quadric object. You usually only need one.
Q: PGLUQuadric; //variable declaration (in delphi, dont know, how it goes in c++)
Q := gluNewQuadric;
gluQuadricTexture(Q, GL_TRUE); // This enables texturing Then you just use the gluDisk command (you can also use gluSphere or gluCylinder with the same quadric object)
If you are not sure, ask again or google for it and you'll find all the data on the reference pages.
07-07-2004, 03:04 AM
Why not make one yourself and store it in a display list?
for (int i=0;i<detail;++i)
glEndList();if you want the circles to be filled, use:
for (int i=0;i<=detail;++i)
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.