Module

Data.Geometria.Types

Package
purescript-geometria
Repository
Ebmtranceboy/purescript-geometria

#Reveal Source

class Reveal :: Int -> Constraintclass Reveal n  where

Members

Instances

#reveal Source

reveal :: forall @n. Reveal n => Int

#Point Source

newtype Point :: Int -> Typenewtype Point (n :: Int)

Constructors

Instances

#Vector Source

newtype Vector :: Int -> Typenewtype Vector (n :: Int)

Constructors

Instances

#segment Source

segment :: forall n. Point n -> Point n -> Segment n

#halfline Source

halfline :: forall n. Point n -> Vector n -> HalfLine n

#line Source

line :: forall n. Point n -> Point n -> Line n

#circle Source

#Analytic Source

class Analytic a  where

Members

Instances

#immerse Source

immerse :: forall a n n1. Analytic (a n) => Analytic (a n1) => Add n 1 n1 => a n -> a n1

Increments the dimension of a point/vector by adding a zero coordinate after the other coordinates.

#drain Source

drain :: forall a s n n1. ToString n1 s => IsSymbol s => Analytic (a n) => Analytic (a n1) => Add n1 1 n => a n -> a n1

Decrement the dimension of a point/vector by removing its last coordinate.

#projector Source

projector :: forall n s. ToString n s => IsSymbol s => Vector n -> Vector n -> Matrix Number

Matrix used by the project function.

#project Source

project :: forall n s. ToString n s => IsSymbol s => Vector n -> Vector n -> Vector n -> Vector n

project n d u projects a vector u on a plane, passing through the origin and of normal vector n, using a direction parallel to d.

#Shape Source

class Shape :: Int -> (Int -> Type) -> Constraintclass Shape n s  where

Members

Instances

#point Source

point :: forall @n. Shape n Point => Polynomial Number -> Point n

#freeVector Source

freeVector :: forall @n. Shape n Vector => Polynomial Number -> Vector n

#vector Source

vector :: forall n. Point n -> Point n -> Vector n

#translatedBy Source

translatedBy :: forall n. Point n -> Vector n -> Point n

#(<+|) Source

Operator alias for Data.Geometria.Types.translatedBy (left-associative / precedence 6)

#middle Source

middle :: forall n. Segment n -> Point n

#scale Source

scale :: forall n. Number -> Vector n -> Vector n

#EuclideanSpace Source

class EuclideanSpace a  where

Members

  • dot :: a -> a -> Number

    Scalar product

  • normalTo :: Array a -> a

    Builds the n-dimensioned vector needed for the provided array of (n-1) n-dimensioned independant vectors to be a R^n basis.

Instances

#Metric Source

class Metric a  where

Members

Instances

#normalized Source

normalized :: forall n s. ToString n s => IsSymbol s => Vector n -> Vector n

#rotated Source

#projection Source

projection :: forall n s. ToString n s => IsSymbol s => Vector n -> Vector n -> Vector n

projection d v projects a vector v on a vector d.

#cosAngle Source

cosAngle :: forall n s. ToString n s => IsSymbol s => Vector n -> Vector n -> Number

#System Source

type System :: Int -> Typetype System (n :: Int) = Polynomial (Polynomial Number)

#system Source

system :: forall n s. ToString n s => IsSymbol s => Line n -> System n

Builds the (n-1) equations needed to describe a line of n-dimensioned points.

#anyPoint Source

anyPoint :: forall n s. ToString n s => IsSymbol s => System n -> Point n

#anyVector Source

anyVector :: forall @n s. ToString n s => IsSymbol s => System n -> Vector n