| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
NumHask.Space.Chart
Contents
Description
Coordinate charts and coordinate patches.
A Chart is the differential-geometric notion of a homeomorphism from an
open subset of a manifold m to an open subset of a model space of
coordinates c. In this library the coordinate patch is represented by a
Space (typically a Rect for 2-D coordinates), so the existing
SpaceRectPoint machinery becomes the chart infrastructure for free.
Synopsis
- data Chart m c where
- data SomeSpace c where
- chartMap :: Chart m c -> c -> m
- chartInverse :: Chart m c -> m -> c
- chartDomain :: Chart m c -> SomeSpace c
- inverseChart :: (Space s, Element s ~ m) => s -> Chart m c -> Chart c m
- transition :: Chart m c2 -> Chart m c1 -> c1 -> c2
- affineChart :: (Field a, Ord a) => Rect a -> Rect a -> Chart (Point a) (Point a)
- polarChart :: (TrigField a, ExpField a, Ord a) => Rect a -> Chart (Point a) (Point a)
Charts
chartInverse :: Chart m c -> m -> c Source #
Extract the inverse map from a chart.
chartDomain :: Chart m c -> SomeSpace c Source #
Extract the coordinate-domain patch from a chart.
inverseChart :: (Space s, Element s ~ m) => s -> Chart m c -> Chart c m Source #
Invert a chart, supplying the codomain patch for the inverse.
transition :: Chart m c2 -> Chart m c1 -> c1 -> c2 Source #
Transition map from the first chart to the second.
Both charts must cover (at least overlap on) the same manifold. The result
is φ₂ ∘ φ₁⁻¹.
>>>let polar = polarChart (Rect 0.1 5 (-pi) pi)>>>let cartesian = affineChart (Rect (-5) 5 (-5) 5) (Rect 0 1 0 1)>>>transition cartesian polar (Point 1 0)Point 0.6 0.5