computational-geometry-0.1.0.1: Collection of algorithms in Computational Geometry.

Copyright(C) 2017 Maksymilian Owsianny
LicenseBSD-style (see LICENSE)
MaintainerMaksymilian.Owsianny@gmail.com
Safe HaskellNone
LanguageHaskell2010

Geometry.Plane.General

Description

General representation of a plane. Plane in the General Form is Hession Normal Form scaled by an arbitrary non-zero scalar.

Synopsis

Documentation

data Plane v n Source #

Internally Plane is represented as a pair (sN, sO) where N is a normal vector of a plane O is the distance of that plane from the origin and s is an arbitrary non-zero scalar.

Constructors

Plane 

Fields

Instances

ToPolytopeRep PolyT3 (FB3 v n) v n Source # 

Methods

toPolytopeRep :: [Facet (FB3 v n) v n] -> PolyT3 v n Source #

(MakePlane v n, Eq (v n), Foldable v, Applicative v, R3 v, Num n, Ord n, EqZero n) => FromPolytopeRep Poly3 (FB3 v n) v n Source # 

Methods

fromPolytopeRep :: Poly3 v n -> [Facet (FB3 v n) v n] Source #

(Eq (v n), Eq n) => Eq (Plane v n) Source # 

Methods

(==) :: Plane v n -> Plane v n -> Bool #

(/=) :: Plane v n -> Plane v n -> Bool #

(Ord (v n), Ord n) => Ord (Plane v n) Source # 

Methods

compare :: Plane v n -> Plane v n -> Ordering #

(<) :: Plane v n -> Plane v n -> Bool #

(<=) :: Plane v n -> Plane v n -> Bool #

(>) :: Plane v n -> Plane v n -> Bool #

(>=) :: Plane v n -> Plane v n -> Bool #

max :: Plane v n -> Plane v n -> Plane v n #

min :: Plane v n -> Plane v n -> Plane v n #

(Show (v n), Show n) => Show (Plane v n) Source # 

Methods

showsPrec :: Int -> Plane v n -> ShowS #

show :: Plane v n -> String #

showList :: [Plane v n] -> ShowS #

(NFData (v n), NFData n) => NFData (Plane v n) Source # 

Methods

rnf :: Plane v n -> () #

(MakeCrossPoint v n, R3 v, Applicative v, Foldable v, Num n, Ord n, EqZero n) => Clip (FB3 v n) v n Source # 

Methods

clipFacet :: Plane v n -> Facet (FB3 v n) v n -> Maybe (Facet (FB3 v n) v n) Source #

splitFacet :: Plane v n -> Facet (FB3 v n) v n -> (Maybe (Facet (FB3 v n) v n), Maybe (Facet (FB3 v n) v n)) Source #

(Ord n, Fractional n, EqZero n) => Universe (FB3 V3 n) V3 n Source # 

Methods

makeFacet :: Plane V3 n -> Facet (FB3 V3 n) V3 n Source #

class MakePlane v n where Source #

Minimal complete definition

makePlane

Methods

makePlane :: v (Point v n) -> Maybe (Plane v n) Source #

Make plane from vector of points. Returns Nothing if vectors between points are linearly dependent

Instances

(Num n, Eq n) => MakePlane V3 n Source # 

Methods

makePlane :: V3 (Point V3 n) -> Maybe (Plane V3 n) Source #

unsafeMakePlane :: MakePlane v n => v (Point v n) -> Plane v n Source #

Assumes that points form a valid plane (i.e. vectors between all points are linearly independent).

flipPlane :: (Functor v, Num n) => Plane v n -> Plane v n Source #

Flip plane orientation.

collinear :: (Foldable v, Num n, EqZero n) => v n -> v n -> Bool Source #

Test whether two vectors are collinear.

planesRelation :: (Foldable v, Num n, Ord n, EqZero n) => Plane v n -> Plane v n -> PlanesRelation Source #

Relate two planes on Parallelism, Incidence and Orientation.

isParallel :: (Foldable v, Num n, Ord n, EqZero n) => Plane v n -> Plane v n -> Bool Source #