hgeometry
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellNone
LanguageGHC2021

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

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

Instances details
CFunctor (ClippedMinimizationDiagram' r) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Clipped.Type

Constrained (ClippedMinimizationDiagram' r) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Clipped.Type

(Show r, Num r, Show plane) => Show (ClippedMinimizationDiagram' r plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Clipped.Type

type Dom (ClippedMinimizationDiagram' r) plane Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Clipped.Type

type Dom (ClippedMinimizationDiagram' r) plane = Ord plane
type Dimension (ClippedMinimizationDiagram' r plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Clipped.Type

type Dimension (ClippedMinimizationDiagram' r plane) = 2
type NumType (ClippedMinimizationDiagram' r plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Clipped.Type

type NumType (ClippedMinimizationDiagram' r plane) = r

_ClippedMinimizationDiagramMap :: NumType plane ~ r => Iso' (ClippedMinimizationDiagram plane) (NEMap plane (ClippedMDCell r plane)) Source #

Get access to the underlying NonEmpty Map

type ClippedMDCell r plane = ClippedMDCell' r (MDVertex r plane) Source #

Cells in the Minimization diagram (i.e. the projected lower envelope of planes) parameterized by the numeric type and the planes

newtype ClippedMDCell' r vertex 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 (Point 2 r)) (ClippedBoundedRegion r vertex (Point 2 r))) 

Instances

Instances details
Functor (ClippedMDCell' r) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Clipped.Type

Methods

fmap :: (a -> b) -> ClippedMDCell' r a -> ClippedMDCell' r b #

(<$) :: a -> ClippedMDCell' r b -> ClippedMDCell' r a #

(Show vertex, Point_ vertex 2 r, Show r) => Show (ClippedMDCell' r vertex) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Clipped.Type

Methods

showsPrec :: Int -> ClippedMDCell' r vertex -> ShowS #

show :: ClippedMDCell' r vertex -> String #

showList :: [ClippedMDCell' r vertex] -> ShowS #

(Eq vertex, Eq r) => Eq (ClippedMDCell' r vertex) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Clipped.Type

Methods

(==) :: ClippedMDCell' r vertex -> ClippedMDCell' r vertex -> Bool #

(/=) :: ClippedMDCell' r vertex -> ClippedMDCell' r vertex -> Bool #

type Dimension (ClippedMDCell' r vertex) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Clipped.Type

type Dimension (ClippedMDCell' r vertex) = 2
type NumType (ClippedMDCell' r vertex) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Clipped.Type

type NumType (ClippedMDCell' r vertex) = r

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).