wumpus-basic-0.16.0: Basic objects and system code built on Wumpus-Core.

PortabilityGHC
Stabilityhighly unstable
MaintainerStephen Tetley <stephen.tetley@gmail.com>

Wumpus.Basic.Geometry.Paths

Description

Paths for elementary shapes - rectangles...

** - WARNING ** - half baked.

Synopsis

Documentation

type LocCoordPath u = Point2 u -> [Point2 u]Source

A functional type from initial point to point list.

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]