2 * freeglut_teapot_data.h
4 * The freeglut library teapot data include file.
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 #ifndef FREEGLUT_TEAPOT_DATA_H
25 #define FREEGLUT_TEAPOT_DATA_H
28 * Rim, body, lid, and bottom data must be rotated along all four quadrants;
29 * handle and spout data is flipped across the x-y plane (negate z values) only.
31 #define GLUT_TEAPOT_N_INPUT_PATCHES 10
32 static int patchdata[GLUT_TEAPOT_N_INPUT_PATCHES][16] =
34 { 102, 103, 104, 105, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, /* rim */
35 { 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 }, /* body */
36 { 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 },
37 { 96, 96, 96, 96, 97, 98, 99, 100, 101, 101, 101, 101, 0, 1, 2, 3 }, /* lid */
38 { 0, 1, 2, 3, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117 },
39 { 118, 118, 118, 118, 124, 122, 119, 121, 123, 126, 125, 120, 40, 39, 38, 37 }, /* bottom */
40 { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56 }, /* handle */
41 { 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 28, 65, 66, 67 },
42 { 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83 }, /* spout */
43 { 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95 }
46 static GLfloat cpdata[][3] =
48 { 0.2000f, 0.0000f, 2.7000f},
49 { 0.2000f, -0.1120f, 2.7000f},
50 { 0.1120f, -0.2000f, 2.7000f},
51 { 0.0000f, -0.2000f, 2.7000f},
52 { 1.3375f, 0.0000f, 2.53125f},
53 { 1.3375f, -0.7490f, 2.53125f},
54 { 0.7490f, -1.3375f, 2.53125f},
55 { 0.0000f, -1.3375f, 2.53125f},
56 { 1.4375f, 0.0000f, 2.53125f},
57 { 1.4375f, -0.8050f, 2.53125f},
58 { 0.8050f, -1.4375f, 2.53125f},
59 { 0.0000f, -1.4375f, 2.53125f},
60 { 1.5000f, 0.0000f, 2.4000f},
61 { 1.5000f, -0.8400f, 2.4000f},
62 { 0.8400f, -1.5000f, 2.4000f},
63 { 0.0000f, -1.5000f, 2.4000f},
64 { 1.7500f, 0.0000f, 1.8750f},
65 { 1.7500f, -0.9800f, 1.8750f},
66 { 0.9800f, -1.7500f, 1.8750f},
67 { 0.0000f, -1.7500f, 1.8750f},
68 { 2.0000f, 0.0000f, 1.3500f},
69 { 2.0000f, -1.1200f, 1.3500f},
70 { 1.1200f, -2.0000f, 1.3500f},
71 { 0.0000f, -2.0000f, 1.3500f},
72 { 2.0000f, 0.0000f, 0.9000f},
73 { 2.0000f, -1.1200f, 0.9000f},
74 { 1.1200f, -2.0000f, 0.9000f},
75 { 0.0000f, -2.0000f, 0.9000f},
76 {-2.0000f, 0.0000f, 0.9000f},
77 { 2.0000f, 0.0000f, 0.4500f},
78 { 2.0000f, -1.1200f, 0.4500f},
79 { 1.1200f, -2.0000f, 0.4500f},
80 { 0.0000f, -2.0000f, 0.4500f},
81 { 1.5000f, 0.0000f, 0.2250f},
82 { 1.5000f, -0.8400f, 0.2250f},
83 { 0.8400f, -1.5000f, 0.2250f},
84 { 0.0000f, -1.5000f, 0.2250f},
85 { 1.5000f, 0.0000f, 0.1500f},
86 { 1.5000f, -0.8400f, 0.1500f},
87 { 0.8400f, -1.5000f, 0.1500f},
88 { 0.0000f, -1.5000f, 0.1500f},
89 {-1.6000f, 0.0000f, 2.0250f},
90 {-1.6000f, -0.3000f, 2.0250f},
91 {-1.5000f, -0.3000f, 2.2500f},
92 {-1.5000f, 0.0000f, 2.2500f},
93 {-2.3000f, 0.0000f, 2.0250f},
94 {-2.3000f, -0.3000f, 2.0250f},
95 {-2.5000f, -0.3000f, 2.2500f},
96 {-2.5000f, 0.0000f, 2.2500f},
97 {-2.7000f, 0.0000f, 2.0250f},
98 {-2.7000f, -0.3000f, 2.0250f},
99 {-3.0000f, -0.3000f, 2.2500f},
100 {-3.0000f, 0.0000f, 2.2500f},
101 {-2.7000f, 0.0000f, 1.8000f},
102 {-2.7000f, -0.3000f, 1.8000f},
103 {-3.0000f, -0.3000f, 1.8000f},
104 {-3.0000f, 0.0000f, 1.8000f},
105 {-2.7000f, 0.0000f, 1.5750f},
106 {-2.7000f, -0.3000f, 1.5750f},
107 {-3.0000f, -0.3000f, 1.3500f},
108 {-3.0000f, 0.0000f, 1.3500f},
109 {-2.5000f, 0.0000f, 1.1250f},
110 {-2.5000f, -0.3000f, 1.1250f},
111 {-2.6500f, -0.3000f, 0.9375f},
112 {-2.6500f, 0.0000f, 0.9375f},
113 {-2.0000f, -0.3000f, 0.9000f},
114 {-1.9000f, -0.3000f, 0.6000f},
115 {-1.9000f, 0.0000f, 0.6000f},
116 { 1.7000f, 0.0000f, 1.4250f},
117 { 1.7000f, -0.6600f, 1.4250f},
118 { 1.7000f, -0.6600f, 0.6000f},
119 { 1.7000f, 0.0000f, 0.6000f},
120 { 2.6000f, 0.0000f, 1.4250f},
121 { 2.6000f, -0.6600f, 1.4250f},
122 { 3.1000f, -0.6600f, 0.8250f},
123 { 3.1000f, 0.0000f, 0.8250f},
124 { 2.3000f, 0.0000f, 2.1000f},
125 { 2.3000f, -0.2500f, 2.1000f},
126 { 2.4000f, -0.2500f, 2.0250f},
127 { 2.4000f, 0.0000f, 2.0250f},
128 { 2.7000f, 0.0000f, 2.4000f},
129 { 2.7000f, -0.2500f, 2.4000f},
130 { 3.3000f, -0.2500f, 2.4000f},
131 { 3.3000f, 0.0000f, 2.4000f},
132 { 2.8000f, 0.0000f, 2.4750f},
133 { 2.8000f, -0.2500f, 2.4750f},
134 { 3.5250f, -0.2500f, 2.49375f},
135 { 3.5250f, 0.0000f, 2.49375f},
136 { 2.9000f, 0.0000f, 2.4750f},
137 { 2.9000f, -0.1500f, 2.4750f},
138 { 3.4500f, -0.1500f, 2.5125f},
139 { 3.4500f, 0.0000f, 2.5125f},
140 { 2.8000f, 0.0000f, 2.4000f},
141 { 2.8000f, -0.1500f, 2.4000f},
142 { 3.2000f, -0.1500f, 2.4000f},
143 { 3.2000f, 0.0000f, 2.4000f},
144 { 0.0000f, 0.0000f, 3.1500f},
145 { 0.8000f, 0.0000f, 3.1500f},
146 { 0.8000f, -0.4500f, 3.1500f},
147 { 0.4500f, -0.8000f, 3.1500f},
148 { 0.0000f, -0.8000f, 3.1500f},
149 { 0.0000f, 0.0000f, 2.8500f},
150 { 1.4000f, 0.0000f, 2.4000f},
151 { 1.4000f, -0.7840f, 2.4000f},
152 { 0.7840f, -1.4000f, 2.4000f},
153 { 0.0000f, -1.4000f, 2.4000f},
154 { 0.4000f, 0.0000f, 2.5500f},
155 { 0.4000f, -0.2240f, 2.5500f},
156 { 0.2240f, -0.4000f, 2.5500f},
157 { 0.0000f, -0.4000f, 2.5500f},
158 { 1.3000f, 0.0000f, 2.5500f},
159 { 1.3000f, -0.7280f, 2.5500f},
160 { 0.7280f, -1.3000f, 2.5500f},
161 { 0.0000f, -1.3000f, 2.5500f},
162 { 1.3000f, 0.0000f, 2.4000f},
163 { 1.3000f, -0.7280f, 2.4000f},
164 { 0.7280f, -1.3000f, 2.4000f},
165 { 0.0000f, -1.3000f, 2.4000f},
166 { 0.0000f, 0.0000f, 0.0000f},
167 { 1.4250f, -0.7980f, 0.0000f},
168 { 1.5000f, 0.0000f, 0.0750f},
169 { 1.4250f, 0.0000f, 0.0000f},
170 { 0.7980f, -1.4250f, 0.0000f},
171 { 0.0000f, -1.5000f, 0.0750f},
172 { 0.0000f, -1.4250f, 0.0000f},
173 { 1.5000f, -0.8400f, 0.0750f},
174 { 0.8400f, -1.5000f, 0.0750f}
177 #endif /* FREEGLUT_TEAPOT_DATA_H */