SysTutorials

Linux Manual Pages › Section 3

glutsolidsierpinskisponge(3)

glutSolidSierpinskiSponge – Draw a solid Spierspinski’s sponge.

Library

OpenGLUT – geometry

Synopsis

In openglut.h Ft void Fn glutSolidSierpinskiSponge int num_levels const GLdouble offset[ 3 ] GLdouble scale

Parameters

Bf Em
 num_levels Ef
    Recursive depth.

Bf Em
 offset Ef
        Location vector.

Bf Em
 scale Ef
         Relative size.

Description

This function recursively draws a few levels of a solid-shaded Sierpinski’s Sponge. If Bf Sy
 num_levels Ef
 is 0, draws 1 tetrahedron. The Bf Sy
 offset Ef
 is a translation. The Bf Sy
 z Ef
 axis is normal to the base. The sponge is centered at the origin.

Caveats

Runtime is exponential in Bf Sy
 num_levels Ef
 .

Todo

Consider removing the Bf Sy
 offset Ef
 parameter from the API (use a helper function).

See Also

glutWireSierpinskiSponge(3)