MathWorx

Class point3D

Object
   |
   +--Vector
         |
         +--point3D

class point3D
extends Vector


The point3D class defines a point in 3-dimensional Euclidean space via homogeneous coordinates (i.e. as a 4-vector (x,y,z,1)). This allows affine transformations to be applied to 3-D points via matrix multiplication.
Defined in point3D.js

Requires:


Field Summary
 Array components
          The components of the 3D point.
 <final> Integer n
          The "dimension" of the point; ALWAYS 3.
 Number x
          The x-value of the 3D point.
 Number y
          The y-value of the 3D point.
 Number z
          The z-value of the 3D point.
<static>  Object zero
          
   
Fields inherited from class Vector
components, n
 
Constructor Summary
point3D(<Number> x, <Number> y, <Number> z)
            Constructor function.
 
Method Summary
 point3D map(func)
           Maps this point to a new 3D point according to a given function.
 Object rotate(<Number> theta, <Object> axis)
           Rotates a point3D object through an angle theta about an arbitrary axis.
 point3D rotateX(<Number> phi)
           Rotates a 3D point through an angle phi about the x axis and returns a new 3D point.
 point3D rotateY(<Number> theta)
           Rotates a 3D point through an angle theta about the y axis and returns a new 3D point.
 point3D rotateZ(<Number> psi)
           Rotates a 3D point through an angle psi about the y axis and returns a new 3D point.
 point3D toSpherical()
           Converts a point in Cartesian coordinates to spherical coordinates (r, psi, theta).
 String toString()
           Produces a string representation of the point.
 Vector toVector()
           Converts point3D object back to a Vector.
 point3D translate(<Number> dx,<Number> dy,<Number> dz)
           Returns a new 3D point (x',y',z',1) = (x+dx,y+dy,z+dz,1).
 
Methods inherited from class Vector
get, toEach, equalTo, normalize, linearlyIndependent, linearlyDependent, add, subtract, round, multiplyBy, dot, cross, resolute, reflectionIn, negative, toColumnMatrix, toRowMatrix, getLength, angleBetween, isParallel, isAntiParallel, isPerpendicular, distanceFrom, dimension, make3D, snapTo, indexOf, max, elements, addElement, toPoint
 

Field Detail

components

Array components

n

<final> Integer n

x

Number x

y

Number y

z

Number z

zero

<static> Object zero

Constructor Detail

point3D

point3D(<Number> x, <Number> y, <Number> z)

Method Detail

map

point3D map(func)

rotate

Object rotate(<Number> theta, <Object> axis)

rotateX

point3D rotateX(<Number> phi)

rotateY

point3D rotateY(<Number> theta)

rotateZ

point3D rotateZ(<Number> psi)

toSpherical

point3D toSpherical()

toString

String toString()

toVector

Vector toVector()

translate

point3D translate(<Number> dx,<Number> dy,<Number> dz)

MathWorx

Documentation generated by JSDoc on Tue Aug 5 10:22:22 2008