Portability | portable |
---|---|

Stability | stable |

Maintainer | sven.panne@aedion.de |

Safe Haskell | None |

GLUT includes a number of routines for generating easily recognizable 3D
geometric objects. These routines reflect functionality available in the
`aux`

toolkit described in the *OpenGL Programmer\'s Guide* and are included
in GLUT to allow the construction of simple GLUT programs that render
recognizable objects. These routines can be implemented as pure OpenGL
rendering routines. The routines do not generate display lists for the
objects they create. The routines generate normals appropriate for lighting
but do not generate texture coordinates (except for the teapot).

# Rendering flavour

Flavour of object rendering

# Object description

GLUT offers five types of objects:

- The five Platonic solids, see http://mathworld.wolfram.com/PlatonicSolid.html.
- A rhombic dodecahedron, see http://mathworld.wolfram.com/RhombicDodecahedron.html.
- Approximations to rounded objects.
- The classic teapot modeled by Martin Newell in 1975. Both surface normals and texture coordinates for the teapot are generated. The teapot is generated with OpenGL evaluators.
- A Sierpinski sponge, see http://mathworld.wolfram.com/Tetrix.html.

Cube Height | A cube centered at the modeling coordinates origin with sides of the given length. |

Dodecahedron | A dodecahedron (12-sided regular solid) centered at the modeling
coordinates origin with a radius of |

Icosahedron | A icosahedron (20-sided regular solid) centered at the modeling coordinates origin with a radius of 1.0. |

Octahedron | Render a solid octahedron (8-sided regular solid) centered at the modeling coordinates origin with a radius of 1.0. |

Tetrahedron | Render a solid tetrahedron (4-sided regular solid) centered at the
modeling coordinates origin with a radius of |

RhombicDodecahedron | ( |

Sphere' Radius Slices Stacks | A sphere centered at the modeling coordinates origin of the specified radius. The sphere is subdivided around the Z axis into slices (similar to lines of longitude) and along the Z axis into stacks (similar to lines of latitude). |

Cone Radius Height Slices Stacks | A cone oriented along the Z axis. The base of the cone is placed at Z = 0, and the top at Z = the given height. The cone is subdivided around the Z axis into slices, and along the Z axis into stacks. |

Cylinder' Radius Height Slices Stacks | ( |

Torus Radius Radius Sides Rings | A torus (doughnut) centered at the modeling coordinates origin whose axis is aligned with the Z axis. The torus is described by its inner and outer radius, the number of sides for each radial section, and the number of radial divisions (rings). |

Teapot Height | A teapot with a given relative size. |

SierpinskiSponge NumLevels | ( |

# Type synonyms

# Rendering

renderObject :: Flavour -> Object -> IO ()Source

Render an object in the given flavour.