- type Point = (Double, Double)
- type Line = (Point, Point)
- crossPoint :: Line -> Line -> Maybe Point
- plantedToLines :: Planted a -> [(Line, a)]
- plantToGeometry :: Plant a -> GeometryGenerator a ()
- gardenToLines :: Garden a -> [(Line, a)]
- lightenLines :: Double -> [(Line, a)] -> [(Line, a, Double)]
- lightPolygons :: Double -> [(Line, a)] -> [(Point, Point, Point, Point, Double)]
- allKindsOfStuffWithAngle :: forall a. Double -> [(Line, a)] -> ([(Line, a, Double)], [(Point, Point, Point, Point, Double)])
- lightenGarden :: Angle -> Garden a -> Garden (a, Double)
- mapLine :: (forall b. [(Line, b)] -> [(Line, b, c)]) -> c -> (c -> c -> c) -> Garden a -> Garden (a, c)
- gardenOffset :: AnnotatedGarden -> (Double, Double, Double)

# Documentation

plantedToLines :: Planted a -> [(Line, a)]Source

plantToGeometry :: Plant a -> GeometryGenerator a ()Source

gardenToLines :: Garden a -> [(Line, a)]Source

Lines are annotated with its plant, identified by the extra data

allKindsOfStuffWithAngle :: forall a. Double -> [(Line, a)] -> ([(Line, a, Double)], [(Point, Point, Point, Point, Double)])Source

lightenGarden :: Angle -> Garden a -> Garden (a, Double)Source

Annotates each piece of the garden with the amount of line it attacts

mapLine :: (forall b. [(Line, b)] -> [(Line, b, c)]) -> c -> (c -> c -> c) -> Garden a -> Garden (a, c)Source

Helper to apply a function that works on lines to a garden

gardenOffset :: AnnotatedGarden -> (Double, Double, Double)Source

Slightly shifts angles

For a Garden, calculates the maximum size to the left, to the right, and maximum height