1UNTITLED LOCAL UNTITLED
2
4 glutSolidSierpinskiSponge — Draw a solid Spierspinski's sponge.
5
7 OpenGLUT - geometry
8
10 #include <openglut.h>
11
12 void
13 glutSolidSierpinskiSponge(int num_levels, const GLdouble offset[ 3 ],
14 GLdouble scale);
15
17 num_levels Recursive depth.
18
19 offset Location vector.
20
21 scale Relative size.
22
24 This function recursively draws a few levels of a solid-shaded Sierpin‐
25 ski's Sponge. If num_levels is 0, draws 1 tetrahedron. The offset
26 is a translation. The z axis is normal to the base. The sponge is
27 centered at the origin.
28
30 Runtime is exponential in num_levels .
31
33 Consider removing the offset parameter from the API (use a helper func‐
34 tion).
35
37 glutWireSierpinskiSponge(3)
38
39
40
41
42 Epoch