X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FTetrahedron.hs;h=ad164d2426dce01e85cbf3d22cab0d0a19380410;hb=68b7d1002448a896236050caceb4f38463b996f4;hp=032ce1eb9855b821d8964c44a824b911c1765a59;hpb=89b8b6e94fcc944a1f4611811265f3c6217af850;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)