tropical-geometry-0.0.0.1: A Tropical Geometry package for Haskell

Safe HaskellNone
LanguageHaskell2010

Geometry.ConvexHull3

Contents

Synopsis

Data types

type Point3D = (Int, Int, Int) Source #

newtype Vertex Source #

Constructors

Vertex 

Fields

Instances
Eq Vertex Source # 
Instance details

Defined in Geometry.ConvexHull3

Methods

(==) :: Vertex -> Vertex -> Bool #

(/=) :: Vertex -> Vertex -> Bool #

Ord Vertex Source # 
Instance details

Defined in Geometry.ConvexHull3

Show Vertex Source # 
Instance details

Defined in Geometry.ConvexHull3

newtype Edge Source #

Edge as a pair of vertices. When constructing the initial tetrahedron, the order of the vertices must be counterclockwise.

Constructors

Edge 

Fields

Instances
Eq Edge Source # 
Instance details

Defined in Geometry.ConvexHull3

Methods

(==) :: Edge -> Edge -> Bool #

(/=) :: Edge -> Edge -> Bool #

Ord Edge Source # 
Instance details

Defined in Geometry.ConvexHull3

Methods

compare :: Edge -> Edge -> Ordering #

(<) :: Edge -> Edge -> Bool #

(<=) :: Edge -> Edge -> Bool #

(>) :: Edge -> Edge -> Bool #

(>=) :: Edge -> Edge -> Bool #

max :: Edge -> Edge -> Edge #

min :: Edge -> Edge -> Edge #

Show Edge Source # 
Instance details

Defined in Geometry.ConvexHull3

Methods

showsPrec :: Int -> Edge -> ShowS #

show :: Edge -> String #

showList :: [Edge] -> ShowS #

newtype Facet Source #

Facet in this case is a 2-face. It is stored as a collection of edges.

Constructors

Facet 

Fields

Instances
Eq Facet Source # 
Instance details

Defined in Geometry.ConvexHull3

Methods

(==) :: Facet -> Facet -> Bool #

(/=) :: Facet -> Facet -> Bool #

Ord Facet Source # 
Instance details

Defined in Geometry.ConvexHull3

Methods

compare :: Facet -> Facet -> Ordering #

(<) :: Facet -> Facet -> Bool #

(<=) :: Facet -> Facet -> Bool #

(>) :: Facet -> Facet -> Bool #

(>=) :: Facet -> Facet -> Bool #

max :: Facet -> Facet -> Facet #

min :: Facet -> Facet -> Facet #

Show Facet Source # 
Instance details

Defined in Geometry.ConvexHull3

Methods

showsPrec :: Int -> Facet -> ShowS #

show :: Facet -> String #

showList :: [Facet] -> ShowS #

newtype ConvexHull Source #

The convex hull of a set is the collection of all the facets that conform that polyhedron.

Constructors

ConvexHull 

Fields

Instances
Eq ConvexHull Source # 
Instance details

Defined in Geometry.ConvexHull3

Show ConvexHull Source # 
Instance details

Defined in Geometry.ConvexHull3

data ConflictGraph Source #

The conflict graph is a data structure that stores for each point the list of facets that points views. And for every facet the list of points that facet views.

Convex hull

convexHull3 :: [Point3D] -> Maybe ConvexHull Source #

Assume every point is different

Computations of geometrical objects

fromVertices :: [Point3D] -> Facet Source #

Generates a facet from its vertices. Points must be ordered counterclockwise

Operations with points

mergePoints :: [Point3D] -> [Point3D] -> [Point3D] Source #

Merges two lists of points ensuring that the counterclockwise orientation remains.

Testing

isColinearIn3DFromList Source #

Arguments

:: [Point3D] 
-> Bool

Not able to use determinant algorithm because the matrix is not square

Orphan instances

Num (Int, Int, Int) Source # 
Instance details

Methods

(+) :: (Int, Int, Int) -> (Int, Int, Int) -> (Int, Int, Int) #

(-) :: (Int, Int, Int) -> (Int, Int, Int) -> (Int, Int, Int) #

(*) :: (Int, Int, Int) -> (Int, Int, Int) -> (Int, Int, Int) #

negate :: (Int, Int, Int) -> (Int, Int, Int) #

abs :: (Int, Int, Int) -> (Int, Int, Int) #

signum :: (Int, Int, Int) -> (Int, Int, Int) #

fromInteger :: Integer -> (Int, Int, Int) #