Hi
Need code for drawing a cone and a chopped off cone
Cheers
[This message has been edited by fox (edited 11-15-2000).]
Hi
Need code for drawing a cone and a chopped off cone
Cheers
[This message has been edited by fox (edited 11-15-2000).]
why don’t you try glutsolidcone ?(if it exists )
For a cone try gluCylinder with a radius of 0.0 for its top face. For a chopped cone use a larger radius that is smaller than that of its base.
Yes could you give me a sample code -I think you have to use it in conjunction with gluNewQuadric - also could I use this to draw a solid and a wire frame cone?
Cheers
[This message has been edited by fox (edited 11-16-2000).]
Any code using gluCylinder?
Cheers
I’ve had a look at the spec - what should the first parameter be?
Cheers
Try this
void drawSolidCylinder(GLdouble base, GLdouble height, GLint slices, GLint stacks) {
GLUquadricObj *theQuadric;
theQuadric = gluNewQuadric();
gluQuadricDrawStyle(theQuadric, GLU_FILL);
gluQuadricNormals(theQuadric, GLU_SMOOTH);
gluCylinder(theQuadric, base, base, height, slices, stacks);
gluDeleteQuadric(theQuadric);
}
Change
gluQuadricDrawStyle(theQuadric, GLU_FILL);
to
gluQuadricDrawStyle(theQuadric, GLU_LINE);
fo a wire cone.
[This message has been edited by ipo (edited 11-17-2000).]