| Copyright | (C) Frank Staals |
|---|---|
| License | see the LICENSE file |
| Maintainer | Frank Staals |
| Safe Haskell | None |
| Language | GHC2024 |
HGeometry.Ellipse
Description
Data type for representing an Ellipse.
Synopsis
- newtype Ellipse r = Ellipse (Transformation 2 r)
- affineTransformation :: forall r s p f. (Profunctor p, Functor f) => p (Transformation 2 r) (f (Transformation 2 s)) -> p (Ellipse r) (f (Ellipse s))
- ellipseMatrix :: forall r s p f. (Profunctor p, Functor f) => p (Matrix 3 3 r) (f (Matrix 3 3 s)) -> p (Ellipse r) (f (Ellipse s))
- unitEllipse :: Num r => Ellipse r
- circleToEllipse :: (Radical r, Point_ point 2 r) => Circle point -> Ellipse r
- ellipseToCircle :: (Num r, Eq r) => Ellipse r -> Maybe (Circle (Point 2 r))
- _EllipseCircle :: (Radical r, Eq r) => Prism' (Ellipse r) (Circle (Point 2 r))
Documentation
A type representing planar ellipses
Constructors
| Ellipse (Transformation 2 r) |
Instances
affineTransformation :: forall r s p f. (Profunctor p, Functor f) => p (Transformation 2 r) (f (Transformation 2 s)) -> p (Ellipse r) (f (Ellipse s)) Source #
Iso to access the transformation (applied on the unit circle) that we use to actually represent the ellipse
ellipseMatrix :: forall r s p f. (Profunctor p, Functor f) => p (Matrix 3 3 r) (f (Matrix 3 3 s)) -> p (Ellipse r) (f (Ellipse s)) Source #
Get the matrix describing the ellipse.
unitEllipse :: Num r => Ellipse r Source #
Ellipse representing the unit circle
circleToEllipse :: (Radical r, Point_ point 2 r) => Circle point -> Ellipse r Source #
Convert a circle to an ellipse