Module

Graphics.Isometric.Point

Package
purescript-isometric
Repository
sharkdp/purescript-isometric

#point Source

point :: Number -> Number -> Number -> Point

Construct a point from x, y, and z coordinates.

#origin Source

origin :: Point

The origin of the 3D coordinate system.

#from2D Source

from2D :: Point -> Point

Construct a 3D point in the xy plane from a 2D point.

#vector Source

vector :: Point -> Point -> Vector

Construct a vector as a difference between two points.

#translate Source

translate :: Point -> Vector -> Point

Translate a given point by a vector.

#dot Source

dot :: Vector -> Vector -> Number

The dot-product of two vectors.

#norm Source

norm :: Vector -> Number

The Euclidean norm of a vector.

#normalize Source

normalize :: Vector -> Vector

Normalize a vector to length 1.

#cross Source

cross :: Vector -> Vector -> Vector

The cross-product of two vectors.

#translateX Source

translateX :: Number -> Point -> Point

Translate a point by a given offset in x-direction.

#translateY Source

translateY :: Number -> Point -> Point

Translate a point by a given offset in y-direction.

#translateZ Source

translateZ :: Number -> Point -> Point

Translate a point by a given offset in z-direction.

#rotateX Source

rotateX :: Angle -> Point -> Point

Rotate a point around the x-axis.

#rotateY Source

rotateY :: Angle -> Point -> Point

Rotate a point around the y-axis.

#rotateZ Source

rotateZ :: Angle -> Point -> Point

Rotate a point around the z-axis.

#scale Source

scale :: Number -> Point -> Point

Scale a point by a multiplicative factor (with respect to the origin).

#depth Source

depth :: Point -> Number

Calculate the 'depth' of a point, measured from the point of the observer.