Copyright | (C) Frank Staals |
---|---|
License | see the LICENSE file |
Maintainer | Frank Staals |
Safe Haskell | None |
Language | GHC2024 |
HGeometry.Plane.LowerEnvelope.Clipped
Description
A Representation of the Lower envelope of planes inside a given triangle. This means now all regions are actually bounded.
Synopsis
- type ClippedMinimizationDiagram plane = ClippedMinimizationDiagram' (NumType plane) plane
- data ClippedMinimizationDiagram' r plane
- _ClippedMinimizationDiagramMap :: NumType plane ~ r => Iso' (ClippedMinimizationDiagram plane) (NEMap plane (ClippedMDCell r plane ()))
- type ClippedMDCell r plane a = ClippedMDCell' r (MDVertex r plane a)
- type ClippedMDCell' r vertex = ClippedMDCell'' r vertex (Point 2 r)
- newtype ClippedMDCell'' (r :: k) vertex extra = ClippedMDCell (PossiblyDegenerateSimplePolygon (OriginalOrExtra vertex extra) (ClippedBoundedRegion r vertex extra))
- lowerEnvelopeIn :: (Plane_ plane r, Ord plane, Ord r, Fractional r, Point_ corner 2 r, Foldable1 set, Show r, Show corner, Show plane) => Triangle corner -> set plane -> ClippedMinimizationDiagram plane
- foldMapVertices :: forall {k} m vertex extra (r :: k). Semigroup m => (OriginalOrExtra vertex extra -> m) -> ClippedMDCell'' r vertex extra -> m
Documentation
type ClippedMinimizationDiagram plane = ClippedMinimizationDiagram' (NumType plane) plane Source #
The representing (the minimization diagram) of the lower envelope of a set of planes, clipped to some bounding triangle.
A ClippedMinimizationDiagram
is essentially just a non-empty Map mapping planes
to cells.
data ClippedMinimizationDiagram' r plane Source #
Implementatino of the ClippedMinimizationDiagram type; r is the numeric type of the planes
Instances
_ClippedMinimizationDiagramMap :: NumType plane ~ r => Iso' (ClippedMinimizationDiagram plane) (NEMap plane (ClippedMDCell r plane ())) Source #
Get access to the underlying NonEmpty Map
type ClippedMDCell r plane a = ClippedMDCell' r (MDVertex r plane a) Source #
Cells in the Minimization diagram (i.e. the projected lower envelope of planes) parameterized by the numeric type and the planes
type ClippedMDCell' r vertex = ClippedMDCell'' r vertex (Point 2 r) Source #
We mostly use ClippedMDCell'''s where the Extra is just a Point
newtype ClippedMDCell'' (r :: k) vertex extra Source #
Helper type for representing cells in a minimzation diagram. These cells are possibly
degenerate convex polygons, whose vertices are either of type vertex
or of type
'Point 2 r'.
Constructors
ClippedMDCell (PossiblyDegenerateSimplePolygon (OriginalOrExtra vertex extra) (ClippedBoundedRegion r vertex extra)) |
Instances
lowerEnvelopeIn :: (Plane_ plane r, Ord plane, Ord r, Fractional r, Point_ corner 2 r, Foldable1 set, Show r, Show corner, Show plane) => Triangle corner -> set plane -> ClippedMinimizationDiagram plane Source #
Compute the lower envelope of planes inside a given triangle.
\(O(n^4)\) (as it currently uses the brute force algorithm).
foldMapVertices :: forall {k} m vertex extra (r :: k). Semigroup m => (OriginalOrExtra vertex extra -> m) -> ClippedMDCell'' r vertex extra -> m Source #
Fold a given function over all vertices