Some Built-In OpenGL Shapes
Solid Sphere, Wire Sphere Examples
glutSolidSphere(double radius, int slices, int stacks)
glutWireSphere(double radius, int slices, int stacks)
Renders a sphere centered at the modeling coordinates origin of the specified radius.
The sphere is subdivided around the Z axis into slices and along the Z axis into stacks.
radius is the radius of the sphere
slices is the number of subdivisions around the Z axis (similar to lines of longitude)
stacks is the number of subdivisions along the Z axis (similar to lines of latitude)
Solid Cube, Wire Cube Examples
glutSolidCube (double size)
glutWireCube(double size)
Render a solid or wireframe. The cube is centered at the modeling coordinates origin with
sides of length size.
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.
base is the radius of the base of the cone
height is the height of the cone
slices is the number of subdivisions around the Z axis
stacks is the number of subdivisions along the Z axis
glutWireTorus (double innerRadius, double outerRadius, int nsides, int rings)
Render a solid or wireframe torus (doughnut) respectively centered at the modeling coordinates origin whose axis is aligned with the Z axis.
innerRadius is the inner radius of the torous
outerRadius is the outer radius of the torus
nsides is the number of sides for each radial section
rings is the number of radial divisions for the torus
Solid Teapot, Wire Teapot Examples
glutSolidTeapot(double size)
glutWireTeapot(double size)
Render a solid or wireframe teapot respectively. Both surface normals and texture coordinates for the teapot are generated.
glutWireTetrahedron()
Render a solid or wireframe tetrahedron respectively centered at the modeling coordinates origin with a radius square root of 3.