9 tetrahedron_properties,
15 import qualified Data.Vector as V (
21 import Test.Framework (Test, testGroup)
22 import Test.Framework.Providers.HUnit (testCase)
23 import Test.Framework.Providers.QuickCheck2 (testProperty)
24 import Test.HUnit (Assertion, assertEqual)
25 import Test.QuickCheck (Arbitrary(..), Gen, Property, (==>))
27 import Comparisons ((~=), nearly_ge)
28 import FunctionValues (FunctionValues(..), empty_values)
29 import Misc (factorial)
30 import Point (Point, scale)
31 import RealFunction (RealFunction, cmult, fexp)
32 import ThreeDimensional (ThreeDimensional(..))
35 Tetrahedron { function_values :: FunctionValues,
40 precomputed_volume :: Double
45 instance Arbitrary Tetrahedron where
47 rnd_v0 <- arbitrary :: Gen Point
48 rnd_v1 <- arbitrary :: Gen Point
49 rnd_v2 <- arbitrary :: Gen Point
50 rnd_v3 <- arbitrary :: Gen Point
51 rnd_fv <- arbitrary :: Gen FunctionValues
53 -- We can't assign an incorrect precomputed volume,
54 -- so we have to calculate the correct one here.
55 let t' = Tetrahedron rnd_fv rnd_v0 rnd_v1 rnd_v2 rnd_v3 0
57 return (Tetrahedron rnd_fv rnd_v0 rnd_v1 rnd_v2 rnd_v3 vol)
60 instance Show Tetrahedron where
61 show t = "Tetrahedron:\n" ++
62 " function_values: " ++ (show (function_values t)) ++ "\n" ++
63 " v0: " ++ (show (v0 t)) ++ "\n" ++
64 " v1: " ++ (show (v1 t)) ++ "\n" ++
65 " v2: " ++ (show (v2 t)) ++ "\n" ++
66 " v3: " ++ (show (v3 t)) ++ "\n"
69 instance ThreeDimensional Tetrahedron where
70 center (Tetrahedron _ v0' v1' v2' v3' _) =
71 (v0' + v1' + v2' + v3') `scale` (1/4)
74 b0_unscaled `nearly_ge` 0 &&
75 b1_unscaled `nearly_ge` 0 &&
76 b2_unscaled `nearly_ge` 0 &&
77 b3_unscaled `nearly_ge` 0
79 -- Drop the useless division and volume calculation that we
80 -- would do if we used the regular b0,..b3 functions.
82 b0_unscaled = volume inner_tetrahedron
83 where inner_tetrahedron = t { v0 = p0 }
86 b1_unscaled = volume inner_tetrahedron
87 where inner_tetrahedron = t { v1 = p0 }
90 b2_unscaled = volume inner_tetrahedron
91 where inner_tetrahedron = t { v2 = p0 }
94 b3_unscaled = volume inner_tetrahedron
95 where inner_tetrahedron = t { v3 = p0 }
98 polynomial :: Tetrahedron -> (RealFunction Point)
100 V.sum $ V.singleton ((c t 0 0 0 3) `cmult` (beta t 0 0 0 3)) `V.snoc`
101 ((c t 0 0 1 2) `cmult` (beta t 0 0 1 2)) `V.snoc`
102 ((c t 0 0 2 1) `cmult` (beta t 0 0 2 1)) `V.snoc`
103 ((c t 0 0 3 0) `cmult` (beta t 0 0 3 0)) `V.snoc`
104 ((c t 0 1 0 2) `cmult` (beta t 0 1 0 2)) `V.snoc`
105 ((c t 0 1 1 1) `cmult` (beta t 0 1 1 1)) `V.snoc`
106 ((c t 0 1 2 0) `cmult` (beta t 0 1 2 0)) `V.snoc`
107 ((c t 0 2 0 1) `cmult` (beta t 0 2 0 1)) `V.snoc`
108 ((c t 0 2 1 0) `cmult` (beta t 0 2 1 0)) `V.snoc`
109 ((c t 0 3 0 0) `cmult` (beta t 0 3 0 0)) `V.snoc`
110 ((c t 1 0 0 2) `cmult` (beta t 1 0 0 2)) `V.snoc`
111 ((c t 1 0 1 1) `cmult` (beta t 1 0 1 1)) `V.snoc`
112 ((c t 1 0 2 0) `cmult` (beta t 1 0 2 0)) `V.snoc`
113 ((c t 1 1 0 1) `cmult` (beta t 1 1 0 1)) `V.snoc`
114 ((c t 1 1 1 0) `cmult` (beta t 1 1 1 0)) `V.snoc`
115 ((c t 1 2 0 0) `cmult` (beta t 1 2 0 0)) `V.snoc`
116 ((c t 2 0 0 1) `cmult` (beta t 2 0 0 1)) `V.snoc`
117 ((c t 2 0 1 0) `cmult` (beta t 2 0 1 0)) `V.snoc`
118 ((c t 2 1 0 0) `cmult` (beta t 2 1 0 0)) `V.snoc`
119 ((c t 3 0 0 0) `cmult` (beta t 3 0 0 0))
123 -- | The Bernstein polynomial on t with indices i,j,k,l. Denoted by a
124 -- capital 'B' in the Sorokina/Zeilfelder paper.
125 beta :: Tetrahedron -> Int -> Int -> Int -> Int -> (RealFunction Point)
127 | (i + j + k + l == 3) =
128 coefficient `cmult` (b0_term * b1_term * b2_term * b3_term)
129 | otherwise = error "basis function index out of bounds"
131 denominator = (factorial i)*(factorial j)*(factorial k)*(factorial l)
132 coefficient = 6 / (fromIntegral denominator)
133 b0_term = (b0 t) `fexp` i
134 b1_term = (b1 t) `fexp` j
135 b2_term = (b2 t) `fexp` k
136 b3_term = (b3 t) `fexp` l
139 -- | The coefficient function. c t i j k l returns the coefficient
140 -- c_ijkl with respect to the tetrahedron t. The definition uses
141 -- pattern matching to mimic the definitions given in Sorokina and
142 -- Zeilfelder, pp. 84-86. If incorrect indices are supplied, the
143 -- function will simply error.
144 c :: Tetrahedron -> Int -> Int -> Int -> Int -> Double
148 fvs = function_values t
167 fld = front_left_down fvs
168 flt = front_left_top fvs
169 frd = front_right_down fvs
170 frt = front_right_top fvs
173 coefficient :: Int -> Int -> Int -> Int -> Double
174 coefficient 0 0 3 0 =
175 (1/8) * (i' + f + l' + t' + lt + fl + ft + flt)
177 coefficient 0 0 0 3 =
178 (1/8) * (i' + f + r + t' + rt + fr + ft + frt)
180 coefficient 0 0 2 1 =
181 (5/24)*(i' + f + t' + ft) + (1/24)*(l' + fl + lt + flt)
183 coefficient 0 0 1 2 =
184 (5/24)*(i' + f + t' + ft) + (1/24)*(r + fr + rt + frt)
186 coefficient 0 1 2 0 =
187 (5/24)*(i' + f) + (1/8)*(l' + t' + fl + ft)
190 coefficient 0 1 0 2 =
191 (5/24)*(i' + f) + (1/8)*(r + t' + fr + ft)
194 coefficient 0 1 1 1 =
195 (13/48)*(i' + f) + (7/48)*(t' + ft)
196 + (1/32)*(l' + r + fl + fr)
197 + (1/96)*(lt + rt + flt + frt)
199 coefficient 0 2 1 0 =
200 (13/48)*(i' + f) + (17/192)*(l' + t' + fl + ft)
202 + (1/64)*(r + d + fr + fd)
203 + (1/192)*(rt + ld + frt + fld)
205 coefficient 0 2 0 1 =
206 (13/48)*(i' + f) + (17/192)*(r + t' + fr + ft)
208 + (1/64)*(l' + d + fl + fd)
209 + (1/192)*(rd + lt + flt + frd)
211 coefficient 0 3 0 0 =
212 (13/48)*(i' + f) + (5/96)*(l' + r + t' + d + fl + fr + ft + fd)
213 + (1/192)*(rt + rd + lt + ld + frt + frd + flt + fld)
215 coefficient 1 0 2 0 =
216 (1/4)*i' + (1/6)*(f + l' + t')
217 + (1/12)*(lt + fl + ft)
219 coefficient 1 0 0 2 =
220 (1/4)*i' + (1/6)*(f + r + t')
221 + (1/12)*(rt + fr + ft)
223 coefficient 1 0 1 1 =
224 (1/3)*i' + (5/24)*(f + t')
227 + (1/48)*(lt + rt + fl + fr)
229 coefficient 1 1 1 0 =
233 + (1/48)*(d + r + lt)
234 + (1/96)*(fd + ld + rt + fr)
236 coefficient 1 1 0 1 =
240 + (1/48)*(d + l' + rt)
241 + (1/96)*(fd + lt + rd + fl)
243 coefficient 1 2 0 0 =
245 + (7/96)*(l' + r + t' + d)
246 + (1/32)*(fl + fr + ft + fd)
247 + (1/96)*(rt + rd + lt + ld)
249 coefficient 2 0 1 0 =
250 (3/8)*i' + (7/48)*(f + t' + l')
251 + (1/48)*(r + d + b + lt + fl + ft)
252 + (1/96)*(rt + bt + fr + fd + ld + bl)
254 coefficient 2 0 0 1 =
255 (3/8)*i' + (7/48)*(f + t' + r)
256 + (1/48)*(l' + d + b + rt + fr + ft)
257 + (1/96)*(lt + bt + fl + fd + rd + br)
259 coefficient 2 1 0 0 =
260 (3/8)*i' + (1/12)*(t' + r + l' + d)
261 + (1/64)*(ft + fr + fl + fd)
264 + (1/96)*(rt + ld + lt + rd)
265 + (1/192)*(bt + br + bl + bd)
267 coefficient 3 0 0 0 =
268 (3/8)*i' + (1/12)*(t' + f + l' + r + d + b)
269 + (1/96)*(lt + fl + ft + rt + bt + fr)
270 + (1/96)*(fd + ld + bd + br + rd + bl)
272 coefficient _ _ _ _ = error "coefficient index out of bounds"
276 -- | Compute the determinant of the 4x4 matrix,
283 -- where [1] = [1, 1, 1, 1],
284 -- [x] = [x1,x2,x3,x4],
288 -- The termX nonsense is an attempt to prevent Double overflow.
289 -- which has been observed to happen with large coordinates.
291 det :: Point -> Point -> Point -> Point -> Double
299 term1 = ((x2 - x4)*y1 - (x1 - x4)*y2 + (x1 - x2)*y4)*z3
300 term2 = ((x2 - x3)*y1 - (x1 - x3)*y2 + (x1 - x2)*y3)*z4
301 term3 = ((x3 - x4)*y2 - (x2 - x4)*y3 + (x2 - x3)*y4)*z1
302 term4 = ((x3 - x4)*y1 - (x1 - x4)*y3 + (x1 - x3)*y4)*z2
303 term5 = term1 - term2
304 term6 = term3 - term4
307 -- | Computed using the formula from Lai & Schumaker, Definition 15.4,
309 volume :: Tetrahedron -> Double
317 | otherwise = (1/6)*(det v0' v1' v2' v3')
325 -- | The barycentric coordinates of a point with respect to v0.
326 b0 :: Tetrahedron -> (RealFunction Point)
327 b0 t point = (volume inner_tetrahedron) / (precomputed_volume t)
329 inner_tetrahedron = t { v0 = point }
332 -- | The barycentric coordinates of a point with respect to v1.
333 b1 :: Tetrahedron -> (RealFunction Point)
334 b1 t point = (volume inner_tetrahedron) / (precomputed_volume t)
336 inner_tetrahedron = t { v1 = point }
339 -- | The barycentric coordinates of a point with respect to v2.
340 b2 :: Tetrahedron -> (RealFunction Point)
341 b2 t point = (volume inner_tetrahedron) / (precomputed_volume t)
343 inner_tetrahedron = t { v2 = point }
346 -- | The barycentric coordinates of a point with respect to v3.
347 b3 :: Tetrahedron -> (RealFunction Point)
348 b3 t point = (volume inner_tetrahedron) / (precomputed_volume t)
350 inner_tetrahedron = t { v3 = point }
358 -- | Check the volume of a particular tetrahedron (computed by hand)
359 -- and whether or not it contains a specific point chosen to be
360 -- outside of it. Its vertices are in clockwise order, so the volume
361 -- should be negative.
362 tetrahedron1_geometry_tests :: Test.Framework.Test
363 tetrahedron1_geometry_tests =
364 testGroup "tetrahedron1 geometry"
365 [ testCase "volume1" volume1,
366 testCase "doesn't contain point1" doesnt_contain_point1]
372 t = Tetrahedron { v0 = p0,
376 function_values = empty_values,
377 precomputed_volume = 0 }
381 assertEqual "volume is correct" True (vol ~= (-1/3))
385 doesnt_contain_point1 :: Assertion
386 doesnt_contain_point1 =
387 assertEqual "doesn't contain an exterior point" False contained
389 exterior_point = (5, 2, -9.0212)
390 contained = contains_point t exterior_point
393 -- | Check the volume of a particular tetrahedron (computed by hand)
394 -- and whether or not it contains a specific point chosen to be
395 -- inside of it. Its vertices are in counter-clockwise order, so the
396 -- volume should be positive.
397 tetrahedron2_geometry_tests :: Test.Framework.Test
398 tetrahedron2_geometry_tests =
399 testGroup "tetrahedron2 geometry"
400 [ testCase "volume1" volume1,
401 testCase "contains point1" contains_point1]
407 t = Tetrahedron { v0 = p0,
411 function_values = empty_values,
412 precomputed_volume = 0 }
415 volume1 = assertEqual "volume1 is correct" True (vol ~= (1/3))
419 contains_point1 :: Assertion
420 contains_point1 = assertEqual "contains an inner point" True contained
422 inner_point = (1, 0, 0.5)
423 contained = contains_point t inner_point
426 -- | Ensure that tetrahedra do not contain a particular point chosen to
427 -- be outside of them.
428 containment_tests :: Test.Framework.Test
430 testGroup "containment tests"
431 [ testCase "doesn't contain point2" doesnt_contain_point2,
432 testCase "doesn't contain point3" doesnt_contain_point3,
433 testCase "doesn't contain point4" doesnt_contain_point4,
434 testCase "doesn't contain point5" doesnt_contain_point5]
438 exterior_point = (0, 0, 0)
440 doesnt_contain_point2 :: Assertion
441 doesnt_contain_point2 =
442 assertEqual "doesn't contain an exterior point" False contained
446 t = Tetrahedron { v0 = p0,
450 function_values = empty_values,
451 precomputed_volume = 0 }
452 contained = contains_point t exterior_point
455 doesnt_contain_point3 :: Assertion
456 doesnt_contain_point3 =
457 assertEqual "doesn't contain an exterior point" False contained
461 t = Tetrahedron { v0 = p0,
465 function_values = empty_values,
466 precomputed_volume = 0 }
467 contained = contains_point t exterior_point
470 doesnt_contain_point4 :: Assertion
471 doesnt_contain_point4 =
472 assertEqual "doesn't contain an exterior point" False contained
476 t = Tetrahedron { v0 = p0,
480 function_values = empty_values,
481 precomputed_volume = 0 }
482 contained = contains_point t exterior_point
485 doesnt_contain_point5 :: Assertion
486 doesnt_contain_point5 =
487 assertEqual "doesn't contain an exterior point" False contained
491 t = Tetrahedron { v0 = p0,
495 function_values = empty_values,
496 precomputed_volume = 0 }
497 contained = contains_point t exterior_point
500 -- | The barycentric coordinate of v0 with respect to itself should
502 prop_b0_v0_always_unity :: Tetrahedron -> Property
503 prop_b0_v0_always_unity t =
504 (volume t) > 0 ==> (b0 t) (v0 t) ~= 1.0
506 -- | The barycentric coordinate of v1 with respect to v0 should
508 prop_b0_v1_always_zero :: Tetrahedron -> Property
509 prop_b0_v1_always_zero t =
510 (volume t) > 0 ==> (b0 t) (v1 t) ~= 0
512 -- | The barycentric coordinate of v2 with respect to v0 should
514 prop_b0_v2_always_zero :: Tetrahedron -> Property
515 prop_b0_v2_always_zero t =
516 (volume t) > 0 ==> (b0 t) (v2 t) ~= 0
518 -- | The barycentric coordinate of v3 with respect to v0 should
520 prop_b0_v3_always_zero :: Tetrahedron -> Property
521 prop_b0_v3_always_zero t =
522 (volume t) > 0 ==> (b0 t) (v3 t) ~= 0
524 -- | The barycentric coordinate of v1 with respect to itself should
526 prop_b1_v1_always_unity :: Tetrahedron -> Property
527 prop_b1_v1_always_unity t =
528 (volume t) > 0 ==> (b1 t) (v1 t) ~= 1.0
530 -- | The barycentric coordinate of v0 with respect to v1 should
532 prop_b1_v0_always_zero :: Tetrahedron -> Property
533 prop_b1_v0_always_zero t =
534 (volume t) > 0 ==> (b1 t) (v0 t) ~= 0
536 -- | The barycentric coordinate of v2 with respect to v1 should
538 prop_b1_v2_always_zero :: Tetrahedron -> Property
539 prop_b1_v2_always_zero t =
540 (volume t) > 0 ==> (b1 t) (v2 t) ~= 0
542 -- | The barycentric coordinate of v3 with respect to v1 should
544 prop_b1_v3_always_zero :: Tetrahedron -> Property
545 prop_b1_v3_always_zero t =
546 (volume t) > 0 ==> (b1 t) (v3 t) ~= 0
548 -- | The barycentric coordinate of v2 with respect to itself should
550 prop_b2_v2_always_unity :: Tetrahedron -> Property
551 prop_b2_v2_always_unity t =
552 (volume t) > 0 ==> (b2 t) (v2 t) ~= 1.0
554 -- | The barycentric coordinate of v0 with respect to v2 should
556 prop_b2_v0_always_zero :: Tetrahedron -> Property
557 prop_b2_v0_always_zero t =
558 (volume t) > 0 ==> (b2 t) (v0 t) ~= 0
560 -- | The barycentric coordinate of v1 with respect to v2 should
562 prop_b2_v1_always_zero :: Tetrahedron -> Property
563 prop_b2_v1_always_zero t =
564 (volume t) > 0 ==> (b2 t) (v1 t) ~= 0
566 -- | The barycentric coordinate of v3 with respect to v2 should
568 prop_b2_v3_always_zero :: Tetrahedron -> Property
569 prop_b2_v3_always_zero t =
570 (volume t) > 0 ==> (b2 t) (v3 t) ~= 0
572 -- | The barycentric coordinate of v3 with respect to itself should
574 prop_b3_v3_always_unity :: Tetrahedron -> Property
575 prop_b3_v3_always_unity t =
576 (volume t) > 0 ==> (b3 t) (v3 t) ~= 1.0
578 -- | The barycentric coordinate of v0 with respect to v3 should
580 prop_b3_v0_always_zero :: Tetrahedron -> Property
581 prop_b3_v0_always_zero t =
582 (volume t) > 0 ==> (b3 t) (v0 t) ~= 0
584 -- | The barycentric coordinate of v1 with respect to v3 should
586 prop_b3_v1_always_zero :: Tetrahedron -> Property
587 prop_b3_v1_always_zero t =
588 (volume t) > 0 ==> (b3 t) (v1 t) ~= 0
590 -- | The barycentric coordinate of v2 with respect to v3 should
592 prop_b3_v2_always_zero :: Tetrahedron -> Property
593 prop_b3_v2_always_zero t =
594 (volume t) > 0 ==> (b3 t) (v2 t) ~= 0
597 prop_swapping_vertices_doesnt_affect_coefficients1 :: Tetrahedron -> Bool
598 prop_swapping_vertices_doesnt_affect_coefficients1 t =
599 c t 0 0 1 2 == c t' 0 0 1 2
601 t' = t { v0 = (v1 t), v1 = (v0 t) }
603 prop_swapping_vertices_doesnt_affect_coefficients2 :: Tetrahedron -> Bool
604 prop_swapping_vertices_doesnt_affect_coefficients2 t =
605 c t 0 1 1 1 == c t' 0 1 1 1
607 t' = t { v2 = (v3 t), v3 = (v2 t) }
609 prop_swapping_vertices_doesnt_affect_coefficients3 :: Tetrahedron -> Bool
610 prop_swapping_vertices_doesnt_affect_coefficients3 t =
611 c t 2 1 0 0 == c t' 2 1 0 0
613 t' = t { v2 = (v3 t), v3 = (v2 t) }
615 prop_swapping_vertices_doesnt_affect_coefficients4 :: Tetrahedron -> Bool
616 prop_swapping_vertices_doesnt_affect_coefficients4 t =
617 c t 2 0 0 1 == c t' 2 0 0 1
619 t' = t { v0 = (v3 t), v3 = (v0 t) }
624 tetrahedron_tests :: Test.Framework.Test
626 testGroup "Tetrahedron Tests" [
627 tetrahedron1_geometry_tests,
628 tetrahedron2_geometry_tests,
633 p78_24_properties :: Test.Framework.Test
635 testGroup "p. 78, Section (2.4) Properties" [
636 testProperty "c3000 identity" prop_c3000_identity,
637 testProperty "c2100 identity" prop_c2100_identity,
638 testProperty "c1110 identity" prop_c1110_identity]
640 -- | Returns the domain point of t with indices i,j,k,l.
641 domain_point :: Tetrahedron -> Int -> Int -> Int -> Int -> Point
642 domain_point t i j k l
643 | i + j + k + l == 3 = weighted_sum `scale` (1/3)
644 | otherwise = error "domain point index out of bounds"
646 v0' = (v0 t) `scale` (fromIntegral i)
647 v1' = (v1 t) `scale` (fromIntegral j)
648 v2' = (v2 t) `scale` (fromIntegral k)
649 v3' = (v3 t) `scale` (fromIntegral l)
650 weighted_sum = v0' + v1' + v2' + v3'
653 -- | Used for convenience in the next few tests.
654 p :: Tetrahedron -> Int -> Int -> Int -> Int -> Double
655 p t i j k l = (polynomial t) (domain_point t i j k l)
658 -- | Given in Sorokina and Zeilfelder, p. 78.
659 prop_c3000_identity :: Tetrahedron -> Property
660 prop_c3000_identity t =
662 c t 3 0 0 0 ~= p t 3 0 0 0
664 -- | Given in Sorokina and Zeilfelder, p. 78.
665 prop_c2100_identity :: Tetrahedron -> Property
666 prop_c2100_identity t =
668 c t 2 1 0 0 ~= (term1 - term2 + term3 - term4)
670 term1 = (1/3)*(p t 0 3 0 0)
671 term2 = (5/6)*(p t 3 0 0 0)
672 term3 = 3*(p t 2 1 0 0)
673 term4 = (3/2)*(p t 1 2 0 0)
675 -- | Given in Sorokina and Zeilfelder, p. 78.
676 prop_c1110_identity :: Tetrahedron -> Property
677 prop_c1110_identity t =
679 c t 1 1 1 0 ~= (term1 + term2 - term3 - term4)
681 term1 = (1/3)*((p t 3 0 0 0) + (p t 0 3 0 0) + (p t 0 0 3 0))
682 term2 = (9/2)*(p t 1 1 1 0)
683 term3 = (3/4)*((p t 2 1 0 0) + (p t 1 2 0 0) + (p t 2 0 1 0))
684 term4 = (3/4)*((p t 1 0 2 0) + (p t 0 2 1 0) + (p t 0 1 2 0))
688 tetrahedron_properties :: Test.Framework.Test
689 tetrahedron_properties =
690 testGroup "Tetrahedron Properties" [
692 testProperty "b0_v0_always_unity" prop_b0_v0_always_unity,
693 testProperty "b0_v1_always_zero" prop_b0_v1_always_zero,
694 testProperty "b0_v2_always_zero" prop_b0_v2_always_zero,
695 testProperty "b0_v3_always_zero" prop_b0_v3_always_zero,
696 testProperty "b1_v1_always_unity" prop_b1_v1_always_unity,
697 testProperty "b1_v0_always_zero" prop_b1_v0_always_zero,
698 testProperty "b1_v2_always_zero" prop_b1_v2_always_zero,
699 testProperty "b1_v3_always_zero" prop_b1_v3_always_zero,
700 testProperty "b2_v2_always_unity" prop_b2_v2_always_unity,
701 testProperty "b2_v0_always_zero" prop_b2_v0_always_zero,
702 testProperty "b2_v1_always_zero" prop_b2_v1_always_zero,
703 testProperty "b2_v3_always_zero" prop_b2_v3_always_zero,
704 testProperty "b3_v3_always_unity" prop_b3_v3_always_unity,
705 testProperty "b3_v0_always_zero" prop_b3_v0_always_zero,
706 testProperty "b3_v1_always_zero" prop_b3_v1_always_zero,
707 testProperty "b3_v2_always_zero" prop_b3_v2_always_zero,
708 testProperty "swapping_vertices_doesnt_affect_coefficients1" $
709 prop_swapping_vertices_doesnt_affect_coefficients1,
710 testProperty "swapping_vertices_doesnt_affect_coefficients2" $
711 prop_swapping_vertices_doesnt_affect_coefficients2,
712 testProperty "swapping_vertices_doesnt_affect_coefficients3" $
713 prop_swapping_vertices_doesnt_affect_coefficients3,
714 testProperty "swapping_vertices_doesnt_affect_coefficients4" $
715 prop_swapping_vertices_doesnt_affect_coefficients4 ]