Copyright | (C) 2015 Christopher Chalmers |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Christopher Chalmers |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
This module defines a polar coordinate data type. This type can be used as an axis space for polar plots.
Synopsis
- newtype Polar a = Polar (V2 a)
- mkPolar :: n -> Angle n -> Polar n
- polar :: (n, Angle n) -> Polar n
- unpolar :: Polar n -> (n, Angle n)
- polarIso :: Iso' (Polar n) (n, Angle n)
- polarV2 :: RealFloat n => Iso' (Polar n) (V2 n)
- interpPolar :: Num n => n -> Polar n -> Polar n -> Polar n
- class Radial t where
- class Radial t => Circle t where
- class HasX t where
- class HasX t => HasY t where
- class HasR (t :: Type -> Type) where
- er :: Radial v => E v
- eθ :: Circle v => E v
- etheta :: Circle v => E v
Polar type
Instances
Polar functions
interpPolar :: Num n => n -> Polar n -> Polar n -> Polar n Source #
Polar interpolation between two polar coordinates.
Classes
Space which has a radial length basis. For Polar and Cylindrical this is the radius of the circle in the xy-plane. For Spherical this is the distance from the origin.
Coordinate with at least one dimension where the x coordinate can be
retrieved numerically. Note this differs slightly from R1
which requires
a lens for all values. This allows instances for different coordinates
such as Polar
, where the x coordinate can only be retrieved numerically.
class HasX t => HasY t where Source #
Coordinate with at least two dimensions where the x and y coordinates can be retreived numerically.