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

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 FieldsplaneVector :: !(v n) planeLast :: !n

Instances

 ToPolytopeRep PolyT3 (FB3 v n) v n Source # MethodstoPolytopeRep :: [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 # MethodsfromPolytopeRep :: 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 # Methodscompare :: 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 # MethodsshowsPrec :: 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 # Methodsrnf :: 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 # MethodsclipFacet :: 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 # MethodsmakeFacet :: 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 # MethodsmakePlane :: 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.

Constructors

 Parallel Incidence Orientation Crossing

Instances

 Source # MethodsshowList :: [PlanesRelation] -> ShowS #

data Incidence Source #

Constructors

 CoIncident NonIncident

Instances

 Source # MethodsshowList :: [Incidence] -> ShowS #

Constructors

 CoOriented AntiOriented

Instances

 Source # MethodsshowList :: [Orientation] -> ShowS #

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 #