OpenGl program:To make a cone and rotate a sphere around it(with lightening effects)





glutSolidSphere( radius , slices , stacks )
Radius The radius of the sphere.
Slices The number of subdivisions around the Z axis (similar to lines of longitude).
Stacks The number of subdivisions along the Z axis (similar to lines of latitude).

glutSolidCone( base , height , slices , stacks )
base


The radius of the base of the cone.
base


The radius of the base of the cone.
height


The height of the cone.
slices


The number of subdivisions around the Z axis.
stacks


The number of subdivisions along the Z axis.

Program:


Output:-

Comments