Copyright | (C) Frank Staals |
---|---|
License | see the LICENSE file |
Maintainer | Frank Staals |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
HGeometry.Ellipse
Description
Data type for representing an Ellipse.
Synopsis
- newtype Ellipse r = Ellipse (Transformation 2 r)
- affineTransformation :: Iso (Ellipse r) (Ellipse s) (Transformation 2 r) (Transformation 2 s)
- ellipseMatrix :: Iso (Ellipse r) (Ellipse s) (Matrix 3 3 r) (Matrix 3 3 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 :: Iso (Ellipse r) (Ellipse s) (Transformation 2 r) (Transformation 2 s) Source #
Iso to access the transformation (applied on the unit circle) that we use to actually represent the ellipse
ellipseMatrix :: Iso (Ellipse r) (Ellipse s) (Matrix 3 3 r) (Matrix 3 3 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