diagrams-lib-1.4.5.1: Embedded domain-specific language for declarative graphics
Copyright(c) 2012 diagrams-lib team (see LICENSE)
LicenseBSD-style (see LICENSE)
Maintainerdiagrams-discuss@googlegroups.com
Safe HaskellNone
LanguageHaskell2010

Diagrams.TwoD.Segment

Description

Segments in two dimensions are special since we may meaningfully compute their point of intersection with a ray.

Synopsis

Segment intersections

intersectPointsS :: OrderedField n => FixedSegment V2 n -> FixedSegment V2 n -> [P2 n] Source #

Compute the intersections between two fixed segments.

intersectPointsS' :: OrderedField n => n -> FixedSegment V2 n -> FixedSegment V2 n -> [P2 n] Source #

Compute the intersections between two segments using the given tolerance.

Closest point on a segment

closestPoint :: OrderedField n => FixedSegment V2 n -> P2 n -> [P2 n] Source #

Get the closest point(s) on a FixedSegment from a point.

closestPoint' :: OrderedField n => n -> FixedSegment V2 n -> P2 n -> [P2 n] Source #

Get the closest point(s) on a FixedSegment from a point within given tolerance.

closestDistance :: OrderedField n => FixedSegment V2 n -> P2 n -> [n] Source #

Get the closest distance(s) from a point to a FixedSegment.

closestDistance' :: OrderedField n => n -> FixedSegment V2 n -> P2 n -> [n] Source #

Get the closest distance(s) from a point to a FixedSegment within given tolerance.

closestParam :: OrderedField n => FixedSegment V2 n -> P2 n -> [n] Source #

Find the closest value(s) on the Bêzier to the given point.

closestParam' :: OrderedField n => n -> FixedSegment V2 n -> P2 n -> [n] Source #

Find the closest value(s) on the Bêzier to the given point within given tolerance.

Low level functions

segmentSegment :: OrderedField n => n -> FixedSegment V2 n -> FixedSegment V2 n -> [(n, n, P2 n)] Source #

Return the intersection points with the parameters at which each segment intersects.

lineSegment :: OrderedField n => n -> Located (V2 n) -> FixedSegment V2 n -> [(n, n, P2 n)] Source #

Return the intersection points with the parameters at which the line and segment intersect.

Orphan instances

OrderedField n => Traced (FixedSegment V2 n) Source # 
Instance details

OrderedField n => Traced (Segment Closed V2 n) Source # 
Instance details