hgeometry-0.1.0.0: Geometry types in Haskell

Safe HaskellNone

Data.Geometry.Line

Synopsis

Documentation

data LineSegment2' a Source

A simple line segment in 2D consisint of a start and an end-point

Constructors

LineSegment2 

Fields

startPoint :: Point2' a
 
endPoint :: Point2' a
 

Instances

Functor LineSegment2' 
HasPoints LineSegment2' 
IsPoint2Functor LineSegment2' 
LineLike LineSegment2' 
(Ord a, Floating a) => AreIntersectable Circle2' LineSegment2' a

Intersection is symetrical instance AreIntersectable g h a => AreIntersectable h g a where intersectionPoints h g = intersectionPoints g h

Eq a => Eq (LineSegment2' a) 
(Eq (LineSegment2' a), Ord a) => Ord (LineSegment2' a) 
Read a => Read (LineSegment2' a) 
Show a => Show (LineSegment2' a) 
Floating a => HasLength (LineSegment2' a) 

newtype Line2' a Source

An infinite line

Constructors

Line2 (LineSegment2' a) 

polyLine :: [Point2' a] -> Polyline2' aSource

Constructing polylines

isSimpleLine :: Polyline2' a -> BoolSource

functions on Linesegments and Polylines

linear :: Num a => a -> a -> a -> aSource

Linear interpolation / points on line segments etc.

simple linear interpolation, assuming t in [0,1]

class HasLength c whereSource

Associated Types

type PM c Source

Methods

length :: c -> PM cSource

The length of the line-like segment

class LineLike c whereSource

Methods

pointAt :: Num a => a -> c a -> Point2' aSource

get the point at time t (t in [0,1])