h      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ]^_`abcdefg}hLProjective matrices, encoding affine transformations in dimension one less. ijkOrthogonal matrices.  Note: the Random< instances generates orthogonal matrices with determinant 1 ? (that is, orientation-preserving orthogonal transformations)! lmnOThe assumption when dealing with these is always that they are of unit length. ( Also, interpolation works differently. o The components are row vectors " Projective"7 matrices have the following form: the top left corner C is an any matrix, the bottom right corner is 1, and the top-right H column is zero. These describe the affine orthogonal transformation of  the space one dimension less. 0Outer product (could be unified with Diagonal?) !"?the frobenius norm (= euclidean norm in the space of matrices) #,euclidean distance in the space of matrices $0(euclidean) operator norm (not implemented yet) %&'()*+,&makes a diagonal matrix from a vector -.Bconversion between vectors (and matrices) of different dimensions / example: $extendZero (Vec2 5 6) = Vec4 5 6 0 0 0 example: &extendWith 1 (Vec2 5 6) = Vec4 5 6 1 1 1 example: trim (Vec4 5 6 7 8) = Vec2 5 6 234567Pointwise multiplication 89:Cross product ;<=>normalizes the input ?does not normalize the input! @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`athe angle between two vectors b#the angle between two unit vectors cXProjects the first vector down to the hyperplane orthogonal to the second (unit) vector d/Direction (second argument) is assumed to be a unit vector! efASince unit vectors are not a group, we need a separate function. gHouseholder matrix, see  7http://en.wikipedia.org/wiki/Householder_transformation. X In plain words, it is the reflection to the hyperplane orthogonal to the input vector. hijkpqrstuvwxl  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklXYZ[\]UVWT^QRSNOPIJKLMBCDEFGH:;<_`ab=>?@A789./0123456()*+ ,-%&'!"#$  ijkecdfghl    !"#$"#$%&'&'()*+)*+,--./01/0123456345678989:;<;<=>?@A>?@ABCDEFGHCDEFGHIJKLMJKLMNOPOPQRSRSTUVWVWXYZ[\YZ[\]^_`abcdefghijkl Example: structVec2 [1,2,3,4] = [ Vec2 1 2 , Vec2 3 4 ]. mThe opposite of  structVec2. nopqrshunit vector with given angle relative to the positive X axis (in the positive direction, that is, CCW).  A more precise name would be cosSin, but that sounds bad :) tuangle (in radians) radius v*The angle relative to the positive X axis wxARotation matrix by a given angle (in radians), counterclockwise. yz{(Rotates counterclockwise by 90 degrees. |!Rotates clockwise by 90 degrees. lmnopqrstuvwxyz{|lmnopqrstuvwxyz{|lmnopqrstuvwxyz{|} Example: structVec3 [1,2,3,4,5,6] = [ Vec3 1 2 3 , Vec3 4 5 6]. ~The opposite of  structVec3. angle (in radians) axis (should be a unit vector!) vector result angle (in radians)  axis (arbitrary nonzero vector) vector result gRotation around an arbitrary 3D vector. The resulting 3x3 matrix is intended for multiplication on the right.  Rotation around an arbitrary 3D unitH vector. The resulting 3x3 matrix is intended for multiplication on the right. 5Reflects a vector to an axis: that is, the result of  reflect n v is  2<n,v>n - v  Refraction.  First parameter (eta$) is the relative refraction index   refl_inside  eta = --------------  refl_outside where "inside"* is the direction of the second argument 7 (to vector normal to plane which models the boundary @ between the two materials). That is, total internal reflection  can occur when eta>1. ?The convention is that the origin is the point of intersection 1 of the ray and the surface, and all the vectors " point away"  from here (unlike, say, GLSL's refract, where the incident  vector "points towards" the material) 6When total internal reflection would occur, we return Nothing. }~}~}~ produces orthogonal/.orthonormal vectors from a set of vectors  does not normalize the vectors! normalizes the vectors. yz{|}~If  (x,y,u,v)9 is an orthonormal system, then (written in pseudo-code)  7biVector4 (x,y) = plusMinus (reverse $ biVector4 (u,v)). @ This is a helper function for the 4 dimensional rotation code.  If (x,y,z,p,q,r) = biVector4 a b1, then the corresponding antisymmetric tensor is  [ 0 r q p ]  [ -r 0 z -y ]  [ -q -z 0 x ]  [ -p y -x 0 ] 'the corresponding antisymmetric tensor +We assume that the axes are normalized and  orthogonal to each other! 6We assume only that the axes are independent vectors. ?Rotation matrix around a plane specified by two normalized and  orthogonal vectors. $ Intended for multiplication on the right! 6We assume only that the axes are independent vectors.   synonym for rotateAfterProj4  Synonym for m# -> m .*. rotMatrixProj4 angle axis.  Synonym for m# -> rotMatrixProj4 angle axis .*. m. Equivalent to m -> scaling v .*. m. Equivalent to m -> m .*. scaling v.  Synonym for translateAfter4 Equivalent to m -> m .*. translation v. Equivalent to m -> translation v .*. m.   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~}LProjective matrices, encoding affine transformations in dimension one less. Orthogonal matrices.  Note: the Random< instances generates orthogonal matrices with determinant 1 ? (that is, orientation-preserving orthogonal transformations)! OThe assumption when dealing with these is always that they are of unit length. ( Also, interpolation works differently. The components are row vectors " Projective"7 matrices have the following form: the top left corner C is an any matrix, the bottom right corner is 1, and the top-right H column is zero. These describe the affine orthogonal transformation of  the space one dimension less. 0Outer product (could be unified with Diagonal?) ?the frobenius norm (= euclidean norm in the space of matrices) ,euclidean distance in the space of matrices 0(euclidean) operator norm (not implemented yet) &makes a diagonal matrix from a vector Bconversion between vectors (and matrices) of different dimensions  example: $extendZero (Vec2 5 6) = Vec4 5 6 0 0  example: &extendWith 1 (Vec2 5 6) = Vec4 5 6 1 1  example: trim (Vec4 5 6 7 8) = Vec2 5 6 Pointwise multiplication Cross product normalizes the input does not normalize the input!      the angle between two vectors #the angle between two unit vectors XProjects the first vector down to the hyperplane orthogonal to the second (unit) vector /Direction (second argument) is assumed to be a unit vector! ASince unit vectors are not a group, we need a separate function. Householder matrix, see  7http://en.wikipedia.org/wiki/Householder_transformation. X In plain words, it is the reflection to the hyperplane orthogonal to the input vector. l     l     l           Example: structVec2 [1,2,3,4] = [ Vec2 1 2 , Vec2 3 4 ]. !The opposite of  structVec2. "#$%&'hunit vector with given angle relative to the positive X axis (in the positive direction, that is, CCW).  A more precise name would be cosSin, but that sounds bad :) ()angle (in radians) radius **The angle relative to the positive X axis +,ARotation matrix by a given angle (in radians), counterclockwise. -./(Rotates counterclockwise by 90 degrees. 0!Rotates clockwise by 90 degrees.  !"#$%&'()*+,-./0 !"#$%&'()*+,-./0 !"#$%&'()*+,-./0 1 Example: structVec3 [1,2,3,4,5,6] = [ Vec3 1 2 3 , Vec3 4 5 6]. 2The opposite of  structVec3. 3456789:;<=angle (in radians) axis (should be a unit vector!) vector result >angle (in radians)  axis (arbitrary nonzero vector) vector result ?gRotation around an arbitrary 3D vector. The resulting 3x3 matrix is intended for multiplication on the right. @A Rotation around an arbitrary 3D unitH vector. The resulting 3x3 matrix is intended for multiplication on the right. BC5Reflects a vector to an axis: that is, the result of  reflect n v is  2<n,v>n - v DEF Refraction.  First parameter (eta$) is the relative refraction index   refl_inside  eta = --------------  refl_outside where "inside"* is the direction of the second argument 7 (to vector normal to plane which models the boundary @ between the two materials). That is, total internal reflection  can occur when eta>1. ?The convention is that the origin is the point of intersection 1 of the ray and the surface, and all the vectors " point away"  from here (unlike, say, GLSL's refract, where the incident  vector "points towards" the material) G6When total internal reflection would occur, we return Nothing. 123456789:;<=>?@ABCDEFG123456789:;<=>?@ABCDEFG123456789:;<=>?@ABCDEFG HIHIHIHII Jproduces orthogonal/.orthonormal vectors from a set of vectors K does not normalize the vectors! Lnormalizes the vectors. JKLJKLJKLKL MNOPQRSTUVWIf  (x,y,u,v)9 is an orthonormal system, then (written in pseudo-code)  7biVector4 (x,y) = plusMinus (reverse $ biVector4 (u,v)). @ This is a helper function for the 4 dimensional rotation code.  If (x,y,z,p,q,r) = biVector4 a b1, then the corresponding antisymmetric tensor is  [ 0 r q p ]  [ -r 0 z -y ]  [ -q -z 0 x ]  [ -p y -x 0 ] X'the corresponding antisymmetric tensor Y+We assume that the axes are normalized and  orthogonal to each other! Z6We assume only that the axes are independent vectors. [?Rotation matrix around a plane specified by two normalized and  orthogonal vectors. $ Intended for multiplication on the right! \6We assume only that the axes are independent vectors. MNOPQRSTUVWXYZ[\MNOPQRSTUVWXYZ[\MNOPQRSTUVWXYZ[\ ]^_ synonym for rotateAfterProj4 ` Synonym for m# -> m .*. rotMatrixProj4 angle axis. a Synonym for m# -> rotMatrixProj4 angle axis .*. m. bcEquivalent to m -> scaling v .*. m. dEquivalent to m -> m .*. scaling v. e Synonym for translateAfter4 fEquivalent to m -> m .*. translation v. gEquivalent to m -> translation v .*. m. ]^_`abcdefg ]^_`abcdefg ]^_`abcdefg      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHI]^_`abcdefg      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHI]^_`abcdefg  !!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxy z { | } ~     vect-0.4.6Data.Vect.Double.BaseData.Vect.Double.Util.Dim2Data.Vect.Double.Util.Dim3Data.Vect.Double.InterpolateData.Vect.Double.GramSchmidtData.Vect.Double.Util.Dim4 Data.Vect.Double.Util.ProjectiveData.Vect.Float.BaseData.Vect.Float.Util.Dim2Data.Vect.Float.Util.Dim3Data.Vect.Float.InterpolateData.Vect.Float.GramSchmidtData.Vect.Float.Util.Dim4Data.Vect.Float.Util.ProjectiveData.Vect.Double.InstancesData.Vect.DoubleData.Vect.Float.InstancesData.Vect.Float Data.VectProj4Proj3Ortho4Ortho3Ortho2Normal4Normal3Normal2Mat4Mat3Mat2Vec4Vec3Vec2 ProjectivefromProjectivetoProjectiveUnsafe orthogonallinear translationscaling Dimensiondim DeterminantdetTensorouter MatrixNorms frobeniusNormmatrixDistance operatorNorm Orthogonal fromOrtho toOrthoUnsafeMatrix transposeinverseidmtxDiagonaldiagExtend extendZero extendWithtrimHasCoordinates_1_2_3_4 Pointwise pointwise&! CrossProd crossprod&^ UnitVectormkNormaltoNormalUnsafe fromNormalfromNormalRadiusDotProd&.normnormsqrlenlensqrdotprodVectormapVec scalarMul*&&* RightModulermul.* LeftModulelmul*.Ring MultSemiGroup.*.one AbelianGroup&+&-negzerovecSumsemigroupProduct normalizedistanceangleangle'project' projectUnsafeproject flipNormal householderhouseholderOrthomkVec2mkVec3mkVec4 structVec2 destructVec2det2vec2Xvec2Y translate2X translate2YsinCossinCos' sinCosRadiusangle2angle2' rotMatrix2rotMatrixOrtho2rotate2 rotateCCWrotateCW structVec3 destructVec3det3 translate3X translate3Y translate3Zvec3Xvec3Yvec3Z rotMatrixZ rotMatrixY rotMatrixXrotate3'rotate3 rotMatrix3rotMatrixOrtho3 rotMatrix3'rotMatrixOrtho3'reflectreflect'refractrefract' refractOnly' Interpolate interpolate GramSchmidt gramSchmidtgramSchmidtNormalize structVec4 destructVec4 translate4X translate4Y translate4Z translate4Wvec4Xvec4Yvec4Zvec4W biVector4biVector4AsTensorrotate4'rotate4 rotMatrix4' rotMatrix4rotMatrixProj4'rotMatrixProj4 rotateProj4rotateAfterProj4rotateBeforeProj4scalingUniformProj4scaleBeforeProj4scaleAfterProj4 translate4translateAfter4translateBefore4_rndUnit _rndOrtho2 _rndOrtho3 _rndOrtho4 _flip1stRow2 _flip1stRow3 _flip1stRow4 _invertProj3 _invertProj4liftPair liftTriple liftQuadruplegramSchmidtPairgramSchmidtNormalizePairgramSchmidtTriplegramSchmidtNormalizeTriplegramSchmidtQuadruplegramSchmidtNormalizeQuadruple