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, (==>))
29 import Comparisons ((~=), nearly_ge)
31 import Misc (factorial)
34 import ThreeDimensional
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 instance ThreeDimensional Tetrahedron where
72 center (Tetrahedron _ v0' v1' v2' v3' _) =
73 (v0' + v1' + v2' + v3') `scale` (1/4)
76 b0_unscaled `nearly_ge` 0 &&
77 b1_unscaled `nearly_ge` 0 &&
78 b2_unscaled `nearly_ge` 0 &&
79 b3_unscaled `nearly_ge` 0
81 -- Drop the useless division and volume calculation that we
82 -- would do if we used the regular b0,..b3 functions.
84 b0_unscaled = volume inner_tetrahedron
85 where inner_tetrahedron = t { v0 = p0 }
88 b1_unscaled = volume inner_tetrahedron
89 where inner_tetrahedron = t { v1 = p0 }
92 b2_unscaled = volume inner_tetrahedron
93 where inner_tetrahedron = t { v2 = p0 }
96 b3_unscaled = volume inner_tetrahedron
97 where inner_tetrahedron = t { v3 = p0 }
100 polynomial :: Tetrahedron -> (RealFunction Point)
102 V.sum $ V.singleton ((c t 0 0 0 3) `cmult` (beta t 0 0 0 3)) `V.snoc`
103 ((c t 0 0 1 2) `cmult` (beta t 0 0 1 2)) `V.snoc`
104 ((c t 0 0 2 1) `cmult` (beta t 0 0 2 1)) `V.snoc`
105 ((c t 0 0 3 0) `cmult` (beta t 0 0 3 0)) `V.snoc`
106 ((c t 0 1 0 2) `cmult` (beta t 0 1 0 2)) `V.snoc`
107 ((c t 0 1 1 1) `cmult` (beta t 0 1 1 1)) `V.snoc`
108 ((c t 0 1 2 0) `cmult` (beta t 0 1 2 0)) `V.snoc`
109 ((c t 0 2 0 1) `cmult` (beta t 0 2 0 1)) `V.snoc`
110 ((c t 0 2 1 0) `cmult` (beta t 0 2 1 0)) `V.snoc`
111 ((c t 0 3 0 0) `cmult` (beta t 0 3 0 0)) `V.snoc`
112 ((c t 1 0 0 2) `cmult` (beta t 1 0 0 2)) `V.snoc`
113 ((c t 1 0 1 1) `cmult` (beta t 1 0 1 1)) `V.snoc`
114 ((c t 1 0 2 0) `cmult` (beta t 1 0 2 0)) `V.snoc`
115 ((c t 1 1 0 1) `cmult` (beta t 1 1 0 1)) `V.snoc`
116 ((c t 1 1 1 0) `cmult` (beta t 1 1 1 0)) `V.snoc`
117 ((c t 1 2 0 0) `cmult` (beta t 1 2 0 0)) `V.snoc`
118 ((c t 2 0 0 1) `cmult` (beta t 2 0 0 1)) `V.snoc`
119 ((c t 2 0 1 0) `cmult` (beta t 2 0 1 0)) `V.snoc`
120 ((c t 2 1 0 0) `cmult` (beta t 2 1 0 0)) `V.snoc`
121 ((c t 3 0 0 0) `cmult` (beta t 3 0 0 0))
124 -- | Returns the domain point of t with indices i,j,k,l.
125 -- Simply an alias for the domain_point function.
126 xi :: Tetrahedron -> Int -> Int -> Int -> Int -> Point
129 -- | Returns the domain point of t with indices i,j,k,l.
130 domain_point :: Tetrahedron -> Int -> Int -> Int -> Int -> Point
131 domain_point t i j k l
132 | i + j + k + l == 3 = weighted_sum `scale` (1/3)
133 | otherwise = error "domain point index out of bounds"
135 v0' = (v0 t) `scale` (fromIntegral i)
136 v1' = (v1 t) `scale` (fromIntegral j)
137 v2' = (v2 t) `scale` (fromIntegral k)
138 v3' = (v3 t) `scale` (fromIntegral l)
139 weighted_sum = v0' + v1' + v2' + v3'
142 -- | The Bernstein polynomial on t with indices i,j,k,l. Denoted by a
143 -- capital 'B' in the Sorokina/Zeilfelder paper.
144 beta :: Tetrahedron -> Int -> Int -> Int -> Int -> (RealFunction Point)
146 | (i + j + k + l == 3) =
147 coefficient `cmult` (b0_term * b1_term * b2_term * b3_term)
148 | otherwise = error "basis function index out of bounds"
150 denominator = (factorial i)*(factorial j)*(factorial k)*(factorial l)
151 coefficient = 6 / (fromIntegral denominator)
152 b0_term = (b0 t) `fexp` i
153 b1_term = (b1 t) `fexp` j
154 b2_term = (b2 t) `fexp` k
155 b3_term = (b3 t) `fexp` l
158 -- | The coefficient function. c t i j k l returns the coefficient
159 -- c_ijkl with respect to the tetrahedron t. The definition uses
160 -- pattern matching to mimic the definitions given in Sorokina and
161 -- Zeilfelder, pp. 84-86. If incorrect indices are supplied, the
162 -- function will simply error.
163 c :: Tetrahedron -> Int -> Int -> Int -> Int -> Double
164 c t 0 0 3 0 = eval (function_values t) $
165 (1/8) * (I + F + L + T + LT + FL + FT + FLT)
167 c t 0 0 0 3 = eval (function_values t) $
168 (1/8) * (I + F + R + T + RT + FR + FT + FRT)
170 c t 0 0 2 1 = eval (function_values t) $
171 (5/24)*(I + F + T + FT) +
172 (1/24)*(L + FL + LT + FLT)
174 c t 0 0 1 2 = eval (function_values t) $
175 (5/24)*(I + F + T + FT) +
176 (1/24)*(R + FR + RT + FRT)
178 c t 0 1 2 0 = eval (function_values t) $
180 (1/8)*(L + T + FL + FT) +
183 c t 0 1 0 2 = eval (function_values t) $
185 (1/8)*(R + T + FR + FT) +
188 c t 0 1 1 1 = eval (function_values t) $
191 (1/32)*(L + R + FL + FR) +
192 (1/96)*(LT + RT + FLT + FRT)
194 c t 0 2 1 0 = eval (function_values t) $
196 (17/192)*(L + T + FL + FT) +
198 (1/64)*(R + D + FR + FD) +
199 (1/192)*(RT + LD + FRT + FLD)
201 c t 0 2 0 1 = eval (function_values t) $
203 (17/192)*(R + T + FR + FT) +
205 (1/64)*(L + D + FL + FD) +
206 (1/192)*(RD + LT + FLT + FRD)
208 c t 0 3 0 0 = eval (function_values t) $
210 (5/96)*(L + R + T + D + FL + FR + FT + FD) +
211 (1/192)*(RT + RD + LT + LD + FRT + FRD + FLT + FLD)
213 c t 1 0 2 0 = eval (function_values t) $
216 (1/12)*(LT + FL + FT)
218 c t 1 0 0 2 = eval (function_values t) $
221 (1/12)*(RT + FR + FT)
223 c t 1 0 1 1 = eval (function_values t) $
228 (1/48)*(LT + RT + FL + FR)
230 c t 1 1 1 0 = eval (function_values t) $
235 (1/48)*(D + R + LT) +
236 (1/96)*(FD + LD + RT + FR)
238 c t 1 1 0 1 = eval (function_values t) $
243 (1/48)*(D + L + RT) +
244 (1/96)*(FD + LT + RD + FL)
246 c t 1 2 0 0 = eval (function_values t) $
249 (7/96)*(L + R + T + D) +
250 (1/32)*(FL + FR + FT + FD) +
251 (1/96)*(RT + RD + LT + LD)
253 c t 2 0 1 0 = eval (function_values t) $
256 (1/48)*(R + D + B + LT + FL + FT) +
257 (1/96)*(RT + BT + FR + FD + LD + BL)
259 c t 2 0 0 1 = eval (function_values t) $
262 (1/48)*(L + D + B + RT + FR + FT) +
263 (1/96)*(LT + BT + FL + FD + RD + BR)
265 c t 2 1 0 0 = eval (function_values t) $
267 (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 c t 3 0 0 0 = eval (function_values t) $
276 (1/12)*(T + F + L + R + D + B) +
277 (1/96)*(LT + FL + FT + RT + BT + FR) +
278 (1/96)*(FD + LD + BD + BR + RD + BL)
280 c _ _ _ _ _ = error "coefficient index out of bounds"
284 -- | Compute the determinant of the 4x4 matrix,
291 -- where [1] = [1, 1, 1, 1],
292 -- [x] = [x1,x2,x3,x4],
296 det :: Point -> Point -> Point -> Point -> Double
298 x1*y2*z4 - x1*y2*z3 + x1*y3*z2 - x1*y3*z4 - x1*y4*z2 + x1*y4*z3 +
299 x2*y1*z3 - x2*y1*z4 - x2*y3*z1 + x2*y3*z4 + x2*y4*z1 + x3*y1*z4 +
300 x3*y2*z1 - x3*y2*z4 - x3*y4*z1 - x2*y4*z3 - x3*y1*z2 + x3*y4*z2 +
301 x4*y1*z2 - x4*y1*z3 - x4*y2*z1 + x4*y2*z3 + x4*y3*z1 - x4*y3*z2
309 -- | Computed using the formula from Lai & Schumaker, Definition 15.4,
311 volume :: Tetrahedron -> Double
319 | otherwise = (1/6)*(det v0' v1' v2' v3')
327 -- | The barycentric coordinates of a point with respect to v0.
328 b0 :: Tetrahedron -> (RealFunction Point)
329 b0 t point = (volume inner_tetrahedron) / (precomputed_volume t)
331 inner_tetrahedron = t { v0 = point }
334 -- | The barycentric coordinates of a point with respect to v1.
335 b1 :: Tetrahedron -> (RealFunction Point)
336 b1 t point = (volume inner_tetrahedron) / (precomputed_volume t)
338 inner_tetrahedron = t { v1 = point }
341 -- | The barycentric coordinates of a point with respect to v2.
342 b2 :: Tetrahedron -> (RealFunction Point)
343 b2 t point = (volume inner_tetrahedron) / (precomputed_volume t)
345 inner_tetrahedron = t { v2 = point }
348 -- | The barycentric coordinates of a point with respect to v3.
349 b3 :: Tetrahedron -> (RealFunction Point)
350 b3 t point = (volume inner_tetrahedron) / (precomputed_volume t)
352 inner_tetrahedron = t { v3 = point }
360 -- | Check the volume of a particular tetrahedron (computed by hand)
361 -- and whether or not it contains a specific point chosen to be
362 -- outside of it. Its vertices are in clockwise order, so the volume
363 -- should be negative.
364 tetrahedron1_geometry_tests :: Test.Framework.Test
365 tetrahedron1_geometry_tests =
366 testGroup "tetrahedron1 geometry"
367 [ testCase "volume1" volume1,
368 testCase "doesn't contain point1" doesnt_contain_point1]
374 t = Tetrahedron { v0 = p0,
378 function_values = empty_values,
379 precomputed_volume = 0 }
383 assertEqual "volume is correct" True (vol ~= (-1/3))
387 doesnt_contain_point1 :: Assertion
388 doesnt_contain_point1 =
389 assertEqual "doesn't contain an exterior point" False contained
391 exterior_point = (5, 2, -9.0212)
392 contained = contains_point t exterior_point
395 -- | Check the volume of a particular tetrahedron (computed by hand)
396 -- and whether or not it contains a specific point chosen to be
397 -- inside of it. Its vertices are in counter-clockwise order, so the
398 -- volume should be positive.
399 tetrahedron2_geometry_tests :: Test.Framework.Test
400 tetrahedron2_geometry_tests =
401 testGroup "tetrahedron2 geometry"
402 [ testCase "volume1" volume1,
403 testCase "contains point1" contains_point1]
409 t = Tetrahedron { v0 = p0,
413 function_values = empty_values,
414 precomputed_volume = 0 }
417 volume1 = assertEqual "volume1 is correct" True (vol ~= (1/3))
421 contains_point1 :: Assertion
422 contains_point1 = assertEqual "contains an inner point" True contained
424 inner_point = (1, 0, 0.5)
425 contained = contains_point t inner_point
428 -- | Ensure that tetrahedra do not contain a particular point chosen to
429 -- be outside of them.
430 containment_tests :: Test.Framework.Test
432 testGroup "containment tests"
433 [ testCase "doesn't contain point2" doesnt_contain_point2,
434 testCase "doesn't contain point3" doesnt_contain_point3,
435 testCase "doesn't contain point4" doesnt_contain_point4,
436 testCase "doesn't contain point5" doesnt_contain_point5]
440 exterior_point = (0, 0, 0)
442 doesnt_contain_point2 :: Assertion
443 doesnt_contain_point2 =
444 assertEqual "doesn't contain an exterior point" False contained
448 t = Tetrahedron { v0 = p0,
452 function_values = empty_values,
453 precomputed_volume = 0 }
454 contained = contains_point t exterior_point
457 doesnt_contain_point3 :: Assertion
458 doesnt_contain_point3 =
459 assertEqual "doesn't contain an exterior point" False contained
463 t = Tetrahedron { v0 = p0,
467 function_values = empty_values,
468 precomputed_volume = 0 }
469 contained = contains_point t exterior_point
472 doesnt_contain_point4 :: Assertion
473 doesnt_contain_point4 =
474 assertEqual "doesn't contain an exterior point" False contained
478 t = Tetrahedron { v0 = p0,
482 function_values = empty_values,
483 precomputed_volume = 0 }
484 contained = contains_point t exterior_point
487 doesnt_contain_point5 :: Assertion
488 doesnt_contain_point5 =
489 assertEqual "doesn't contain an exterior point" False contained
493 t = Tetrahedron { v0 = p0,
497 function_values = empty_values,
498 precomputed_volume = 0 }
499 contained = contains_point t exterior_point
502 -- | The barycentric coordinate of v0 with respect to itself should
504 prop_b0_v0_always_unity :: Tetrahedron -> Property
505 prop_b0_v0_always_unity t =
506 (volume t) > 0 ==> (b0 t) (v0 t) ~= 1.0
508 -- | The barycentric coordinate of v1 with respect to v0 should
510 prop_b0_v1_always_zero :: Tetrahedron -> Property
511 prop_b0_v1_always_zero t =
512 (volume t) > 0 ==> (b0 t) (v1 t) ~= 0
514 -- | The barycentric coordinate of v2 with respect to v0 should
516 prop_b0_v2_always_zero :: Tetrahedron -> Property
517 prop_b0_v2_always_zero t =
518 (volume t) > 0 ==> (b0 t) (v2 t) ~= 0
520 -- | The barycentric coordinate of v3 with respect to v0 should
522 prop_b0_v3_always_zero :: Tetrahedron -> Property
523 prop_b0_v3_always_zero t =
524 (volume t) > 0 ==> (b0 t) (v3 t) ~= 0
526 -- | The barycentric coordinate of v1 with respect to itself should
528 prop_b1_v1_always_unity :: Tetrahedron -> Property
529 prop_b1_v1_always_unity t =
530 (volume t) > 0 ==> (b1 t) (v1 t) ~= 1.0
532 -- | The barycentric coordinate of v0 with respect to v1 should
534 prop_b1_v0_always_zero :: Tetrahedron -> Property
535 prop_b1_v0_always_zero t =
536 (volume t) > 0 ==> (b1 t) (v0 t) ~= 0
538 -- | The barycentric coordinate of v2 with respect to v1 should
540 prop_b1_v2_always_zero :: Tetrahedron -> Property
541 prop_b1_v2_always_zero t =
542 (volume t) > 0 ==> (b1 t) (v2 t) ~= 0
544 -- | The barycentric coordinate of v3 with respect to v1 should
546 prop_b1_v3_always_zero :: Tetrahedron -> Property
547 prop_b1_v3_always_zero t =
548 (volume t) > 0 ==> (b1 t) (v3 t) ~= 0
550 -- | The barycentric coordinate of v2 with respect to itself should
552 prop_b2_v2_always_unity :: Tetrahedron -> Property
553 prop_b2_v2_always_unity t =
554 (volume t) > 0 ==> (b2 t) (v2 t) ~= 1.0
556 -- | The barycentric coordinate of v0 with respect to v2 should
558 prop_b2_v0_always_zero :: Tetrahedron -> Property
559 prop_b2_v0_always_zero t =
560 (volume t) > 0 ==> (b2 t) (v0 t) ~= 0
562 -- | The barycentric coordinate of v1 with respect to v2 should
564 prop_b2_v1_always_zero :: Tetrahedron -> Property
565 prop_b2_v1_always_zero t =
566 (volume t) > 0 ==> (b2 t) (v1 t) ~= 0
568 -- | The barycentric coordinate of v3 with respect to v2 should
570 prop_b2_v3_always_zero :: Tetrahedron -> Property
571 prop_b2_v3_always_zero t =
572 (volume t) > 0 ==> (b2 t) (v3 t) ~= 0
574 -- | The barycentric coordinate of v3 with respect to itself should
576 prop_b3_v3_always_unity :: Tetrahedron -> Property
577 prop_b3_v3_always_unity t =
578 (volume t) > 0 ==> (b3 t) (v3 t) ~= 1.0
580 -- | The barycentric coordinate of v0 with respect to v3 should
582 prop_b3_v0_always_zero :: Tetrahedron -> Property
583 prop_b3_v0_always_zero t =
584 (volume t) > 0 ==> (b3 t) (v0 t) ~= 0
586 -- | The barycentric coordinate of v1 with respect to v3 should
588 prop_b3_v1_always_zero :: Tetrahedron -> Property
589 prop_b3_v1_always_zero t =
590 (volume t) > 0 ==> (b3 t) (v1 t) ~= 0
592 -- | The barycentric coordinate of v2 with respect to v3 should
594 prop_b3_v2_always_zero :: Tetrahedron -> Property
595 prop_b3_v2_always_zero t =
596 (volume t) > 0 ==> (b3 t) (v2 t) ~= 0
599 -- | Used for convenience in the next few tests; not a test itself.
600 p :: Tetrahedron -> Int -> Int -> Int -> Int -> Double
601 p t i j k l = (polynomial t) (xi t i j k l)
603 -- | Given in Sorokina and Zeilfelder, p. 78.
604 prop_c3000_identity :: Tetrahedron -> Property
605 prop_c3000_identity t =
607 c t 3 0 0 0 ~= p t 3 0 0 0
609 -- | Given in Sorokina and Zeilfelder, p. 78.
610 prop_c2100_identity :: Tetrahedron -> Property
611 prop_c2100_identity t =
613 c t 2 1 0 0 ~= (term1 - term2 + term3 - term4)
615 term1 = (1/3)*(p t 0 3 0 0)
616 term2 = (5/6)*(p t 3 0 0 0)
617 term3 = 3*(p t 2 1 0 0)
618 term4 = (3/2)*(p t 1 2 0 0)
620 -- | Given in Sorokina and Zeilfelder, p. 78.
621 prop_c1110_identity :: Tetrahedron -> Property
622 prop_c1110_identity t =
624 c t 1 1 1 0 ~= (term1 + term2 - term3 - term4)
626 term1 = (1/3)*((p t 3 0 0 0) + (p t 0 3 0 0) + (p t 0 0 3 0))
627 term2 = (9/2)*(p t 1 1 1 0)
628 term3 = (3/4)*((p t 2 1 0 0) + (p t 1 2 0 0) + (p t 2 0 1 0))
629 term4 = (3/4)*((p t 1 0 2 0) + (p t 0 2 1 0) + (p t 0 1 2 0))
632 prop_swapping_vertices_doesnt_affect_coefficients1 :: Tetrahedron -> Bool
633 prop_swapping_vertices_doesnt_affect_coefficients1 t =
634 c t 0 0 1 2 == c t' 0 0 1 2
636 t' = t { v0 = (v1 t), v1 = (v0 t) }
638 prop_swapping_vertices_doesnt_affect_coefficients2 :: Tetrahedron -> Bool
639 prop_swapping_vertices_doesnt_affect_coefficients2 t =
640 c t 0 1 1 1 == c t' 0 1 1 1
642 t' = t { v2 = (v3 t), v3 = (v2 t) }
644 prop_swapping_vertices_doesnt_affect_coefficients3 :: Tetrahedron -> Bool
645 prop_swapping_vertices_doesnt_affect_coefficients3 t =
646 c t 2 1 0 0 == c t' 2 1 0 0
648 t' = t { v2 = (v3 t), v3 = (v2 t) }
650 prop_swapping_vertices_doesnt_affect_coefficients4 :: Tetrahedron -> Bool
651 prop_swapping_vertices_doesnt_affect_coefficients4 t =
652 c t 2 0 0 1 == c t' 2 0 0 1
654 t' = t { v0 = (v3 t), v3 = (v0 t) }
659 tetrahedron_tests :: Test.Framework.Test
661 testGroup "Tetrahedron Tests" [
662 tetrahedron1_geometry_tests,
663 tetrahedron2_geometry_tests,
668 p78_24_properties :: Test.Framework.Test
670 testGroup "p. 78, Section (2.4) Properties" [
671 testProperty "c3000 identity" prop_c3000_identity,
672 testProperty "c2100 identity" prop_c2100_identity,
673 testProperty "c1110 identity" prop_c1110_identity]
676 tetrahedron_properties :: Test.Framework.Test
677 tetrahedron_properties =
678 testGroup "Tetrahedron Properties" [
680 testProperty "b0_v0_always_unity" prop_b0_v0_always_unity,
681 testProperty "b0_v1_always_zero" prop_b0_v1_always_zero,
682 testProperty "b0_v2_always_zero" prop_b0_v2_always_zero,
683 testProperty "b0_v3_always_zero" prop_b0_v3_always_zero,
684 testProperty "b1_v1_always_unity" prop_b1_v1_always_unity,
685 testProperty "b1_v0_always_zero" prop_b1_v0_always_zero,
686 testProperty "b1_v2_always_zero" prop_b1_v2_always_zero,
687 testProperty "b1_v3_always_zero" prop_b1_v3_always_zero,
688 testProperty "b2_v2_always_unity" prop_b2_v2_always_unity,
689 testProperty "b2_v0_always_zero" prop_b2_v0_always_zero,
690 testProperty "b2_v1_always_zero" prop_b2_v1_always_zero,
691 testProperty "b2_v3_always_zero" prop_b2_v3_always_zero,
692 testProperty "b3_v3_always_unity" prop_b3_v3_always_unity,
693 testProperty "b3_v0_always_zero" prop_b3_v0_always_zero,
694 testProperty "b3_v1_always_zero" prop_b3_v1_always_zero,
695 testProperty "b3_v2_always_zero" prop_b3_v2_always_zero,
696 testProperty "swapping_vertices_doesnt_affect_coefficients1" $
697 prop_swapping_vertices_doesnt_affect_coefficients1,
698 testProperty "swapping_vertices_doesnt_affect_coefficients2" $
699 prop_swapping_vertices_doesnt_affect_coefficients2,
700 testProperty "swapping_vertices_doesnt_affect_coefficients3" $
701 prop_swapping_vertices_doesnt_affect_coefficients3,
702 testProperty "swapping_vertices_doesnt_affect_coefficients4" $
703 prop_swapping_vertices_doesnt_affect_coefficients4 ]