Rendering Cones glutSolidCone and glutWireCone using GLUT in C

GLUT provides function glutSolidCone to render a Solid Cone and glutWireCone to render a Wire Frame Cone. glutSolidCone and glutWireCone render a solid or wireframe cone respectively oriented along the Z axis. The base of the cone is placed at Z = 0, and the top at Z = height. The cone is subdivided around the Z
axis into slices, and along the Z axis into stacks. Here are the syntax of both the above functions
void glutSolidCone (GLdouble base, GLdouble height, GLint slices, GLint stacks);
void glutWireCone (GLdouble base, GLdoube height, GLint slices, GLint stacks);
Where, base –> The radius of base of the  cone, height –> height of the cone,  slices –> The number of subdivision around the Z-axis and stacks –> The number of subdivisions along the Z-axis.


Source Code

Output

GLUTCones

SHARE Rendering Cones glutSolidCone and glutWireCone using GLUT in C

You may also like...

1 Response

Leave a Reply

Your email address will not be published. Required fields are marked *

Share