View Full Version : Please advice - how to draw a circle in 3D space
07-06-2004, 08: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, 08: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, 12:01 PM
I think what you are looking for is gluDisk.
Don't know about speed, but its preety easy to learn. :)
07-06-2004, 01:13 PM
yup, that's it, gluDisc. Wow, that one completely slipped my mind :p
07-06-2004, 09: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, 03: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, 04: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.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.