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
316 volume (Tetrahedron _ v0' v1' v2' v3' _) =
317 (1/6)*(det v0' v1' v2' v3')
319 -- | The barycentric coordinates of a point with respect to v0.
321 b0 :: Tetrahedron -> (RealFunction Point)
322 b0 t point = (volume inner_tetrahedron) / (precomputed_volume t)
324 inner_tetrahedron = t { v0 = point }
327 -- | The barycentric coordinates of a point with respect to v1.
329 b1 :: Tetrahedron -> (RealFunction Point)
330 b1 t point = (volume inner_tetrahedron) / (precomputed_volume t)
332 inner_tetrahedron = t { v1 = point }
335 -- | The barycentric coordinates of a point with respect to v2.
337 b2 :: Tetrahedron -> (RealFunction Point)
338 b2 t point = (volume inner_tetrahedron) / (precomputed_volume t)
340 inner_tetrahedron = t { v2 = point }
343 -- | The barycentric coordinates of a point with respect to v3.
345 b3 :: Tetrahedron -> (RealFunction Point)
346 b3 t point = (volume inner_tetrahedron) / (precomputed_volume t)
348 inner_tetrahedron = t { v3 = point }
356 -- | Check the volume of a particular tetrahedron (computed by hand)
357 -- and whether or not it contains a specific point chosen to be
358 -- outside of it. Its vertices are in clockwise order, so the volume
359 -- should be negative.
360 tetrahedron1_geometry_tests :: Test.Framework.Test
361 tetrahedron1_geometry_tests =
362 testGroup "tetrahedron1 geometry"
363 [ testCase "volume1" volume1,
364 testCase "doesn't contain point1" doesnt_contain_point1]
366 p0 = Point 0 (-0.5) 0
370 t = Tetrahedron { v0 = p0,
374 function_values = empty_values,
375 precomputed_volume = 0 }
379 assertEqual "volume is correct" True (vol ~= (-1/3))
383 doesnt_contain_point1 :: Assertion
384 doesnt_contain_point1 =
385 assertEqual "doesn't contain an exterior point" False contained
387 exterior_point = Point 5 2 (-9.0212)
388 contained = contains_point t exterior_point
391 -- | Check the volume of a particular tetrahedron (computed by hand)
392 -- and whether or not it contains a specific point chosen to be
393 -- inside of it. Its vertices are in counter-clockwise order, so the
394 -- volume should be positive.
395 tetrahedron2_geometry_tests :: Test.Framework.Test
396 tetrahedron2_geometry_tests =
397 testGroup "tetrahedron2 geometry"
398 [ testCase "volume1" volume1,
399 testCase "contains point1" contains_point1]
401 p0 = Point 0 (-0.5) 0
405 t = Tetrahedron { v0 = p0,
409 function_values = empty_values,
410 precomputed_volume = 0 }
413 volume1 = assertEqual "volume1 is correct" True (vol ~= (1/3))
417 contains_point1 :: Assertion
418 contains_point1 = assertEqual "contains an inner point" True contained
420 inner_point = Point 1 0 0.5
421 contained = contains_point t inner_point
424 -- | Ensure that tetrahedra do not contain a particular point chosen to
425 -- be outside of them.
426 containment_tests :: Test.Framework.Test
428 testGroup "containment tests"
429 [ testCase "doesn't contain point2" doesnt_contain_point2,
430 testCase "doesn't contain point3" doesnt_contain_point3,
431 testCase "doesn't contain point4" doesnt_contain_point4,
432 testCase "doesn't contain point5" doesnt_contain_point5]
435 p3 = Point 0.5 0.5 0.5
436 exterior_point = Point 0 0 0
438 doesnt_contain_point2 :: Assertion
439 doesnt_contain_point2 =
440 assertEqual "doesn't contain an exterior point" False contained
444 t = Tetrahedron { v0 = p0,
448 function_values = empty_values,
449 precomputed_volume = 0 }
450 contained = contains_point t exterior_point
453 doesnt_contain_point3 :: Assertion
454 doesnt_contain_point3 =
455 assertEqual "doesn't contain an exterior point" False contained
459 t = Tetrahedron { v0 = p0,
463 function_values = empty_values,
464 precomputed_volume = 0 }
465 contained = contains_point t exterior_point
468 doesnt_contain_point4 :: Assertion
469 doesnt_contain_point4 =
470 assertEqual "doesn't contain an exterior point" False contained
474 t = Tetrahedron { v0 = p0,
478 function_values = empty_values,
479 precomputed_volume = 0 }
480 contained = contains_point t exterior_point
483 doesnt_contain_point5 :: Assertion
484 doesnt_contain_point5 =
485 assertEqual "doesn't contain an exterior point" False contained
489 t = Tetrahedron { v0 = p0,
493 function_values = empty_values,
494 precomputed_volume = 0 }
495 contained = contains_point t exterior_point
498 -- | The barycentric coordinate of v0 with respect to itself should
500 prop_b0_v0_always_unity :: Tetrahedron -> Property
501 prop_b0_v0_always_unity t =
502 (volume t) > 0 ==> (b0 t) (v0 t) ~= 1.0
504 -- | The barycentric coordinate of v1 with respect to v0 should
506 prop_b0_v1_always_zero :: Tetrahedron -> Property
507 prop_b0_v1_always_zero t =
508 (volume t) > 0 ==> (b0 t) (v1 t) ~= 0
510 -- | The barycentric coordinate of v2 with respect to v0 should
512 prop_b0_v2_always_zero :: Tetrahedron -> Property
513 prop_b0_v2_always_zero t =
514 (volume t) > 0 ==> (b0 t) (v2 t) ~= 0
516 -- | The barycentric coordinate of v3 with respect to v0 should
518 prop_b0_v3_always_zero :: Tetrahedron -> Property
519 prop_b0_v3_always_zero t =
520 (volume t) > 0 ==> (b0 t) (v3 t) ~= 0
522 -- | The barycentric coordinate of v1 with respect to itself should
524 prop_b1_v1_always_unity :: Tetrahedron -> Property
525 prop_b1_v1_always_unity t =
526 (volume t) > 0 ==> (b1 t) (v1 t) ~= 1.0
528 -- | The barycentric coordinate of v0 with respect to v1 should
530 prop_b1_v0_always_zero :: Tetrahedron -> Property
531 prop_b1_v0_always_zero t =
532 (volume t) > 0 ==> (b1 t) (v0 t) ~= 0
534 -- | The barycentric coordinate of v2 with respect to v1 should
536 prop_b1_v2_always_zero :: Tetrahedron -> Property
537 prop_b1_v2_always_zero t =
538 (volume t) > 0 ==> (b1 t) (v2 t) ~= 0
540 -- | The barycentric coordinate of v3 with respect to v1 should
542 prop_b1_v3_always_zero :: Tetrahedron -> Property
543 prop_b1_v3_always_zero t =
544 (volume t) > 0 ==> (b1 t) (v3 t) ~= 0
546 -- | The barycentric coordinate of v2 with respect to itself should
548 prop_b2_v2_always_unity :: Tetrahedron -> Property
549 prop_b2_v2_always_unity t =
550 (volume t) > 0 ==> (b2 t) (v2 t) ~= 1.0
552 -- | The barycentric coordinate of v0 with respect to v2 should
554 prop_b2_v0_always_zero :: Tetrahedron -> Property
555 prop_b2_v0_always_zero t =
556 (volume t) > 0 ==> (b2 t) (v0 t) ~= 0
558 -- | The barycentric coordinate of v1 with respect to v2 should
560 prop_b2_v1_always_zero :: Tetrahedron -> Property
561 prop_b2_v1_always_zero t =
562 (volume t) > 0 ==> (b2 t) (v1 t) ~= 0
564 -- | The barycentric coordinate of v3 with respect to v2 should
566 prop_b2_v3_always_zero :: Tetrahedron -> Property
567 prop_b2_v3_always_zero t =
568 (volume t) > 0 ==> (b2 t) (v3 t) ~= 0
570 -- | The barycentric coordinate of v3 with respect to itself should
572 prop_b3_v3_always_unity :: Tetrahedron -> Property
573 prop_b3_v3_always_unity t =
574 (volume t) > 0 ==> (b3 t) (v3 t) ~= 1.0
576 -- | The barycentric coordinate of v0 with respect to v3 should
578 prop_b3_v0_always_zero :: Tetrahedron -> Property
579 prop_b3_v0_always_zero t =
580 (volume t) > 0 ==> (b3 t) (v0 t) ~= 0
582 -- | The barycentric coordinate of v1 with respect to v3 should
584 prop_b3_v1_always_zero :: Tetrahedron -> Property
585 prop_b3_v1_always_zero t =
586 (volume t) > 0 ==> (b3 t) (v1 t) ~= 0
588 -- | The barycentric coordinate of v2 with respect to v3 should
590 prop_b3_v2_always_zero :: Tetrahedron -> Property
591 prop_b3_v2_always_zero t =
592 (volume t) > 0 ==> (b3 t) (v2 t) ~= 0
595 prop_swapping_vertices_doesnt_affect_coefficients1 :: Tetrahedron -> Bool
596 prop_swapping_vertices_doesnt_affect_coefficients1 t =
597 c t 0 0 1 2 == c t' 0 0 1 2
599 t' = t { v0 = (v1 t), v1 = (v0 t) }
601 prop_swapping_vertices_doesnt_affect_coefficients2 :: Tetrahedron -> Bool
602 prop_swapping_vertices_doesnt_affect_coefficients2 t =
603 c t 0 1 1 1 == c t' 0 1 1 1
605 t' = t { v2 = (v3 t), v3 = (v2 t) }
607 prop_swapping_vertices_doesnt_affect_coefficients3 :: Tetrahedron -> Bool
608 prop_swapping_vertices_doesnt_affect_coefficients3 t =
609 c t 2 1 0 0 == c t' 2 1 0 0
611 t' = t { v2 = (v3 t), v3 = (v2 t) }
613 prop_swapping_vertices_doesnt_affect_coefficients4 :: Tetrahedron -> Bool
614 prop_swapping_vertices_doesnt_affect_coefficients4 t =
615 c t 2 0 0 1 == c t' 2 0 0 1
617 t' = t { v0 = (v3 t), v3 = (v0 t) }
622 tetrahedron_tests :: Test.Framework.Test
624 testGroup "Tetrahedron Tests" [
625 tetrahedron1_geometry_tests,
626 tetrahedron2_geometry_tests,
631 p78_24_properties :: Test.Framework.Test
633 testGroup "p. 78, Section (2.4) Properties" [
634 testProperty "c3000 identity" prop_c3000_identity,
635 testProperty "c2100 identity" prop_c2100_identity,
636 testProperty "c1110 identity" prop_c1110_identity]
638 -- | Returns the domain point of t with indices i,j,k,l.
639 domain_point :: Tetrahedron -> Int -> Int -> Int -> Int -> Point
640 domain_point t i j k l =
641 weighted_sum `scale` (1/3)
643 v0' = (v0 t) `scale` (fromIntegral i)
644 v1' = (v1 t) `scale` (fromIntegral j)
645 v2' = (v2 t) `scale` (fromIntegral k)
646 v3' = (v3 t) `scale` (fromIntegral l)
647 weighted_sum = v0' + v1' + v2' + v3'
650 -- | Used for convenience in the next few tests.
651 p :: Tetrahedron -> Int -> Int -> Int -> Int -> Double
652 p t i j k l = (polynomial t) (domain_point t i j k l)
655 -- | Given in Sorokina and Zeilfelder, p. 78.
656 prop_c3000_identity :: Tetrahedron -> Property
657 prop_c3000_identity t =
659 c t 3 0 0 0 ~= p t 3 0 0 0
661 -- | Given in Sorokina and Zeilfelder, p. 78.
662 prop_c2100_identity :: Tetrahedron -> Property
663 prop_c2100_identity t =
665 c t 2 1 0 0 ~= (term1 - term2 + term3 - term4)
667 term1 = (1/3)*(p t 0 3 0 0)
668 term2 = (5/6)*(p t 3 0 0 0)
669 term3 = 3*(p t 2 1 0 0)
670 term4 = (3/2)*(p t 1 2 0 0)
672 -- | Given in Sorokina and Zeilfelder, p. 78.
673 prop_c1110_identity :: Tetrahedron -> Property
674 prop_c1110_identity t =
676 c t 1 1 1 0 ~= (term1 + term2 - term3 - term4)
678 term1 = (1/3)*((p t 3 0 0 0) + (p t 0 3 0 0) + (p t 0 0 3 0))
679 term2 = (9/2)*(p t 1 1 1 0)
680 term3 = (3/4)*((p t 2 1 0 0) + (p t 1 2 0 0) + (p t 2 0 1 0))
681 term4 = (3/4)*((p t 1 0 2 0) + (p t 0 2 1 0) + (p t 0 1 2 0))
685 tetrahedron_properties :: Test.Framework.Test
686 tetrahedron_properties =
687 testGroup "Tetrahedron Properties" [
689 testProperty "b0_v0_always_unity" prop_b0_v0_always_unity,
690 testProperty "b0_v1_always_zero" prop_b0_v1_always_zero,
691 testProperty "b0_v2_always_zero" prop_b0_v2_always_zero,
692 testProperty "b0_v3_always_zero" prop_b0_v3_always_zero,
693 testProperty "b1_v1_always_unity" prop_b1_v1_always_unity,
694 testProperty "b1_v0_always_zero" prop_b1_v0_always_zero,
695 testProperty "b1_v2_always_zero" prop_b1_v2_always_zero,
696 testProperty "b1_v3_always_zero" prop_b1_v3_always_zero,
697 testProperty "b2_v2_always_unity" prop_b2_v2_always_unity,
698 testProperty "b2_v0_always_zero" prop_b2_v0_always_zero,
699 testProperty "b2_v1_always_zero" prop_b2_v1_always_zero,
700 testProperty "b2_v3_always_zero" prop_b2_v3_always_zero,
701 testProperty "b3_v3_always_unity" prop_b3_v3_always_unity,
702 testProperty "b3_v0_always_zero" prop_b3_v0_always_zero,
703 testProperty "b3_v1_always_zero" prop_b3_v1_always_zero,
704 testProperty "b3_v2_always_zero" prop_b3_v2_always_zero,
705 testProperty "swapping_vertices_doesnt_affect_coefficients1" $
706 prop_swapping_vertices_doesnt_affect_coefficients1,
707 testProperty "swapping_vertices_doesnt_affect_coefficients2" $
708 prop_swapping_vertices_doesnt_affect_coefficients2,
709 testProperty "swapping_vertices_doesnt_affect_coefficients3" $
710 prop_swapping_vertices_doesnt_affect_coefficients3,
711 testProperty "swapping_vertices_doesnt_affect_coefficients4" $
712 prop_swapping_vertices_doesnt_affect_coefficients4 ]