Copyright | (c) Justus Sagemüller 2018 |
---|---|
License | GPL v3 |
Maintainer | (@) jsagemue $ uni-koeln.de |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
- type Coordinate m = forall q. CoordinateIsh q m => q
- coordinate :: CoordinateIdentifier m -> Coordinate m
- class HasCoordinates m where
- data CoordinateIdentifier m :: *
- class HasCoordinates m => HasXCoord m where
- class HasYCoord m where
- class HasZCoord m where
- location's :: (HasCoordinates b, Interior b ~ b, HasCoordinates f) => CoordinateIdentifier b -> Coordinate (FibreBundle b f)
- class HasCoordinates m => CoordDifferential m where
- class HasAzimuth m where
- class HasZenithDistance m where
Documentation
type Coordinate m = forall q. CoordinateIsh q m => q Source #
A coordinate is a function that can be used both to determine the position
of a point on a manifold along the one of some family of (possibly curved) axes on
which it lies, and for moving the point along that axis.
Basically, this is a Lens
and can indeed be used with the ^.
, .~
and %~
operators.
Coordinate
m ~Lens'
m 'ℝ'
In addition, each type may also have a way of identifying particular coordinate
axes. This is done with CoordinateIdentifier
, which is what should be used
for defining given coordinate axes.
coordinate :: CoordinateIdentifier m -> Coordinate m Source #
class HasCoordinates m where Source #
To give a custom type coordinate axes, first define an instance of this class.
data CoordinateIdentifier m :: * Source #
A unique description of a coordinate axis.
coordinateAsLens :: CoordinateIdentifier m -> Lens' m ℝ Source #
How to use a coordinate axis for points in the containing space.
This is what coordinate
calls under the hood.
validCoordinateRange :: CoordinateIdentifier m -> m -> (ℝ, ℝ) Source #
HasCoordinates S¹ Source # | |
HasCoordinates S² Source # | |
HasCoordinates ℝ Source # | |
HasCoordinates ℝ⁰ Source # | |
HasCoordinates ℝ³ Source # | |
HasCoordinates ℝ² Source # | |
(HasCoordinates a, HasCoordinates b) => HasCoordinates (a, b) Source # | |
(HasCoordinates b, HasCoordinates f) => HasCoordinates (FibreBundle b f) Source # | |
Vector space axes
class HasCoordinates m => HasXCoord m where Source #
xCoord :: Coordinate m Source #
Fibre bundle / tangent space diffs
location's :: (HasCoordinates b, Interior b ~ b, HasCoordinates f) => CoordinateIdentifier b -> Coordinate (FibreBundle b f) Source #
class HasCoordinates m => CoordDifferential m where Source #
delta :: CoordinateIdentifier m -> Coordinate (TangentBundle m) Source #
Observe local, small variations (in the tangent space) of a coordinate.
The idea is that ((p & coord+~δc) − p) ^. delta coord ≈ δc
, thus the name
“delta
”. Note however that this only holds exactly for flat spaces;
in most manifolds it can (by design) only be understood in an asymptotic
sense, i.e. used for evaluating directional derivatives of some function.
In particular, delta
is unstable near the poles of a sphere,
because it has to compensate for the sensitive rotation of the azimuth
eφ
unit vector.
Spherical coordinates
class HasAzimuth m where Source #
azimuth :: Coordinate m Source #
class HasZenithDistance m where Source #
zenithAngle :: Coordinate m Source #