]> gitweb.michael.orlitzky.com - spline3.git/blob - src/Tests/Face.hs
0d1bda7b33bf89fc8897850076b2efa1ea56c25e
[spline3.git] / src / Tests / Face.hs
1 module Tests.Face
2 where
3
4 -- -- | Given in Sorokina and Zeilfelder, p. 78.
5 -- prop_cijk1_identity :: Cube -> Bool
6 -- prop_cijk1_identity cube =
7 -- and [ c t0' i j k 1 ~= (c t1' (i+1) j k 0) * ((b0 t0') (v3 t1')) +
8 -- (c t1' i (j+1) k 0) * ((b1 t0') (v3 t1')) +
9 -- (c t1' i j (k+1) 0) * ((b2 t0') (v3 t1')) +
10 -- (c t1' i j k 1) * ((b3 t0') (v3 t1')) | i <- [0..2],
11 -- j <- [0..2],
12 -- k <- [0..2],
13 -- i + j + k == 2]
14 -- where
15 -- t0 = tetrahedron0 (face0 cube)
16 -- t1 = tetrahedron1 (face0 cube)
17 -- t0' = Tetrahedron cube (v3 t0) (v2 t0) (v1 t0) (v0 t0)
18 -- t1' = Tetrahedron cube (v3 t1) (v2 t1) (v0 t1) (v1 t1)
19
20 -- -- | Given in Sorokina and Zeilfelder, p. 79.
21 -- prop_c0120_identity1 :: Cube -> Bool
22 -- prop_c0120_identity1 cube =
23 -- c t0' 0 1 2 0 ~= (c t0' 0 0 2 1 + c t1' 0 0 2 1) / 2
24 -- where
25 -- t0 = tetrahedron0 (face0 cube)
26 -- t1 = tetrahedron1 (face0 cube)
27 -- t0' = Tetrahedron cube (v3 t0) (v2 t0) (v1 t0) (v0 t0)
28 -- t1' = Tetrahedron cube (v3 t1) (v2 t1) (v0 t1) (v1 t1)
29
30
31 -- -- | Given in Sorokina and Zeilfelder, p. 79.
32 -- prop_c0210_identity1 :: Cube -> Bool
33 -- prop_c0210_identity1 cube =
34 -- c t0' 0 2 1 0 ~= (c t0' 0 1 1 1 + c t1' 0 1 1 1) / 2
35 -- where
36 -- t0 = tetrahedron0 (face0 cube)
37 -- t1 = tetrahedron1 (face0 cube)
38 -- t0' = Tetrahedron cube (v3 t0) (v2 t0) (v1 t0) (v0 t0)
39 -- t1' = Tetrahedron cube (v3 t1) (v2 t1) (v0 t1) (v1 t1)
40
41
42 -- -- | Given in Sorokina and Zeilfelder, p. 79.
43 -- prop_c0300_identity1 :: Cube -> Bool
44 -- prop_c0300_identity1 cube =
45 -- c t0' 0 3 0 0 ~= (c t0' 0 2 0 1 + c t1' 0 2 0 1) / 2
46 -- where
47 -- t0 = tetrahedron0 (face0 cube)
48 -- t1 = tetrahedron1 (face0 cube)
49 -- t0' = Tetrahedron cube (v3 t0) (v2 t0) (v1 t0) (v0 t0)
50 -- t1' = Tetrahedron cube (v3 t1) (v2 t1) (v0 t1) (v1 t1)
51
52 -- -- | Given in Sorokina and Zeilfelder, p. 79.
53 -- prop_c1110_identity :: Cube -> Bool
54 -- prop_c1110_identity cube =
55 -- c t0' 1 1 1 0 ~= (c t0' 1 0 1 1 + c t1' 1 0 1 1) / 2
56 -- where
57 -- t0 = tetrahedron0 (face0 cube)
58 -- t1 = tetrahedron1 (face0 cube)
59 -- t0' = Tetrahedron cube (v3 t0) (v2 t0) (v1 t0) (v0 t0)
60 -- t1' = Tetrahedron cube (v3 t1) (v2 t1) (v0 t1) (v1 t1)
61
62
63 -- -- | Given in Sorokina and Zeilfelder, p. 79.
64 -- prop_c1200_identity1 :: Cube -> Bool
65 -- prop_c1200_identity1 cube =
66 -- c t0' 1 2 0 0 ~= (c t0' 1 1 0 1 + c t1' 1 1 0 1) / 2
67 -- where
68 -- t0 = tetrahedron0 (face0 cube)
69 -- t1 = tetrahedron1 (face0 cube)
70 -- t0' = Tetrahedron cube (v3 t0) (v2 t0) (v1 t0) (v0 t0)
71 -- t1' = Tetrahedron cube (v3 t1) (v2 t1) (v0 t1) (v1 t1)
72
73
74 -- -- | Given in Sorokina and Zeilfelder, p. 79.
75 -- prop_c2100_identity1 :: Cube -> Bool
76 -- prop_c2100_identity1 cube =
77 -- c t0' 2 1 0 0 ~= (c t0' 2 0 0 1 + c t1' 2 0 0 1) / 2
78 -- where
79 -- t0 = tetrahedron0 (face0 cube)
80 -- t1 = tetrahedron1 (face0 cube)
81 -- t0' = Tetrahedron cube (v3 t0) (v2 t0) (v1 t0) (v0 t0)
82 -- t1' = Tetrahedron cube (v3 t1) (v2 t1) (v0 t1) (v1 t1)
83
84
85 -- -- | Given in Sorokina and Zeilfelder, p. 79.
86 -- prop_c0102_identity1 :: Cube -> Bool
87 -- prop_c0102_identity1 cube =
88 -- c t0' 0 1 0 2 ~= (c t0' 0 0 1 2 + c t3' 0 0 1 2) / 2
89 -- where
90 -- t0 = tetrahedron0 (face0 cube)
91 -- t3 = tetrahedron3 (face0 cube)
92 -- t0' = Tetrahedron cube (v3 t0) (v2 t0) (v1 t0) (v0 t0)
93 -- t3' = Tetrahedron cube (v3 t3) (v2 t3) (v1 t3) (v0 t3)
94
95
96 -- -- | Given in Sorokina and Zeilfelder, p. 79.
97 -- prop_c0201_identity1 :: Cube -> Bool
98 -- prop_c0201_identity1 cube =
99 -- c t0' 0 2 0 1 ~= (c t0' 0 1 1 1 + c t3' 0 1 1 1) / 2
100 -- where
101 -- t0 = tetrahedron0 (face0 cube)
102 -- t3 = tetrahedron3 (face0 cube)
103 -- t0' = Tetrahedron cube (v3 t0) (v2 t0) (v1 t0) (v0 t0)
104 -- t3' = Tetrahedron cube (v3 t3) (v2 t3) (v1 t3) (v0 t3)
105
106
107 -- -- | Given in Sorokina and Zeilfelder, p. 79.
108 -- prop_c0300_identity2 :: Cube -> Bool
109 -- prop_c0300_identity2 cube =
110 -- c t0' 3 0 0 0 ~= (c t0' 0 2 1 0 + c t3' 0 2 1 0) / 2
111 -- where
112 -- t0 = tetrahedron0 (face0 cube)
113 -- t3 = tetrahedron3 (face0 cube)
114 -- t0' = Tetrahedron cube (v3 t0) (v2 t0) (v1 t0) (v0 t0)
115 -- t3' = Tetrahedron cube (v3 t3) (v2 t3) (v1 t3) (v0 t3)
116
117 -- -- | Given in Sorokina and Zeilfelder, p. 79.
118 -- prop_c1101_identity :: Cube -> Bool
119 -- prop_c1101_identity cube =
120 -- c t0' 1 1 0 1 ~= (c t0' 1 1 0 1 + c t3' 1 1 0 1) / 2
121 -- where
122 -- t0 = tetrahedron0 (face0 cube)
123 -- t3 = tetrahedron3 (face0 cube)
124 -- t0' = Tetrahedron cube (v3 t0) (v2 t0) (v1 t0) (v0 t0)
125 -- t3' = Tetrahedron cube (v3 t3) (v2 t3) (v1 t3) (v0 t3)
126
127
128 -- -- | Given in Sorokina and Zeilfelder, p. 79.
129 -- prop_c1200_identity2 :: Cube -> Bool
130 -- prop_c1200_identity2 cube =
131 -- c t0' 1 1 1 0 ~= (c t0' 1 1 1 0 + c t3' 1 1 1 0) / 2
132 -- where
133 -- t0 = tetrahedron0 (face0 cube)
134 -- t3 = tetrahedron3 (face0 cube)
135 -- t0' = Tetrahedron cube (v3 t0) (v2 t0) (v1 t0) (v0 t0)
136 -- t3' = Tetrahedron cube (v3 t3) (v2 t3) (v1 t3) (v0 t3)
137
138
139 -- -- | Given in Sorokina and Zeilfelder, p. 79.
140 -- prop_c2100_identity2 :: Cube -> Bool
141 -- prop_c2100_identity2 cube =
142 -- c t0' 2 1 0 0 ~= (c t0' 2 0 1 0 + c t3' 2 0 1 0) / 2
143 -- where
144 -- t0 = tetrahedron0 (face0 cube)
145 -- t3 = tetrahedron3 (face0 cube)
146 -- t0' = Tetrahedron cube (v3 t0) (v2 t0) (v1 t0) (v0 t0)
147 -- t3' = Tetrahedron cube (v3 t3) (v2 t3) (v1 t3) (v0 t3)
148
149
150 -- -- | Given in Sorokina and Zeilfelder, p. 79.
151 -- prop_c3000_identity :: Cube -> Bool
152 -- prop_c3000_identity cube =
153 -- c t0' 3 0 0 0 ~= c t0' 2 1 0 0 + c t2' 2 1 0 0 - ((c t0' 2 0 1 0 + c t0' 2 0 0 1)/ 2)
154 -- where
155 -- t0 = tetrahedron0 (face0 cube)
156 -- t2 = tetrahedron2 (face5 cube)
157 -- t0' = Tetrahedron cube (v3 t0) (v2 t0) (v1 t0) (v0 t0)
158 -- t2' = Tetrahedron cube (v3 t2) (v2 t2) (v1 t2) (v0 t2)
159
160
161 -- -- | Given in Sorokina and Zeilfelder, p. 79.
162 -- prop_c2010_identity :: Cube -> Bool
163 -- prop_c2010_identity cube =
164 -- c t0' 2 0 1 0 ~= c t0' 1 1 1 0 + c t2' 1 1 1 0 - ((c t0' 1 0 2 0 + c t0' 1 0 1 1)/ 2)
165 -- where
166 -- t0 = tetrahedron0 (face0 cube)
167 -- t2 = tetrahedron2 (face5 cube)
168 -- t0' = Tetrahedron cube (v3 t0) (v2 t0) (v1 t0) (v0 t0)
169 -- t2' = Tetrahedron cube (v3 t2) (v2 t2) (v1 t2) (v0 t2)
170
171
172 -- -- | Given in Sorokina and Zeilfelder, p. 79.
173 -- prop_c2001_identity :: Cube -> Bool
174 -- prop_c2001_identity cube =
175 -- c t0' 2 0 0 1 ~= c t0' 1 1 0 1 + c t2' 1 1 0 1 - ((c t0' 1 0 0 2 + c t0' 1 0 1 1)/ 2)
176 -- where
177 -- t0 = tetrahedron0 (face0 cube)
178 -- t2 = tetrahedron2 (face5 cube)
179 -- t0' = Tetrahedron cube (v3 t0) (v2 t0) (v1 t0) (v0 t0)
180 -- t2' = Tetrahedron cube (v3 t2) (v2 t2) (v1 t2) (v0 t2)
181
182 -- -- | Given in Sorokina and Zeilfelder, p. 79.
183 -- prop_c1020_identity :: Cube -> Bool
184 -- prop_c1020_identity cube =
185 -- c t0' 1 0 2 0 ~= c t0' 0 1 2 0 + c t2' 0 1 2 0 - ((c t0' 0 0 3 0 + c t0' 0 0 2 1)/ 2)
186 -- where
187 -- t0 = tetrahedron0 (face0 cube)
188 -- t2 = tetrahedron2 (face5 cube)
189 -- t0' = Tetrahedron cube (v3 t0) (v2 t0) (v1 t0) (v0 t0)
190 -- t2' = Tetrahedron cube (v3 t2) (v2 t2) (v1 t2) (v0 t2)
191
192
193 -- -- | Given in Sorokina and Zeilfelder, p. 79.
194 -- prop_c1002_identity :: Cube -> Bool
195 -- prop_c1002_identity cube =
196 -- c t0' 1 0 0 2 ~= c t0' 0 1 0 2 + c t2' 0 1 0 2 - ((c t0' 0 0 0 3 + c t0' 0 0 1 2)/ 2)
197 -- where
198 -- t0 = tetrahedron0 (face0 cube)
199 -- t2 = tetrahedron2 (face5 cube)
200 -- t0' = Tetrahedron cube (v3 t0) (v2 t0) (v1 t0) (v0 t0)
201 -- t2' = Tetrahedron cube (v3 t2) (v2 t2) (v1 t2) (v0 t2)
202
203
204 -- -- | Given in Sorokina and Zeilfelder, p. 79.
205 -- prop_c1011_identity :: Cube -> Bool
206 -- prop_c1011_identity cube =
207 -- c t0' 1 0 1 1 ~= c t0' 0 1 1 1 + c t2' 0 1 1 1 - ((c t0' 0 0 1 2 + c t0' 0 0 2 1)/ 2)
208 -- where
209 -- t0 = tetrahedron0 (face0 cube)
210 -- t2 = tetrahedron2 (face5 cube)
211 -- t0' = Tetrahedron cube (v3 t0) (v2 t0) (v1 t0) (v0 t0)
212 -- t2' = Tetrahedron cube (v3 t2) (v2 t2) (v1 t2) (v0 t2)
213
214
215 -- -- | Given in Sorokina and Zeilfelder, p. 80.
216 -- prop_c0120_identity2 :: Cube -> Bool
217 -- prop_c0120_identity2 cube =
218 -- c t0' 0 1 2 0 ~= (c t0' 1 0 2 0 + c t1' 1 0 2 0) / 2
219 -- where
220 -- t0 = tetrahedron0 (face0 cube)
221 -- t1 = tetrahedron0 (face2 (top cube))
222 -- t0' = Tetrahedron cube (v3 t0) (v2 t0) (v1 t0) (v0 t0)
223 -- t1' = Tetrahedron cube (v3 t1) (v2 t1) (v0 t1) (v1 t1)
224
225
226 -- -- | Given in Sorokina and Zeilfelder, p. 80.
227 -- prop_c0102_identity2 :: Cube -> Bool
228 -- prop_c0102_identity2 cube =
229 -- c t0' 0 1 0 2 ~= (c t0' 1 0 0 2 + c t1' 1 0 0 2) / 2
230 -- where
231 -- t0 = tetrahedron0 (face0 cube)
232 -- t1 = tetrahedron0 (face2 (top cube))
233 -- t0' = Tetrahedron cube (v3 t0) (v2 t0) (v1 t0) (v0 t0)
234 -- t1' = Tetrahedron cube (v3 t1) (v2 t1) (v0 t1) (v1 t1)
235
236
237 -- -- | Given in Sorokina and Zeilfelder, p. 80.
238 -- prop_c0111_identity :: Cube -> Bool
239 -- prop_c0111_identity cube =
240 -- c t0' 0 1 1 1 ~= (c t0' 1 0 1 1 + c t1' 1 0 1 1) / 2
241 -- where
242 -- t0 = tetrahedron0 (face0 cube)
243 -- t1 = tetrahedron0 (face2 (top cube))
244 -- t0' = Tetrahedron cube (v3 t0) (v2 t0) (v1 t0) (v0 t0)
245 -- t1' = Tetrahedron cube (v3 t1) (v2 t1) (v0 t1) (v1 t1)
246
247
248 -- -- | Given in Sorokina and Zeilfelder, p. 80.
249 -- prop_c0210_identity2 :: Cube -> Bool
250 -- prop_c0210_identity2 cube =
251 -- c t0 0 2 1 0 ~= (c t0 1 1 1 0 + c t1 1 1 1 0) / 2
252 -- where
253 -- t0 = tetrahedron0 (face0 cube)
254 -- t1 = tetrahedron0 (face2 (top cube))
255 -- t0' = Tetrahedron cube (v3 t0) (v2 t0) (v1 t0) (v0 t0)
256 -- t1' = Tetrahedron cube (v3 t1) (v2 t1) (v0 t1) (v1 t1)
257
258
259 -- -- | Given in Sorokina and Zeilfelder, p. 80.
260 -- prop_c0201_identity2 :: Cube -> Bool
261 -- prop_c0201_identity2 cube =
262 -- c t0 0 2 0 1 ~= (c t0 1 1 0 1 + c t1 1 1 0 1) / 2
263 -- where
264 -- t0 = tetrahedron0 (face0 cube)
265 -- t1 = tetrahedron0 (face2 (top cube))
266 -- t0' = Tetrahedron cube (v3 t0) (v2 t0) (v1 t0) (v0 t0)
267 -- t1' = Tetrahedron cube (v3 t1) (v2 t1) (v0 t1) (v1 t1)
268
269
270 -- -- | Given in Sorokina and Zeilfelder, p. 80.
271 -- prop_c0300_identity3 :: Cube -> Bool
272 -- prop_c0300_identity3 cube =
273 -- c t0 0 3 0 0 ~= (c t0 1 2 0 0 + c t1 1 2 0 0) / 2
274 -- where
275 -- t0 = tetrahedron0 (face0 cube)
276 -- t1 = tetrahedron0 (face2 (top cube))
277 -- t0' = Tetrahedron cube (v3 t0) (v2 t0) (v1 t0) (v0 t0)
278 -- t1' = Tetrahedron cube (v3 t1) (v2 t1) (v0 t1) (v1 t1)