Copyright | (c) Justus Sagemüller 2018 |
---|---|
License | GPL v3 |
Maintainer | (@) jsagemue $ uni-koeln.de |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- type Coordinate m = forall q. CoordinateIsh q m => q
- coordinate :: CoordinateIdentifier m -> Coordinate m
- class HasCoordinates m where
- data CoordinateIdentifier m :: *
- coordinateAsLens :: CoordinateIdentifier m -> Lens' m ℝ
- validCoordinateRange :: CoordinateIdentifier m -> m -> (ℝ, ℝ)
- class HasCoordinates m => HasXCoord m where
- xCoord :: Coordinate m
- class HasYCoord m where
- yCoord :: Coordinate m
- class HasZCoord m where
- zCoord :: Coordinate m
- location's :: (HasCoordinates b, HasCoordinates f) => CoordinateIdentifier b -> Coordinate (FibreBundle b f)
- class HasCoordinates m => CoordDifferential m where
- delta :: CoordinateIdentifier m -> Coordinate (TangentBundle m)
- class HasAzimuth m where
- azimuth :: Coordinate m
- class HasZenithDistance m where
- zenithAngle :: Coordinate m
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 #
Instances
Vector space axes
class HasCoordinates m => HasXCoord m where Source #
xCoord :: Coordinate m Source #
Instances
HasXCoord ℝ Source # | |
Defined in Math.Manifold.Real.Coordinates xCoord :: Coordinate ℝ Source # | |
HasXCoord ℝ³ Source # | |
Defined in Math.Manifold.Real.Coordinates xCoord :: Coordinate ℝ³ Source # | |
HasXCoord ℝ² Source # | |
Defined in Math.Manifold.Real.Coordinates xCoord :: Coordinate ℝ² Source # | |
(HasXCoord v, HasCoordinates w) => HasXCoord (v, w) Source # | |
Defined in Math.Manifold.Real.Coordinates xCoord :: Coordinate (v, w) Source # |
class HasYCoord m where Source #
yCoord :: Coordinate m Source #
Instances
HasYCoord ℝ³ Source # | |
Defined in Math.Manifold.Real.Coordinates yCoord :: Coordinate ℝ³ Source # | |
HasYCoord ℝ² Source # | |
Defined in Math.Manifold.Real.Coordinates yCoord :: Coordinate ℝ² Source # | |
HasCoordinates w => HasYCoord ((ℝ, ℝ), w) Source # | |
Defined in Math.Manifold.Real.Coordinates | |
HasXCoord w => HasYCoord (ℝ, w) Source # | |
Defined in Math.Manifold.Real.Coordinates yCoord :: Coordinate (ℝ, w) Source # |
class HasZCoord m where Source #
zCoord :: Coordinate m Source #
Instances
HasZCoord ℝ³ Source # | |
Defined in Math.Manifold.Real.Coordinates zCoord :: Coordinate ℝ³ Source # | |
HasXCoord w => HasZCoord ((ℝ, ℝ), w) Source # | |
Defined in Math.Manifold.Real.Coordinates | |
HasYCoord w => HasZCoord (ℝ, w) Source # | |
Defined in Math.Manifold.Real.Coordinates zCoord :: Coordinate (ℝ, w) Source # |
Fibre bundle / tangent space diffs
location's :: (HasCoordinates 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.
Instances
CoordDifferential S¹ Source # | |
Defined in Math.Manifold.Real.Coordinates delta :: CoordinateIdentifier S¹ -> Coordinate (TangentBundle S¹) Source # | |
CoordDifferential S² Source # | |
Defined in Math.Manifold.Real.Coordinates delta :: CoordinateIdentifier S² -> Coordinate (TangentBundle S²) Source # | |
CoordDifferential ℝ Source # | |
Defined in Math.Manifold.Real.Coordinates delta :: CoordinateIdentifier ℝ -> Coordinate (TangentBundle ℝ) Source # | |
CoordDifferential ℝ³ Source # | |
Defined in Math.Manifold.Real.Coordinates delta :: CoordinateIdentifier ℝ³ -> Coordinate (TangentBundle ℝ³) Source # | |
CoordDifferential ℝ² Source # | |
Defined in Math.Manifold.Real.Coordinates delta :: CoordinateIdentifier ℝ² -> Coordinate (TangentBundle ℝ²) Source # | |
(CoordDifferential a, CoordDifferential b) => CoordDifferential (a, b) Source # | |
Defined in Math.Manifold.Real.Coordinates delta :: CoordinateIdentifier (a, b) -> Coordinate (TangentBundle (a, b)) Source # |
Spherical coordinates
class HasAzimuth m where Source #
azimuth :: Coordinate m Source #
Instances
HasAzimuth S¹ Source # | |
Defined in Math.Manifold.Real.Coordinates azimuth :: Coordinate S¹ Source # | |
HasAzimuth S² Source # | |
Defined in Math.Manifold.Real.Coordinates azimuth :: Coordinate S² Source # |
class HasZenithDistance m where Source #
zenithAngle :: Coordinate m Source #
Instances
HasZenithDistance S² Source # | |
Defined in Math.Manifold.Real.Coordinates |