earclipper-0.0.0.1: Ear Clipping Triangulation

Safe HaskellSafe
LanguageHaskell2010

Earclipper.EarClipping

Description

Ear clipping triangulation

Synopsis

Documentation

toTriangle :: [(Double, Double)] -> [[(Double, Double)]] Source #

Triangulate given polygon and return a list of triangles. The given polygon's start point end end point has to be equal. The first point is removed before triangulation. Use the triangulate function if you want to supply a polygon directly without modification.

triangulate :: [(Double, Double)] -> [[(Double, Double)]] Source #

Triangulate given polygon and return a list of triangles. It is assumed that the given polygon's end point is the start point and that the first point in the list is not the start point.

pointInTriangle :: [(Double, Double)] -> (Double, Double) -> Bool Source #

Check if given point is in given triangle.

isAnyPointInTriangle :: [(Double, Double)] -> [(Double, Double)] -> Bool Source #

Check if any given point in list is in the given triangle.

isConvex :: (Double, Double) -> (Double, Double) -> (Double, Double) -> Bool Source #

Check if given points are convex.