X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FTetrahedron.hs;h=ad164d2426dce01e85cbf3d22cab0d0a19380410;hb=7d6bba8440f4327de6272e5c513959425f841c5d;hp=032ce1eb9855b821d8964c44a824b911c1765a59;hpb=aebb9084065fab1f1d7714a5da49032a88150685;p=spline3.git diff --git a/src/Tetrahedron.hs b/src/Tetrahedron.hs index 032ce1e..ad164d2 100644 --- a/src/Tetrahedron.hs +++ b/src/Tetrahedron.hs @@ -54,10 +54,15 @@ polynomial t = -- | Returns the domain point of t with indices i,j,k,l. +-- Simply an alias for the domain_point function. xi :: Tetrahedron -> Int -> Int -> Int -> Int -> Point -xi t i j k l +xi = domain_point + +-- | Returns the domain point of t with indices i,j,k,l. +domain_point :: Tetrahedron -> Int -> Int -> Int -> Int -> Point +domain_point t i j k l | i + j + k + l == 3 = weighted_sum `scale` (1/3) - | otherwise = error "xi index out of bounds" + | otherwise = error "domain point index out of bounds" where v0' = (v0 t) `scale` (fromIntegral i) v1' = (v1 t) `scale` (fromIntegral j) @@ -66,7 +71,6 @@ xi t i j k l weighted_sum = v0' + v1' + v2' + v3' - -- | The Bernstein polynomial on t with indices i,j,k,l. Denoted by a -- capital 'B' in the Sorokina/Zeilfelder paper. beta :: Tetrahedron -> Int -> Int -> Int -> Int -> (RealFunction Point)