-- | Computed using the formula from Lai & Schumaker, Definition 15.4,
-- page 436.
+{-# INLINE volume #-}
volume :: Tetrahedron -> Double
volume t
| v0' == v1' = 0
-- | The barycentric coordinates of a point with respect to v0.
+{-# INLINE b0 #-}
b0 :: Tetrahedron -> (RealFunction Point)
b0 t point = (volume inner_tetrahedron) / (precomputed_volume t)
where
-- | The barycentric coordinates of a point with respect to v1.
+{-# INLINE b1 #-}
b1 :: Tetrahedron -> (RealFunction Point)
b1 t point = (volume inner_tetrahedron) / (precomputed_volume t)
where
-- | The barycentric coordinates of a point with respect to v2.
+{-# INLINE b2 #-}
b2 :: Tetrahedron -> (RealFunction Point)
b2 t point = (volume inner_tetrahedron) / (precomputed_volume t)
where
-- | The barycentric coordinates of a point with respect to v3.
+{-# INLINE b3 #-}
b3 :: Tetrahedron -> (RealFunction Point)
b3 t point = (volume inner_tetrahedron) / (precomputed_volume t)
where