1 {-# LANGUAGE BangPatterns #-}
12 tetrahedron_properties,
18 import qualified Data.Vector as V (
24 import Test.Framework (Test, testGroup)
25 import Test.Framework.Providers.HUnit (testCase)
26 import Test.Framework.Providers.QuickCheck2 (testProperty)
27 import Test.HUnit (Assertion, assertEqual)
28 import Test.QuickCheck (Arbitrary(..), Gen, Property, (==>))
30 import Comparisons ((~=), nearly_ge)
31 import FunctionValues (FunctionValues(..), empty_values)
32 import Misc (factorial)
33 import Point (Point(..), scale)
34 import RealFunction (RealFunction, cmult, fexp)
37 Tetrahedron { function_values :: FunctionValues,
42 precomputed_volume :: !Double
47 instance Arbitrary Tetrahedron where
49 rnd_v0 <- arbitrary :: Gen Point
50 rnd_v1 <- arbitrary :: Gen Point
51 rnd_v2 <- arbitrary :: Gen Point
52 rnd_v3 <- arbitrary :: Gen Point
53 rnd_fv <- arbitrary :: Gen FunctionValues
55 -- We can't assign an incorrect precomputed volume,
56 -- so we have to calculate the correct one here.
57 let t' = Tetrahedron rnd_fv rnd_v0 rnd_v1 rnd_v2 rnd_v3 0
59 return (Tetrahedron rnd_fv rnd_v0 rnd_v1 rnd_v2 rnd_v3 vol)
62 instance Show Tetrahedron where
63 show t = "Tetrahedron:\n" ++
64 " function_values: " ++ (show (function_values t)) ++ "\n" ++
65 " v0: " ++ (show (v0 t)) ++ "\n" ++
66 " v1: " ++ (show (v1 t)) ++ "\n" ++
67 " v2: " ++ (show (v2 t)) ++ "\n" ++
68 " v3: " ++ (show (v3 t)) ++ "\n"
71 -- | Find the barycenter of the given tetrahedron.
72 -- We just average the four vertices.
73 barycenter :: Tetrahedron -> Point
74 barycenter (Tetrahedron _ v0' v1' v2' v3' _) =
75 (v0' + v1' + v2' + v3') `scale` (1/4)
77 -- | A point is internal to a tetrahedron if all of its barycentric
78 -- coordinates with respect to that tetrahedron are non-negative.
79 contains_point :: Tetrahedron -> Point -> Bool
81 b0_unscaled `nearly_ge` 0 &&
82 b1_unscaled `nearly_ge` 0 &&
83 b2_unscaled `nearly_ge` 0 &&
84 b3_unscaled `nearly_ge` 0
86 -- Drop the useless division and volume calculation that we
87 -- would do if we used the regular b0,..b3 functions.
89 b0_unscaled = volume inner_tetrahedron
91 inner_tetrahedron = t { v0 = p0 }
94 b1_unscaled = volume inner_tetrahedron
95 where inner_tetrahedron = t { v1 = p0 }
98 b2_unscaled = volume inner_tetrahedron
99 where inner_tetrahedron = t { v2 = p0 }
101 b3_unscaled :: Double
102 b3_unscaled = volume inner_tetrahedron
103 where inner_tetrahedron = t { v3 = p0 }
106 {-# INLINE polynomial #-}
107 polynomial :: Tetrahedron -> (RealFunction Point)
109 V.sum $ V.singleton ((c t 0 0 0 3) `cmult` (beta t 0 0 0 3)) `V.snoc`
110 ((c t 0 0 1 2) `cmult` (beta t 0 0 1 2)) `V.snoc`
111 ((c t 0 0 2 1) `cmult` (beta t 0 0 2 1)) `V.snoc`
112 ((c t 0 0 3 0) `cmult` (beta t 0 0 3 0)) `V.snoc`
113 ((c t 0 1 0 2) `cmult` (beta t 0 1 0 2)) `V.snoc`
114 ((c t 0 1 1 1) `cmult` (beta t 0 1 1 1)) `V.snoc`
115 ((c t 0 1 2 0) `cmult` (beta t 0 1 2 0)) `V.snoc`
116 ((c t 0 2 0 1) `cmult` (beta t 0 2 0 1)) `V.snoc`
117 ((c t 0 2 1 0) `cmult` (beta t 0 2 1 0)) `V.snoc`
118 ((c t 0 3 0 0) `cmult` (beta t 0 3 0 0)) `V.snoc`
119 ((c t 1 0 0 2) `cmult` (beta t 1 0 0 2)) `V.snoc`
120 ((c t 1 0 1 1) `cmult` (beta t 1 0 1 1)) `V.snoc`
121 ((c t 1 0 2 0) `cmult` (beta t 1 0 2 0)) `V.snoc`
122 ((c t 1 1 0 1) `cmult` (beta t 1 1 0 1)) `V.snoc`
123 ((c t 1 1 1 0) `cmult` (beta t 1 1 1 0)) `V.snoc`
124 ((c t 1 2 0 0) `cmult` (beta t 1 2 0 0)) `V.snoc`
125 ((c t 2 0 0 1) `cmult` (beta t 2 0 0 1)) `V.snoc`
126 ((c t 2 0 1 0) `cmult` (beta t 2 0 1 0)) `V.snoc`
127 ((c t 2 1 0 0) `cmult` (beta t 2 1 0 0)) `V.snoc`
128 ((c t 3 0 0 0) `cmult` (beta t 3 0 0 0))
132 -- | The Bernstein polynomial on t with indices i,j,k,l. Denoted by a
133 -- capital 'B' in the Sorokina/Zeilfelder paper.
134 beta :: Tetrahedron -> Int -> Int -> Int -> Int -> (RealFunction Point)
136 coefficient `cmult` (b0_term * b1_term * b2_term * b3_term)
138 denominator = (factorial i)*(factorial j)*(factorial k)*(factorial l)
139 coefficient = 6 / (fromIntegral denominator)
140 b0_term = (b0 t) `fexp` i
141 b1_term = (b1 t) `fexp` j
142 b2_term = (b2 t) `fexp` k
143 b3_term = (b3 t) `fexp` l
146 -- | The coefficient function. c t i j k l returns the coefficient
147 -- c_ijkl with respect to the tetrahedron t. The definition uses
148 -- pattern matching to mimic the definitions given in Sorokina and
149 -- Zeilfelder, pp. 84-86. If incorrect indices are supplied, the world
150 -- will end. This is for performance reasons.
151 c :: Tetrahedron -> Int -> Int -> Int -> Int -> Double
155 fvs = function_values t
174 fld = front_left_down fvs
175 flt = front_left_top fvs
176 frd = front_right_down fvs
177 frt = front_right_top fvs
180 coefficient :: Int -> Int -> Int -> Int -> Double
181 coefficient 0 0 3 0 =
182 (1/8) * (i' + f + l' + t' + lt + fl + ft + flt)
184 coefficient 0 0 0 3 =
185 (1/8) * (i' + f + r + t' + rt + fr + ft + frt)
187 coefficient 0 0 2 1 =
188 (5/24)*(i' + f + t' + ft) + (1/24)*(l' + fl + lt + flt)
190 coefficient 0 0 1 2 =
191 (5/24)*(i' + f + t' + ft) + (1/24)*(r + fr + rt + frt)
193 coefficient 0 1 2 0 =
194 (5/24)*(i' + f) + (1/8)*(l' + t' + fl + ft)
197 coefficient 0 1 0 2 =
198 (5/24)*(i' + f) + (1/8)*(r + t' + fr + ft)
201 coefficient 0 1 1 1 =
202 (13/48)*(i' + f) + (7/48)*(t' + ft)
203 + (1/32)*(l' + r + fl + fr)
204 + (1/96)*(lt + rt + flt + frt)
206 coefficient 0 2 1 0 =
207 (13/48)*(i' + f) + (17/192)*(l' + t' + fl + ft)
209 + (1/64)*(r + d + fr + fd)
210 + (1/192)*(rt + ld + frt + fld)
212 coefficient 0 2 0 1 =
213 (13/48)*(i' + f) + (17/192)*(r + t' + fr + ft)
215 + (1/64)*(l' + d + fl + fd)
216 + (1/192)*(rd + lt + flt + frd)
218 coefficient 0 3 0 0 =
219 (13/48)*(i' + f) + (5/96)*(l' + r + t' + d + fl + fr + ft + fd)
220 + (1/192)*(rt + rd + lt + ld + frt + frd + flt + fld)
222 coefficient 1 0 2 0 =
223 (1/4)*i' + (1/6)*(f + l' + t')
224 + (1/12)*(lt + fl + ft)
226 coefficient 1 0 0 2 =
227 (1/4)*i' + (1/6)*(f + r + t')
228 + (1/12)*(rt + fr + ft)
230 coefficient 1 0 1 1 =
231 (1/3)*i' + (5/24)*(f + t')
234 + (1/48)*(lt + rt + fl + fr)
236 coefficient 1 1 1 0 =
240 + (1/48)*(d + r + lt)
241 + (1/96)*(fd + ld + rt + fr)
243 coefficient 1 1 0 1 =
247 + (1/48)*(d + l' + rt)
248 + (1/96)*(fd + lt + rd + fl)
250 coefficient 1 2 0 0 =
252 + (7/96)*(l' + r + t' + d)
253 + (1/32)*(fl + fr + ft + fd)
254 + (1/96)*(rt + rd + lt + ld)
256 coefficient 2 0 1 0 =
257 (3/8)*i' + (7/48)*(f + t' + l')
258 + (1/48)*(r + d + b + lt + fl + ft)
259 + (1/96)*(rt + bt + fr + fd + ld + bl)
261 coefficient 2 0 0 1 =
262 (3/8)*i' + (7/48)*(f + t' + r)
263 + (1/48)*(l' + d + b + rt + fr + ft)
264 + (1/96)*(lt + bt + fl + fd + rd + br)
266 coefficient 2 1 0 0 =
267 (3/8)*i' + (1/12)*(t' + r + l' + d)
268 + (1/64)*(ft + fr + fl + fd)
271 + (1/96)*(rt + ld + lt + rd)
272 + (1/192)*(bt + br + bl + bd)
274 coefficient 3 0 0 0 =
275 (3/8)*i' + (1/12)*(t' + f + l' + r + d + b)
276 + (1/96)*(lt + fl + ft + rt + bt + fr)
277 + (1/96)*(fd + ld + bd + br + rd + bl)
281 -- | Compute the determinant of the 4x4 matrix,
288 -- where [1] = [1, 1, 1, 1],
289 -- [x] = [x1,x2,x3,x4],
293 -- The termX nonsense is an attempt to prevent Double overflow.
294 -- which has been observed to happen with large coordinates.
296 det :: Point -> Point -> Point -> Point -> Double
304 term1 = ((x2 - x4)*y1 - (x1 - x4)*y2 + (x1 - x2)*y4)*z3
305 term2 = ((x2 - x3)*y1 - (x1 - x3)*y2 + (x1 - x2)*y3)*z4
306 term3 = ((x3 - x4)*y2 - (x2 - x4)*y3 + (x2 - x3)*y4)*z1
307 term4 = ((x3 - x4)*y1 - (x1 - x4)*y3 + (x1 - x3)*y4)*z2
308 term5 = term1 - term2
309 term6 = term3 - term4
312 -- | Computed using the formula from Lai & Schumaker, Definition 15.4,
314 {-# INLINE volume #-}
315 volume :: Tetrahedron -> Double
323 | otherwise = (1/6)*(det v0' v1' v2' v3')
331 -- | The barycentric coordinates of a point with respect to v0.
333 b0 :: Tetrahedron -> (RealFunction Point)
334 b0 t point = (volume inner_tetrahedron) / (precomputed_volume t)
336 inner_tetrahedron = t { v0 = point }
339 -- | The barycentric coordinates of a point with respect to v1.
341 b1 :: Tetrahedron -> (RealFunction Point)
342 b1 t point = (volume inner_tetrahedron) / (precomputed_volume t)
344 inner_tetrahedron = t { v1 = point }
347 -- | The barycentric coordinates of a point with respect to v2.
349 b2 :: Tetrahedron -> (RealFunction Point)
350 b2 t point = (volume inner_tetrahedron) / (precomputed_volume t)
352 inner_tetrahedron = t { v2 = point }
355 -- | The barycentric coordinates of a point with respect to v3.
357 b3 :: Tetrahedron -> (RealFunction Point)
358 b3 t point = (volume inner_tetrahedron) / (precomputed_volume t)
360 inner_tetrahedron = t { v3 = point }
368 -- | Check the volume of a particular tetrahedron (computed by hand)
369 -- and whether or not it contains a specific point chosen to be
370 -- outside of it. Its vertices are in clockwise order, so the volume
371 -- should be negative.
372 tetrahedron1_geometry_tests :: Test.Framework.Test
373 tetrahedron1_geometry_tests =
374 testGroup "tetrahedron1 geometry"
375 [ testCase "volume1" volume1,
376 testCase "doesn't contain point1" doesnt_contain_point1]
378 p0 = Point 0 (-0.5) 0
382 t = Tetrahedron { v0 = p0,
386 function_values = empty_values,
387 precomputed_volume = 0 }
391 assertEqual "volume is correct" True (vol ~= (-1/3))
395 doesnt_contain_point1 :: Assertion
396 doesnt_contain_point1 =
397 assertEqual "doesn't contain an exterior point" False contained
399 exterior_point = Point 5 2 (-9.0212)
400 contained = contains_point t exterior_point
403 -- | Check the volume of a particular tetrahedron (computed by hand)
404 -- and whether or not it contains a specific point chosen to be
405 -- inside of it. Its vertices are in counter-clockwise order, so the
406 -- volume should be positive.
407 tetrahedron2_geometry_tests :: Test.Framework.Test
408 tetrahedron2_geometry_tests =
409 testGroup "tetrahedron2 geometry"
410 [ testCase "volume1" volume1,
411 testCase "contains point1" contains_point1]
413 p0 = Point 0 (-0.5) 0
417 t = Tetrahedron { v0 = p0,
421 function_values = empty_values,
422 precomputed_volume = 0 }
425 volume1 = assertEqual "volume1 is correct" True (vol ~= (1/3))
429 contains_point1 :: Assertion
430 contains_point1 = assertEqual "contains an inner point" True contained
432 inner_point = Point 1 0 0.5
433 contained = contains_point t inner_point
436 -- | Ensure that tetrahedra do not contain a particular point chosen to
437 -- be outside of them.
438 containment_tests :: Test.Framework.Test
440 testGroup "containment tests"
441 [ testCase "doesn't contain point2" doesnt_contain_point2,
442 testCase "doesn't contain point3" doesnt_contain_point3,
443 testCase "doesn't contain point4" doesnt_contain_point4,
444 testCase "doesn't contain point5" doesnt_contain_point5]
447 p3 = Point 0.5 0.5 0.5
448 exterior_point = Point 0 0 0
450 doesnt_contain_point2 :: Assertion
451 doesnt_contain_point2 =
452 assertEqual "doesn't contain an exterior point" False contained
456 t = Tetrahedron { v0 = p0,
460 function_values = empty_values,
461 precomputed_volume = 0 }
462 contained = contains_point t exterior_point
465 doesnt_contain_point3 :: Assertion
466 doesnt_contain_point3 =
467 assertEqual "doesn't contain an exterior point" False contained
471 t = Tetrahedron { v0 = p0,
475 function_values = empty_values,
476 precomputed_volume = 0 }
477 contained = contains_point t exterior_point
480 doesnt_contain_point4 :: Assertion
481 doesnt_contain_point4 =
482 assertEqual "doesn't contain an exterior point" False contained
486 t = Tetrahedron { v0 = p0,
490 function_values = empty_values,
491 precomputed_volume = 0 }
492 contained = contains_point t exterior_point
495 doesnt_contain_point5 :: Assertion
496 doesnt_contain_point5 =
497 assertEqual "doesn't contain an exterior point" False contained
501 t = Tetrahedron { v0 = p0,
505 function_values = empty_values,
506 precomputed_volume = 0 }
507 contained = contains_point t exterior_point
510 -- | The barycentric coordinate of v0 with respect to itself should
512 prop_b0_v0_always_unity :: Tetrahedron -> Property
513 prop_b0_v0_always_unity t =
514 (volume t) > 0 ==> (b0 t) (v0 t) ~= 1.0
516 -- | The barycentric coordinate of v1 with respect to v0 should
518 prop_b0_v1_always_zero :: Tetrahedron -> Property
519 prop_b0_v1_always_zero t =
520 (volume t) > 0 ==> (b0 t) (v1 t) ~= 0
522 -- | The barycentric coordinate of v2 with respect to v0 should
524 prop_b0_v2_always_zero :: Tetrahedron -> Property
525 prop_b0_v2_always_zero t =
526 (volume t) > 0 ==> (b0 t) (v2 t) ~= 0
528 -- | The barycentric coordinate of v3 with respect to v0 should
530 prop_b0_v3_always_zero :: Tetrahedron -> Property
531 prop_b0_v3_always_zero t =
532 (volume t) > 0 ==> (b0 t) (v3 t) ~= 0
534 -- | The barycentric coordinate of v1 with respect to itself should
536 prop_b1_v1_always_unity :: Tetrahedron -> Property
537 prop_b1_v1_always_unity t =
538 (volume t) > 0 ==> (b1 t) (v1 t) ~= 1.0
540 -- | The barycentric coordinate of v0 with respect to v1 should
542 prop_b1_v0_always_zero :: Tetrahedron -> Property
543 prop_b1_v0_always_zero t =
544 (volume t) > 0 ==> (b1 t) (v0 t) ~= 0
546 -- | The barycentric coordinate of v2 with respect to v1 should
548 prop_b1_v2_always_zero :: Tetrahedron -> Property
549 prop_b1_v2_always_zero t =
550 (volume t) > 0 ==> (b1 t) (v2 t) ~= 0
552 -- | The barycentric coordinate of v3 with respect to v1 should
554 prop_b1_v3_always_zero :: Tetrahedron -> Property
555 prop_b1_v3_always_zero t =
556 (volume t) > 0 ==> (b1 t) (v3 t) ~= 0
558 -- | The barycentric coordinate of v2 with respect to itself should
560 prop_b2_v2_always_unity :: Tetrahedron -> Property
561 prop_b2_v2_always_unity t =
562 (volume t) > 0 ==> (b2 t) (v2 t) ~= 1.0
564 -- | The barycentric coordinate of v0 with respect to v2 should
566 prop_b2_v0_always_zero :: Tetrahedron -> Property
567 prop_b2_v0_always_zero t =
568 (volume t) > 0 ==> (b2 t) (v0 t) ~= 0
570 -- | The barycentric coordinate of v1 with respect to v2 should
572 prop_b2_v1_always_zero :: Tetrahedron -> Property
573 prop_b2_v1_always_zero t =
574 (volume t) > 0 ==> (b2 t) (v1 t) ~= 0
576 -- | The barycentric coordinate of v3 with respect to v2 should
578 prop_b2_v3_always_zero :: Tetrahedron -> Property
579 prop_b2_v3_always_zero t =
580 (volume t) > 0 ==> (b2 t) (v3 t) ~= 0
582 -- | The barycentric coordinate of v3 with respect to itself should
584 prop_b3_v3_always_unity :: Tetrahedron -> Property
585 prop_b3_v3_always_unity t =
586 (volume t) > 0 ==> (b3 t) (v3 t) ~= 1.0
588 -- | The barycentric coordinate of v0 with respect to v3 should
590 prop_b3_v0_always_zero :: Tetrahedron -> Property
591 prop_b3_v0_always_zero t =
592 (volume t) > 0 ==> (b3 t) (v0 t) ~= 0
594 -- | The barycentric coordinate of v1 with respect to v3 should
596 prop_b3_v1_always_zero :: Tetrahedron -> Property
597 prop_b3_v1_always_zero t =
598 (volume t) > 0 ==> (b3 t) (v1 t) ~= 0
600 -- | The barycentric coordinate of v2 with respect to v3 should
602 prop_b3_v2_always_zero :: Tetrahedron -> Property
603 prop_b3_v2_always_zero t =
604 (volume t) > 0 ==> (b3 t) (v2 t) ~= 0
607 prop_swapping_vertices_doesnt_affect_coefficients1 :: Tetrahedron -> Bool
608 prop_swapping_vertices_doesnt_affect_coefficients1 t =
609 c t 0 0 1 2 == c t' 0 0 1 2
611 t' = t { v0 = (v1 t), v1 = (v0 t) }
613 prop_swapping_vertices_doesnt_affect_coefficients2 :: Tetrahedron -> Bool
614 prop_swapping_vertices_doesnt_affect_coefficients2 t =
615 c t 0 1 1 1 == c t' 0 1 1 1
617 t' = t { v2 = (v3 t), v3 = (v2 t) }
619 prop_swapping_vertices_doesnt_affect_coefficients3 :: Tetrahedron -> Bool
620 prop_swapping_vertices_doesnt_affect_coefficients3 t =
621 c t 2 1 0 0 == c t' 2 1 0 0
623 t' = t { v2 = (v3 t), v3 = (v2 t) }
625 prop_swapping_vertices_doesnt_affect_coefficients4 :: Tetrahedron -> Bool
626 prop_swapping_vertices_doesnt_affect_coefficients4 t =
627 c t 2 0 0 1 == c t' 2 0 0 1
629 t' = t { v0 = (v3 t), v3 = (v0 t) }
634 tetrahedron_tests :: Test.Framework.Test
636 testGroup "Tetrahedron Tests" [
637 tetrahedron1_geometry_tests,
638 tetrahedron2_geometry_tests,
643 p78_24_properties :: Test.Framework.Test
645 testGroup "p. 78, Section (2.4) Properties" [
646 testProperty "c3000 identity" prop_c3000_identity,
647 testProperty "c2100 identity" prop_c2100_identity,
648 testProperty "c1110 identity" prop_c1110_identity]
650 -- | Returns the domain point of t with indices i,j,k,l.
651 domain_point :: Tetrahedron -> Int -> Int -> Int -> Int -> Point
652 domain_point t i j k l =
653 weighted_sum `scale` (1/3)
655 v0' = (v0 t) `scale` (fromIntegral i)
656 v1' = (v1 t) `scale` (fromIntegral j)
657 v2' = (v2 t) `scale` (fromIntegral k)
658 v3' = (v3 t) `scale` (fromIntegral l)
659 weighted_sum = v0' + v1' + v2' + v3'
662 -- | Used for convenience in the next few tests.
663 p :: Tetrahedron -> Int -> Int -> Int -> Int -> Double
664 p t i j k l = (polynomial t) (domain_point t i j k l)
667 -- | Given in Sorokina and Zeilfelder, p. 78.
668 prop_c3000_identity :: Tetrahedron -> Property
669 prop_c3000_identity t =
671 c t 3 0 0 0 ~= p t 3 0 0 0
673 -- | Given in Sorokina and Zeilfelder, p. 78.
674 prop_c2100_identity :: Tetrahedron -> Property
675 prop_c2100_identity t =
677 c t 2 1 0 0 ~= (term1 - term2 + term3 - term4)
679 term1 = (1/3)*(p t 0 3 0 0)
680 term2 = (5/6)*(p t 3 0 0 0)
681 term3 = 3*(p t 2 1 0 0)
682 term4 = (3/2)*(p t 1 2 0 0)
684 -- | Given in Sorokina and Zeilfelder, p. 78.
685 prop_c1110_identity :: Tetrahedron -> Property
686 prop_c1110_identity t =
688 c t 1 1 1 0 ~= (term1 + term2 - term3 - term4)
690 term1 = (1/3)*((p t 3 0 0 0) + (p t 0 3 0 0) + (p t 0 0 3 0))
691 term2 = (9/2)*(p t 1 1 1 0)
692 term3 = (3/4)*((p t 2 1 0 0) + (p t 1 2 0 0) + (p t 2 0 1 0))
693 term4 = (3/4)*((p t 1 0 2 0) + (p t 0 2 1 0) + (p t 0 1 2 0))
697 tetrahedron_properties :: Test.Framework.Test
698 tetrahedron_properties =
699 testGroup "Tetrahedron Properties" [
701 testProperty "b0_v0_always_unity" prop_b0_v0_always_unity,
702 testProperty "b0_v1_always_zero" prop_b0_v1_always_zero,
703 testProperty "b0_v2_always_zero" prop_b0_v2_always_zero,
704 testProperty "b0_v3_always_zero" prop_b0_v3_always_zero,
705 testProperty "b1_v1_always_unity" prop_b1_v1_always_unity,
706 testProperty "b1_v0_always_zero" prop_b1_v0_always_zero,
707 testProperty "b1_v2_always_zero" prop_b1_v2_always_zero,
708 testProperty "b1_v3_always_zero" prop_b1_v3_always_zero,
709 testProperty "b2_v2_always_unity" prop_b2_v2_always_unity,
710 testProperty "b2_v0_always_zero" prop_b2_v0_always_zero,
711 testProperty "b2_v1_always_zero" prop_b2_v1_always_zero,
712 testProperty "b2_v3_always_zero" prop_b2_v3_always_zero,
713 testProperty "b3_v3_always_unity" prop_b3_v3_always_unity,
714 testProperty "b3_v0_always_zero" prop_b3_v0_always_zero,
715 testProperty "b3_v1_always_zero" prop_b3_v1_always_zero,
716 testProperty "b3_v2_always_zero" prop_b3_v2_always_zero,
717 testProperty "swapping_vertices_doesnt_affect_coefficients1" $
718 prop_swapping_vertices_doesnt_affect_coefficients1,
719 testProperty "swapping_vertices_doesnt_affect_coefficients2" $
720 prop_swapping_vertices_doesnt_affect_coefficients2,
721 testProperty "swapping_vertices_doesnt_affect_coefficients3" $
722 prop_swapping_vertices_doesnt_affect_coefficients3,
723 testProperty "swapping_vertices_doesnt_affect_coefficients4" $
724 prop_swapping_vertices_doesnt_affect_coefficients4 ]