Portability | GHC |
---|---|
Stability | highly unstable |
Maintainer | Stephen Tetley <stephen.tetley@gmail.com> |
Paths for elementary shapes - rectangles...
** - WARNING ** - half baked.
- type LocCoordPath u = Point2 u -> [Point2 u]
- coordinatePrimPath :: Num u => Point2 u -> LocCoordPath u -> PrimPath u
- rectangleCoordPath :: Num u => u -> u -> LocCoordPath u
- diamondCoordPath :: Num u => u -> u -> LocCoordPath u
- polygonCoordPath :: Floating u => Int -> u -> LocCoordPath u
- isoscelesTriangleCoordPath :: Floating u => u -> u -> LocCoordPath u
- isoscelesTrianglePoints :: Floating u => u -> u -> Point2 u -> (Point2 u, Point2 u, Point2 u)
- equilateralTriangleCoordPath :: Floating u => u -> LocCoordPath u
- equilateralTrianglePoints :: Floating u => u -> Point2 u -> (Point2 u, Point2 u, Point2 u)
Documentation
type LocCoordPath u = Point2 u -> [Point2 u]Source
A functional type from initial point to point list.
coordinatePrimPath :: Num u => Point2 u -> LocCoordPath u -> PrimPath uSource
rectangleCoordPath :: Num u => u -> u -> LocCoordPath uSource
Supplied point is bottom-left, subsequenct points are counter-clockise so [ bl, br, tr, tl ] .
diamondCoordPath :: Num u => u -> u -> LocCoordPath uSource
diamondPath
: half_width * half_height * center_point -> PrimPath
polygonCoordPath :: Floating u => Int -> u -> LocCoordPath uSource
polygonCoordPath
: num_points * radius * center -> [point]
isoscelesTriangleCoordPath :: Floating u => u -> u -> LocCoordPath uSource
isocelesTriangle bw h pt
Supplied point is the centriod of the triangle. This has a nicer visual balance than using half-height.
isoscelesTrianglePoints :: Floating u => u -> u -> Point2 u -> (Point2 u, Point2 u, Point2 u)Source
isocelesTriangle bw h pt
Supplied point is the centriod of the triangle. This has a nicer visual balance than using half-height.
equilateralTriangleCoordPath :: Floating u => u -> LocCoordPath uSource
side_length * ctr -> [Points]