Stability | experimental |
---|---|
Maintainer | conal@conal.net |
Parametric surfaces with automatic normals
- type HeightField s = Complex s -> s
- type Surf s = Complex s -> (s, s, s)
- type USurf = forall s. Floating s => Surf s
- type Curve2 s = s -> Complex s
- type Curve3 s = s -> (s, s, s)
- type Warp1 s = s -> s
- type Warp2 s = Complex s -> Complex s
- type Warp3 s = (s, s, s) -> (s, s, s)
- sinU :: Floating s => s -> s
- cosU :: Floating s => s -> s
- hfSurf :: HeightField s -> Surf s
- fcurve :: Warp1 s -> Curve2 s
- circle :: Floating s => Curve2 s
- semiCircle :: Floating s => Curve2 s
- torus :: (Floating s, VectorSpace s, Scalar s ~ s) => s -> s -> Surf s
- revolveG :: Floating s => (s -> Curve2 s) -> Surf s
- revolve :: Floating s => Curve2 s -> Surf s
- sphere1 :: Floating s => Surf s
- profile :: Num s => Curve2 s -> Curve2 s -> Surf s
- sphere3 :: Floating s => Surf s
- sphere2 :: Floating s => Surf s
- frustum :: (Floating s, VectorSpace s, Scalar s ~ s) => s -> s -> s -> Surf s
- ucylinder :: (Floating s, VectorSpace s) => Surf s
- xyPlane :: Num s => Surf s
- cartF :: (a -> b -> c) -> (s -> a) -> (s -> b) -> Complex s -> c
- sweep :: VectorSpace s => Curve3 s -> Curve3 s -> Surf s
- eggcrateH :: Floating s => HeightField s
- revolveH :: (Floating s, InnerSpace s, Scalar s ~ s) => Warp1 s -> HeightField s
- rippleH :: (Floating s, InnerSpace s, Scalar s ~ s) => HeightField s
- ripple :: Floating s => Surf s
- displaceV :: (InnerSpace v, s ~ Scalar v, Floating s, HasNormal v) => v -> Scalar v -> v
- displace :: (InnerSpace v, Scalar v ~ s, Floating s, HasNormal v, Applicative f) => f v -> f (Scalar v) -> f v
- rotate :: Floating s => s -> Warp2 s
- addY :: Num s => (a -> Complex s) -> a -> (s, s, s)
- addZ :: Num s => (a -> Complex s) -> a -> (s, s, s)
- addX :: Num s => (a -> Complex s) -> a -> (s, s, s)
- addXZ :: Num s => (a -> s) -> a -> (s, s, s)
- addXY :: Num s => (a -> s) -> a -> (s, s, s)
- addYZ :: Num s => (a -> s) -> a -> (s, s, s)
- onY :: Warp1 s -> Warp3 s
- onZ :: Warp1 s -> Warp3 s
- onX :: Warp1 s -> Warp3 s
- onYZ :: Warp2 s -> Warp3 s
- onXZ :: Warp2 s -> Warp3 s
- onXY :: Warp2 s -> Warp3 s
- onY' :: Warp1 s -> (a -> (s, s, s)) -> a -> (s, s, s)
- onZ' :: Warp1 s -> (a -> (s, s, s)) -> a -> (s, s, s)
- onX' :: Warp1 s -> (a -> (s, s, s)) -> a -> (s, s, s)
- onXZ' :: Warp2 s -> (a -> (s, s, s)) -> a -> (s, s, s)
- onYZ' :: Warp2 s -> (a -> (s, s, s)) -> a -> (s, s, s)
- onXY' :: Warp2 s -> (a -> (s, s, s)) -> a -> (s, s, s)
- type V2 a = (a, a)
- type V3 a = (a, a, a)
- type ER = FloatE
- type ER2 = V2 ER
- type ER3 = V3 ER
- type TR = ER :> ER
- type T = ER2 :> ER
- type SurfPt = V3 T
- type SurfD = Surf T
- type VN = (R3E, R3E)
- toVN :: SurfPt -> VN
- type SurfVN = R2E -> VN
- surfVN :: SurfD -> SurfVN
Documentation
type HeightField s = Complex s -> sSource
hfSurf :: HeightField s -> Surf sSource
Turn a height field into a surface
semiCircle :: Floating s => Curve2 sSource
Half semi circle, with theta in [-pi2,pi2]
torus :: (Floating s, VectorSpace s, Scalar s ~ s) => s -> s -> Surf sSource
Torus, given radius of sweep circle and cross section
frustum :: (Floating s, VectorSpace s, Scalar s ~ s) => s -> s -> s -> Surf sSource
Frustum, given base & cap radii and height.
ucylinder :: (Floating s, VectorSpace s) => Surf sSource
Unit cylinder. Unit height and radii
cartF :: (a -> b -> c) -> (s -> a) -> (s -> b) -> Complex s -> cSource
Given a combining op and two curves, make a surface. A sort of Cartesian product with combination.
eggcrateH :: Floating s => HeightField sSource
One period, unit height eggcrate
revolveH :: (Floating s, InnerSpace s, Scalar s ~ s) => Warp1 s -> HeightField sSource
rippleH :: (Floating s, InnerSpace s, Scalar s ~ s) => HeightField sSource
displaceV :: (InnerSpace v, s ~ Scalar v, Floating s, HasNormal v) => v -> Scalar v -> vSource
Apply a displacement map at a value
displace :: (InnerSpace v, Scalar v ~ s, Floating s, HasNormal v, Applicative f) => f v -> f (Scalar v) -> f vSource