9 tetrahedron_properties,
15 import qualified Data.Vector as V (
21 import Prelude hiding (LT)
22 import Test.Framework (Test, testGroup)
23 import Test.Framework.Providers.HUnit (testCase)
24 import Test.Framework.Providers.QuickCheck2 (testProperty)
26 import Test.QuickCheck (Arbitrary(..), Gen, Property, (==>))
28 import Comparisons ((~=), nearly_ge)
29 import FunctionValues (FunctionValues(..), empty_values)
30 import Misc (factorial)
33 import ThreeDimensional
36 Tetrahedron { function_values :: FunctionValues,
41 precomputed_volume :: Double
46 instance Arbitrary Tetrahedron where
48 rnd_v0 <- arbitrary :: Gen Point
49 rnd_v1 <- arbitrary :: Gen Point
50 rnd_v2 <- arbitrary :: Gen Point
51 rnd_v3 <- arbitrary :: Gen Point
52 rnd_fv <- arbitrary :: Gen FunctionValues
54 -- We can't assign an incorrect precomputed volume,
55 -- so we have to calculate the correct one here.
56 let t' = Tetrahedron rnd_fv rnd_v0 rnd_v1 rnd_v2 rnd_v3 0
58 return (Tetrahedron rnd_fv rnd_v0 rnd_v1 rnd_v2 rnd_v3 vol)
61 instance Show Tetrahedron where
62 show t = "Tetrahedron:\n" ++
63 " function_values: " ++ (show (function_values t)) ++ "\n" ++
64 " v0: " ++ (show (v0 t)) ++ "\n" ++
65 " v1: " ++ (show (v1 t)) ++ "\n" ++
66 " v2: " ++ (show (v2 t)) ++ "\n" ++
67 " v3: " ++ (show (v3 t)) ++ "\n"
70 instance ThreeDimensional Tetrahedron where
71 center (Tetrahedron _ v0' v1' v2' v3' _) =
72 (v0' + v1' + v2' + v3') `scale` (1/4)
75 b0_unscaled `nearly_ge` 0 &&
76 b1_unscaled `nearly_ge` 0 &&
77 b2_unscaled `nearly_ge` 0 &&
78 b3_unscaled `nearly_ge` 0
80 -- Drop the useless division and volume calculation that we
81 -- would do if we used the regular b0,..b3 functions.
83 b0_unscaled = volume inner_tetrahedron
84 where inner_tetrahedron = t { v0 = p0 }
87 b1_unscaled = volume inner_tetrahedron
88 where inner_tetrahedron = t { v1 = p0 }
91 b2_unscaled = volume inner_tetrahedron
92 where inner_tetrahedron = t { v2 = p0 }
95 b3_unscaled = volume inner_tetrahedron
96 where inner_tetrahedron = t { v3 = p0 }
99 polynomial :: Tetrahedron -> (RealFunction Point)
101 V.sum $ V.singleton ((c t 0 0 0 3) `cmult` (beta t 0 0 0 3)) `V.snoc`
102 ((c t 0 0 1 2) `cmult` (beta t 0 0 1 2)) `V.snoc`
103 ((c t 0 0 2 1) `cmult` (beta t 0 0 2 1)) `V.snoc`
104 ((c t 0 0 3 0) `cmult` (beta t 0 0 3 0)) `V.snoc`
105 ((c t 0 1 0 2) `cmult` (beta t 0 1 0 2)) `V.snoc`
106 ((c t 0 1 1 1) `cmult` (beta t 0 1 1 1)) `V.snoc`
107 ((c t 0 1 2 0) `cmult` (beta t 0 1 2 0)) `V.snoc`
108 ((c t 0 2 0 1) `cmult` (beta t 0 2 0 1)) `V.snoc`
109 ((c t 0 2 1 0) `cmult` (beta t 0 2 1 0)) `V.snoc`
110 ((c t 0 3 0 0) `cmult` (beta t 0 3 0 0)) `V.snoc`
111 ((c t 1 0 0 2) `cmult` (beta t 1 0 0 2)) `V.snoc`
112 ((c t 1 0 1 1) `cmult` (beta t 1 0 1 1)) `V.snoc`
113 ((c t 1 0 2 0) `cmult` (beta t 1 0 2 0)) `V.snoc`
114 ((c t 1 1 0 1) `cmult` (beta t 1 1 0 1)) `V.snoc`
115 ((c t 1 1 1 0) `cmult` (beta t 1 1 1 0)) `V.snoc`
116 ((c t 1 2 0 0) `cmult` (beta t 1 2 0 0)) `V.snoc`
117 ((c t 2 0 0 1) `cmult` (beta t 2 0 0 1)) `V.snoc`
118 ((c t 2 0 1 0) `cmult` (beta t 2 0 1 0)) `V.snoc`
119 ((c t 2 1 0 0) `cmult` (beta t 2 1 0 0)) `V.snoc`
120 ((c t 3 0 0 0) `cmult` (beta t 3 0 0 0))
123 -- | Returns the domain point of t with indices i,j,k,l.
124 -- Simply an alias for the domain_point function.
125 xi :: Tetrahedron -> Int -> Int -> Int -> Int -> Point
128 -- | Returns the domain point of t with indices i,j,k,l.
129 domain_point :: Tetrahedron -> Int -> Int -> Int -> Int -> Point
130 domain_point t i j k l
131 | i + j + k + l == 3 = weighted_sum `scale` (1/3)
132 | otherwise = error "domain point index out of bounds"
134 v0' = (v0 t) `scale` (fromIntegral i)
135 v1' = (v1 t) `scale` (fromIntegral j)
136 v2' = (v2 t) `scale` (fromIntegral k)
137 v3' = (v3 t) `scale` (fromIntegral l)
138 weighted_sum = v0' + v1' + v2' + v3'
141 -- | The Bernstein polynomial on t with indices i,j,k,l. Denoted by a
142 -- capital 'B' in the Sorokina/Zeilfelder paper.
143 beta :: Tetrahedron -> Int -> Int -> Int -> Int -> (RealFunction Point)
145 | (i + j + k + l == 3) =
146 coefficient `cmult` (b0_term * b1_term * b2_term * b3_term)
147 | otherwise = error "basis function index out of bounds"
149 denominator = (factorial i)*(factorial j)*(factorial k)*(factorial l)
150 coefficient = 6 / (fromIntegral denominator)
151 b0_term = (b0 t) `fexp` i
152 b1_term = (b1 t) `fexp` j
153 b2_term = (b2 t) `fexp` k
154 b3_term = (b3 t) `fexp` l
157 -- | The coefficient function. c t i j k l returns the coefficient
158 -- c_ijkl with respect to the tetrahedron t. The definition uses
159 -- pattern matching to mimic the definitions given in Sorokina and
160 -- Zeilfelder, pp. 84-86. If incorrect indices are supplied, the
161 -- function will simply error.
162 c :: Tetrahedron -> Int -> Int -> Int -> Int -> Double
166 fvs = function_values t
185 fld = front_left_down fvs
186 flt = front_left_top fvs
187 frd = front_right_down fvs
188 frt = front_right_top fvs
191 coefficient :: Int -> Int -> Int -> Int -> Double
192 coefficient 0 0 3 0 =
193 (1/8) * (i' + f + l' + t' + lt + fl + ft + flt)
195 coefficient 0 0 0 3 =
196 (1/8) * (i' + f + r + t' + rt + fr + ft + frt)
198 coefficient 0 0 2 1 =
199 (5/24)*(i' + f + t' + ft) + (1/24)*(l' + fl + lt + flt)
201 coefficient 0 0 1 2 =
202 (5/24)*(i' + f + t' + ft) + (1/24)*(r + fr + rt + frt)
204 coefficient 0 1 2 0 =
205 (5/24)*(i' + f) + (1/8)*(l' + t' + fl + ft)
208 coefficient 0 1 0 2 =
209 (5/24)*(i' + f) + (1/8)*(r + t' + fr + ft)
212 coefficient 0 1 1 1 =
213 (13/48)*(i' + f) + (7/48)*(t' + ft)
214 + (1/32)*(l' + r + fl + fr)
215 + (1/96)*(lt + rt + flt + frt)
217 coefficient 0 2 1 0 =
218 (13/48)*(i' + f) + (17/192)*(l' + t' + fl + ft)
220 + (1/64)*(r + d + fr + fd)
221 + (1/192)*(rt + ld + frt + fld)
223 coefficient 0 2 0 1 =
224 (13/48)*(i' + f) + (17/192)*(r + t' + fr + ft)
226 + (1/64)*(l' + d + fl + fd)
227 + (1/192)*(rd + lt + flt + frd)
229 coefficient 0 3 0 0 =
230 (13/48)*(i' + f) + (5/96)*(l' + r + t' + d + fl + fr + ft + fd)
231 + (1/192)*(rt + rd + lt + ld + frt + frd + flt + fld)
233 coefficient 1 0 2 0 =
234 (1/4)*i' + (1/6)*(f + l' + t')
235 + (1/12)*(lt + fl + ft)
237 coefficient 1 0 0 2 =
238 (1/4)*i' + (1/6)*(f + r + t')
239 + (1/12)*(rt + fr + ft)
241 coefficient 1 0 1 1 =
242 (1/3)*i' + (5/24)*(f + t')
245 + (1/48)*(lt + rt + fl + fr)
247 coefficient 1 1 1 0 =
251 + (1/48)*(d + r + lt)
252 + (1/96)*(fd + ld + rt + fr)
254 coefficient 1 1 0 1 =
258 + (1/48)*(d + l' + rt)
259 + (1/96)*(fd + lt + rd + fl)
261 coefficient 1 2 0 0 =
263 + (7/96)*(l' + r + t' + d)
264 + (1/32)*(fl + fr + ft + fd)
265 + (1/96)*(rt + rd + lt + ld)
267 coefficient 2 0 1 0 =
268 (3/8)*i' + (7/48)*(f + t' + l')
269 + (1/48)*(r + d + b + lt + fl + ft)
270 + (1/96)*(rt + bt + fr + fd + ld + bl)
272 coefficient 2 0 0 1 =
273 (3/8)*i' + (7/48)*(f + t' + r)
274 + (1/48)*(l' + d + b + rt + fr + ft)
275 + (1/96)*(lt + bt + fl + fd + rd + br)
277 coefficient 2 1 0 0 =
278 (3/8)*i' + (1/12)*(t' + r + l' + d)
279 + (1/64)*(ft + fr + fl + fd)
282 + (1/96)*(rt + ld + lt + rd)
283 + (1/192)*(bt + br + bl + bd)
285 coefficient 3 0 0 0 =
286 (3/8)*i' + (1/12)*(t' + f + l' + r + d + b)
287 + (1/96)*(lt + fl + ft + rt + bt + fr)
288 + (1/96)*(fd + ld + bd + br + rd + bl)
290 coefficient _ _ _ _ = error "coefficient index out of bounds"
294 -- | Compute the determinant of the 4x4 matrix,
301 -- where [1] = [1, 1, 1, 1],
302 -- [x] = [x1,x2,x3,x4],
306 -- The termX nonsense is an attempt to prevent Double overflow.
307 -- which has been observed to happen with large coordinates.
309 det :: Point -> Point -> Point -> Point -> Double
317 term1 = ((x2 - x4)*y1 - (x1 - x4)*y2 + (x1 - x2)*y4)*z3
318 term2 = ((x2 - x3)*y1 - (x1 - x3)*y2 + (x1 - x2)*y3)*z4
319 term3 = ((x3 - x4)*y2 - (x2 - x4)*y3 + (x2 - x3)*y4)*z1
320 term4 = ((x3 - x4)*y1 - (x1 - x4)*y3 + (x1 - x3)*y4)*z2
321 term5 = term1 - term2
322 term6 = term3 - term4
325 -- | Computed using the formula from Lai & Schumaker, Definition 15.4,
327 volume :: Tetrahedron -> Double
335 | otherwise = (1/6)*(det v0' v1' v2' v3')
343 -- | The barycentric coordinates of a point with respect to v0.
344 b0 :: Tetrahedron -> (RealFunction Point)
345 b0 t point = (volume inner_tetrahedron) / (precomputed_volume t)
347 inner_tetrahedron = t { v0 = point }
350 -- | The barycentric coordinates of a point with respect to v1.
351 b1 :: Tetrahedron -> (RealFunction Point)
352 b1 t point = (volume inner_tetrahedron) / (precomputed_volume t)
354 inner_tetrahedron = t { v1 = point }
357 -- | The barycentric coordinates of a point with respect to v2.
358 b2 :: Tetrahedron -> (RealFunction Point)
359 b2 t point = (volume inner_tetrahedron) / (precomputed_volume t)
361 inner_tetrahedron = t { v2 = point }
364 -- | The barycentric coordinates of a point with respect to v3.
365 b3 :: Tetrahedron -> (RealFunction Point)
366 b3 t point = (volume inner_tetrahedron) / (precomputed_volume t)
368 inner_tetrahedron = t { v3 = point }
376 -- | Check the volume of a particular tetrahedron (computed by hand)
377 -- and whether or not it contains a specific point chosen to be
378 -- outside of it. Its vertices are in clockwise order, so the volume
379 -- should be negative.
380 tetrahedron1_geometry_tests :: Test.Framework.Test
381 tetrahedron1_geometry_tests =
382 testGroup "tetrahedron1 geometry"
383 [ testCase "volume1" volume1,
384 testCase "doesn't contain point1" doesnt_contain_point1]
390 t = Tetrahedron { v0 = p0,
394 function_values = empty_values,
395 precomputed_volume = 0 }
399 assertEqual "volume is correct" True (vol ~= (-1/3))
403 doesnt_contain_point1 :: Assertion
404 doesnt_contain_point1 =
405 assertEqual "doesn't contain an exterior point" False contained
407 exterior_point = (5, 2, -9.0212)
408 contained = contains_point t exterior_point
411 -- | Check the volume of a particular tetrahedron (computed by hand)
412 -- and whether or not it contains a specific point chosen to be
413 -- inside of it. Its vertices are in counter-clockwise order, so the
414 -- volume should be positive.
415 tetrahedron2_geometry_tests :: Test.Framework.Test
416 tetrahedron2_geometry_tests =
417 testGroup "tetrahedron2 geometry"
418 [ testCase "volume1" volume1,
419 testCase "contains point1" contains_point1]
425 t = Tetrahedron { v0 = p0,
429 function_values = empty_values,
430 precomputed_volume = 0 }
433 volume1 = assertEqual "volume1 is correct" True (vol ~= (1/3))
437 contains_point1 :: Assertion
438 contains_point1 = assertEqual "contains an inner point" True contained
440 inner_point = (1, 0, 0.5)
441 contained = contains_point t inner_point
444 -- | Ensure that tetrahedra do not contain a particular point chosen to
445 -- be outside of them.
446 containment_tests :: Test.Framework.Test
448 testGroup "containment tests"
449 [ testCase "doesn't contain point2" doesnt_contain_point2,
450 testCase "doesn't contain point3" doesnt_contain_point3,
451 testCase "doesn't contain point4" doesnt_contain_point4,
452 testCase "doesn't contain point5" doesnt_contain_point5]
456 exterior_point = (0, 0, 0)
458 doesnt_contain_point2 :: Assertion
459 doesnt_contain_point2 =
460 assertEqual "doesn't contain an exterior point" False contained
464 t = Tetrahedron { v0 = p0,
468 function_values = empty_values,
469 precomputed_volume = 0 }
470 contained = contains_point t exterior_point
473 doesnt_contain_point3 :: Assertion
474 doesnt_contain_point3 =
475 assertEqual "doesn't contain an exterior point" False contained
479 t = Tetrahedron { v0 = p0,
483 function_values = empty_values,
484 precomputed_volume = 0 }
485 contained = contains_point t exterior_point
488 doesnt_contain_point4 :: Assertion
489 doesnt_contain_point4 =
490 assertEqual "doesn't contain an exterior point" False contained
494 t = Tetrahedron { v0 = p0,
498 function_values = empty_values,
499 precomputed_volume = 0 }
500 contained = contains_point t exterior_point
503 doesnt_contain_point5 :: Assertion
504 doesnt_contain_point5 =
505 assertEqual "doesn't contain an exterior point" False contained
509 t = Tetrahedron { v0 = p0,
513 function_values = empty_values,
514 precomputed_volume = 0 }
515 contained = contains_point t exterior_point
518 -- | The barycentric coordinate of v0 with respect to itself should
520 prop_b0_v0_always_unity :: Tetrahedron -> Property
521 prop_b0_v0_always_unity t =
522 (volume t) > 0 ==> (b0 t) (v0 t) ~= 1.0
524 -- | The barycentric coordinate of v1 with respect to v0 should
526 prop_b0_v1_always_zero :: Tetrahedron -> Property
527 prop_b0_v1_always_zero t =
528 (volume t) > 0 ==> (b0 t) (v1 t) ~= 0
530 -- | The barycentric coordinate of v2 with respect to v0 should
532 prop_b0_v2_always_zero :: Tetrahedron -> Property
533 prop_b0_v2_always_zero t =
534 (volume t) > 0 ==> (b0 t) (v2 t) ~= 0
536 -- | The barycentric coordinate of v3 with respect to v0 should
538 prop_b0_v3_always_zero :: Tetrahedron -> Property
539 prop_b0_v3_always_zero t =
540 (volume t) > 0 ==> (b0 t) (v3 t) ~= 0
542 -- | The barycentric coordinate of v1 with respect to itself should
544 prop_b1_v1_always_unity :: Tetrahedron -> Property
545 prop_b1_v1_always_unity t =
546 (volume t) > 0 ==> (b1 t) (v1 t) ~= 1.0
548 -- | The barycentric coordinate of v0 with respect to v1 should
550 prop_b1_v0_always_zero :: Tetrahedron -> Property
551 prop_b1_v0_always_zero t =
552 (volume t) > 0 ==> (b1 t) (v0 t) ~= 0
554 -- | The barycentric coordinate of v2 with respect to v1 should
556 prop_b1_v2_always_zero :: Tetrahedron -> Property
557 prop_b1_v2_always_zero t =
558 (volume t) > 0 ==> (b1 t) (v2 t) ~= 0
560 -- | The barycentric coordinate of v3 with respect to v1 should
562 prop_b1_v3_always_zero :: Tetrahedron -> Property
563 prop_b1_v3_always_zero t =
564 (volume t) > 0 ==> (b1 t) (v3 t) ~= 0
566 -- | The barycentric coordinate of v2 with respect to itself should
568 prop_b2_v2_always_unity :: Tetrahedron -> Property
569 prop_b2_v2_always_unity t =
570 (volume t) > 0 ==> (b2 t) (v2 t) ~= 1.0
572 -- | The barycentric coordinate of v0 with respect to v2 should
574 prop_b2_v0_always_zero :: Tetrahedron -> Property
575 prop_b2_v0_always_zero t =
576 (volume t) > 0 ==> (b2 t) (v0 t) ~= 0
578 -- | The barycentric coordinate of v1 with respect to v2 should
580 prop_b2_v1_always_zero :: Tetrahedron -> Property
581 prop_b2_v1_always_zero t =
582 (volume t) > 0 ==> (b2 t) (v1 t) ~= 0
584 -- | The barycentric coordinate of v3 with respect to v2 should
586 prop_b2_v3_always_zero :: Tetrahedron -> Property
587 prop_b2_v3_always_zero t =
588 (volume t) > 0 ==> (b2 t) (v3 t) ~= 0
590 -- | The barycentric coordinate of v3 with respect to itself should
592 prop_b3_v3_always_unity :: Tetrahedron -> Property
593 prop_b3_v3_always_unity t =
594 (volume t) > 0 ==> (b3 t) (v3 t) ~= 1.0
596 -- | The barycentric coordinate of v0 with respect to v3 should
598 prop_b3_v0_always_zero :: Tetrahedron -> Property
599 prop_b3_v0_always_zero t =
600 (volume t) > 0 ==> (b3 t) (v0 t) ~= 0
602 -- | The barycentric coordinate of v1 with respect to v3 should
604 prop_b3_v1_always_zero :: Tetrahedron -> Property
605 prop_b3_v1_always_zero t =
606 (volume t) > 0 ==> (b3 t) (v1 t) ~= 0
608 -- | The barycentric coordinate of v2 with respect to v3 should
610 prop_b3_v2_always_zero :: Tetrahedron -> Property
611 prop_b3_v2_always_zero t =
612 (volume t) > 0 ==> (b3 t) (v2 t) ~= 0
615 -- | Used for convenience in the next few tests; not a test itself.
616 p :: Tetrahedron -> Int -> Int -> Int -> Int -> Double
617 p t i j k l = (polynomial t) (xi t i j k l)
619 -- | Given in Sorokina and Zeilfelder, p. 78.
620 prop_c3000_identity :: Tetrahedron -> Property
621 prop_c3000_identity t =
623 c t 3 0 0 0 ~= p t 3 0 0 0
625 -- | Given in Sorokina and Zeilfelder, p. 78.
626 prop_c2100_identity :: Tetrahedron -> Property
627 prop_c2100_identity t =
629 c t 2 1 0 0 ~= (term1 - term2 + term3 - term4)
631 term1 = (1/3)*(p t 0 3 0 0)
632 term2 = (5/6)*(p t 3 0 0 0)
633 term3 = 3*(p t 2 1 0 0)
634 term4 = (3/2)*(p t 1 2 0 0)
636 -- | Given in Sorokina and Zeilfelder, p. 78.
637 prop_c1110_identity :: Tetrahedron -> Property
638 prop_c1110_identity t =
640 c t 1 1 1 0 ~= (term1 + term2 - term3 - term4)
642 term1 = (1/3)*((p t 3 0 0 0) + (p t 0 3 0 0) + (p t 0 0 3 0))
643 term2 = (9/2)*(p t 1 1 1 0)
644 term3 = (3/4)*((p t 2 1 0 0) + (p t 1 2 0 0) + (p t 2 0 1 0))
645 term4 = (3/4)*((p t 1 0 2 0) + (p t 0 2 1 0) + (p t 0 1 2 0))
648 prop_swapping_vertices_doesnt_affect_coefficients1 :: Tetrahedron -> Bool
649 prop_swapping_vertices_doesnt_affect_coefficients1 t =
650 c t 0 0 1 2 == c t' 0 0 1 2
652 t' = t { v0 = (v1 t), v1 = (v0 t) }
654 prop_swapping_vertices_doesnt_affect_coefficients2 :: Tetrahedron -> Bool
655 prop_swapping_vertices_doesnt_affect_coefficients2 t =
656 c t 0 1 1 1 == c t' 0 1 1 1
658 t' = t { v2 = (v3 t), v3 = (v2 t) }
660 prop_swapping_vertices_doesnt_affect_coefficients3 :: Tetrahedron -> Bool
661 prop_swapping_vertices_doesnt_affect_coefficients3 t =
662 c t 2 1 0 0 == c t' 2 1 0 0
664 t' = t { v2 = (v3 t), v3 = (v2 t) }
666 prop_swapping_vertices_doesnt_affect_coefficients4 :: Tetrahedron -> Bool
667 prop_swapping_vertices_doesnt_affect_coefficients4 t =
668 c t 2 0 0 1 == c t' 2 0 0 1
670 t' = t { v0 = (v3 t), v3 = (v0 t) }
675 tetrahedron_tests :: Test.Framework.Test
677 testGroup "Tetrahedron Tests" [
678 tetrahedron1_geometry_tests,
679 tetrahedron2_geometry_tests,
684 p78_24_properties :: Test.Framework.Test
686 testGroup "p. 78, Section (2.4) Properties" [
687 testProperty "c3000 identity" prop_c3000_identity,
688 testProperty "c2100 identity" prop_c2100_identity,
689 testProperty "c1110 identity" prop_c1110_identity]
692 tetrahedron_properties :: Test.Framework.Test
693 tetrahedron_properties =
694 testGroup "Tetrahedron Properties" [
696 testProperty "b0_v0_always_unity" prop_b0_v0_always_unity,
697 testProperty "b0_v1_always_zero" prop_b0_v1_always_zero,
698 testProperty "b0_v2_always_zero" prop_b0_v2_always_zero,
699 testProperty "b0_v3_always_zero" prop_b0_v3_always_zero,
700 testProperty "b1_v1_always_unity" prop_b1_v1_always_unity,
701 testProperty "b1_v0_always_zero" prop_b1_v0_always_zero,
702 testProperty "b1_v2_always_zero" prop_b1_v2_always_zero,
703 testProperty "b1_v3_always_zero" prop_b1_v3_always_zero,
704 testProperty "b2_v2_always_unity" prop_b2_v2_always_unity,
705 testProperty "b2_v0_always_zero" prop_b2_v0_always_zero,
706 testProperty "b2_v1_always_zero" prop_b2_v1_always_zero,
707 testProperty "b2_v3_always_zero" prop_b2_v3_always_zero,
708 testProperty "b3_v3_always_unity" prop_b3_v3_always_unity,
709 testProperty "b3_v0_always_zero" prop_b3_v0_always_zero,
710 testProperty "b3_v1_always_zero" prop_b3_v1_always_zero,
711 testProperty "b3_v2_always_zero" prop_b3_v2_always_zero,
712 testProperty "swapping_vertices_doesnt_affect_coefficients1" $
713 prop_swapping_vertices_doesnt_affect_coefficients1,
714 testProperty "swapping_vertices_doesnt_affect_coefficients2" $
715 prop_swapping_vertices_doesnt_affect_coefficients2,
716 testProperty "swapping_vertices_doesnt_affect_coefficients3" $
717 prop_swapping_vertices_doesnt_affect_coefficients3,
718 testProperty "swapping_vertices_doesnt_affect_coefficients4" $
719 prop_swapping_vertices_doesnt_affect_coefficients4 ]