diff --git a/docs/API.md b/docs/API.md index 2c169beb..1a49c3c8 100644 --- a/docs/API.md +++ b/docs/API.md @@ -7,7 +7,7 @@ See also [Usage](https://axelpale.github.io/affineplane/) and [GitHub](https://g -## affineplane +## [affineplane](#affineplane) The [affineplane](#affineplane) module provides functions for affine 2D geometry. The functions are grouped in the following submodules. @@ -36,7 +36,7 @@ The functions are grouped in the following submodules. Source: [lib/index.js](https://github.com/axelpale/affineplane/blob/main/lib/index.js) -## affineplane.dir2 +## [affineplane](#affineplane).[dir2](#affineplanedir2) Number in ]-π, π] @@ -50,14 +50,14 @@ the coordinate space affects the direction. ![Direction angle](geometry_direction.png) - [affineplane.dir2.create](#affineplanedir2create) -- [affineplane.dir2.transitFrom](#affineplanedir2transitFrom) -- [affineplane.dir2.transitTo](#affineplanedir2transitTo) +- [affineplane.dir2.transitFrom](#affineplanedir2transitfrom) +- [affineplane.dir2.transitTo](#affineplanedir2transitto) Source: [dir2/index.js](https://github.com/axelpale/affineplane/blob/main/lib/dir2/index.js) -## affineplane.dir2.create(r) +## [affineplane](#affineplane).[dir2](#affineplanedir2).[create](#affineplanedir2create)(r) Create a new direction. Angles outside ]-π,π] are mapped within the limits with modulus operators. @@ -71,8 +71,8 @@ within the limits with modulus operators. Source: [create.js](https://github.com/axelpale/affineplane/blob/main/lib/dir2/create.js) - -## affineplane.dir2.transitFrom(dir, source) + +## [affineplane](#affineplane).[dir2](#affineplanedir2).[transitFrom](#affineplanedir2transitfrom)(dir, source) Transit a direction angle from the source plane to the reference plane. @@ -88,8 +88,8 @@ to the reference plane. Source: [transitFrom.js](https://github.com/axelpale/affineplane/blob/main/lib/dir2/transitFrom.js) - -## affineplane.dir2.transitTo(dir, target) + +## [affineplane](#affineplane).[dir2](#affineplanedir2).[transitTo](#affineplanedir2transitto)(dir, target) Transit a dir2 to a target plane. In other words, represent the direction @@ -107,7 +107,7 @@ in the coordinate system of the target plane. Source: [transitTo.js](https://github.com/axelpale/affineplane/blob/main/lib/dir2/transitTo.js) -## affineplane.dist2 +## [affineplane](#affineplane).[dist2](#affineplanedist2) The distance measure is a directionless, always positive number. If transited between planes, only a change in the coordinate scale @@ -117,14 +117,14 @@ change the distance measure. ![Distance transited between planes](projection_distance_2d.png) - [affineplane.dist2.create](#affineplanedist2create) -- [affineplane.dist2.transitFrom](#affineplanedist2transitFrom) -- [affineplane.dist2.transitTo](#affineplanedist2transitTo) +- [affineplane.dist2.transitFrom](#affineplanedist2transitfrom) +- [affineplane.dist2.transitTo](#affineplanedist2transitto) Source: [dist2/index.js](https://github.com/axelpale/affineplane/blob/main/lib/dist2/index.js) -## affineplane.dist2.create(d) +## [affineplane](#affineplane).[dist2](#affineplanedist2).[create](#affineplanedist2create)(d) Create a measure. Basically it is just the absolute value of the number. @@ -137,8 +137,8 @@ Create a measure. Basically it is just the absolute value of the number. Source: [create.js](https://github.com/axelpale/affineplane/blob/main/lib/dist2/create.js) - -## affineplane.dist2.transitFrom(dist, source) + +## [affineplane](#affineplane).[dist2](#affineplanedist2).[transitFrom](#affineplanedist2transitfrom)(dist, source) Transit a distance from the source plane to the reference plane. @@ -154,8 +154,8 @@ to the reference plane. Source: [transitFrom.js](https://github.com/axelpale/affineplane/blob/main/lib/dist2/transitFrom.js) - -## affineplane.dist2.transitTo(dist, target) + +## [affineplane](#affineplane).[dist2](#affineplanedist2).[transitTo](#affineplanedist2transitto)(dist, target) Transit a dist2 to a target plane. In other words, represent the distance @@ -173,7 +173,7 @@ in the coordinate system of the plane. Source: [transitTo.js](https://github.com/axelpale/affineplane/blob/main/lib/dist2/transitTo.js) -## affineplane.epsilon +## [affineplane](#affineplane).[epsilon](#affineplaneepsilon) Default margin for non-strict numeric equality. For example `0.0000000001`. @@ -181,7 +181,7 @@ For example `0.0000000001`. Source: [epsilon.js](https://github.com/axelpale/affineplane/blob/main/lib/epsilon.js) -## affineplane.helm2 +## [affineplane](#affineplane).[helm2](#affineplanehelm2) Provides functions for a special kind of 2D transformation matrices, *two-dimensional Helmert transformations*. @@ -196,10 +196,10 @@ Therefore it has no single position in space, and is not affected by plane translations. See [affineplane.plane2](#affineplaneplane2) for a positional variant. -- [affineplane.helm2.addDilation](#affineplanehelm2addDilation) -- [affineplane.helm2.addRotation](#affineplanehelm2addRotation) -- [affineplane.helm2.almostEqual](#affineplanehelm2almostEqual) -- [affineplane.helm2.almostEquals](#affineplanehelm2almostEquals) +- [affineplane.helm2.addDilation](#affineplanehelm2adddilation) +- [affineplane.helm2.addRotation](#affineplanehelm2addrotation) +- [affineplane.helm2.almostEqual](#affineplanehelm2almostequal) +- [affineplane.helm2.almostEquals](#affineplanehelm2almostequals) - [affineplane.helm2.clone](#affineplanehelm2clone) - [affineplane.helm2.combine](#affineplanehelm2combine) - [affineplane.helm2.compose](#affineplanehelm2compose) @@ -209,49 +209,49 @@ See [affineplane.plane2](#affineplaneplane2) for a positional variant. - [affineplane.helm2.determinant](#affineplanehelm2determinant) - [affineplane.helm2.equal](#affineplanehelm2equal) - [affineplane.helm2.equals](#affineplanehelm2equals) -- [affineplane.helm2.fromArray](#affineplanehelm2fromArray) -- [affineplane.helm2.fromFeatures](#affineplanehelm2fromFeatures) -- [affineplane.helm2.fromPolar](#affineplanehelm2fromPolar) -- [affineplane.helm2.getDilation](#affineplanehelm2getDilation) -- [affineplane.helm2.getRotation](#affineplanehelm2getRotation) -- [affineplane.helm2.getScale](#affineplanehelm2getScale) -- [affineplane.helm2.getTranslation](#affineplanehelm2getTranslation) -- [affineplane.helm2.HALF](#affineplanehelm2HALF) -- [affineplane.helm2.I](#affineplanehelm2I) -- [affineplane.helm2.IDENTITY](#affineplanehelm2IDENTITY) +- [affineplane.helm2.fromArray](#affineplanehelm2fromarray) +- [affineplane.helm2.fromFeatures](#affineplanehelm2fromfeatures) +- [affineplane.helm2.fromPolar](#affineplanehelm2frompolar) +- [affineplane.helm2.getDilation](#affineplanehelm2getdilation) +- [affineplane.helm2.getRotation](#affineplanehelm2getrotation) +- [affineplane.helm2.getScale](#affineplanehelm2getscale) +- [affineplane.helm2.getTranslation](#affineplanehelm2gettranslation) +- [affineplane.helm2.HALF](#affineplanehelm2half) +- [affineplane.helm2.I](#affineplanehelm2i) +- [affineplane.helm2.IDENTITY](#affineplanehelm2identity) - [affineplane.helm2.inverse](#affineplanehelm2inverse) - [affineplane.helm2.invert](#affineplanehelm2invert) - [affineplane.helm2.multiply](#affineplanehelm2multiply) -- [affineplane.helm2.projectTo](#affineplanehelm2projectTo) -- [affineplane.helm2.ROT0](#affineplanehelm2ROT0) -- [affineplane.helm2.ROT180](#affineplanehelm2ROT180) -- [affineplane.helm2.ROT270](#affineplanehelm2ROT270) -- [affineplane.helm2.ROT45](#affineplanehelm2ROT45) -- [affineplane.helm2.ROT90](#affineplanehelm2ROT90) -- [affineplane.helm2.rotateBy](#affineplanehelm2rotateBy) -- [affineplane.helm2.scaleBy](#affineplanehelm2scaleBy) -- [affineplane.helm2.setDilation](#affineplanehelm2setDilation) -- [affineplane.helm2.setRotation](#affineplanehelm2setRotation) -- [affineplane.helm2.setTranslation](#affineplanehelm2setTranslation) -- [affineplane.helm2.setTranslation](#affineplanehelm2setTranslation) -- [affineplane.helm2.SINGULAR](#affineplanehelm2SINGULAR) -- [affineplane.helm2.snapRotation](#affineplanehelm2snapRotation) -- [affineplane.helm2.solveLeft](#affineplanehelm2solveLeft) -- [affineplane.helm2.solveRight](#affineplanehelm2solveRight) -- [affineplane.helm2.toArray](#affineplanehelm2toArray) -- [affineplane.helm2.toMatrix](#affineplanehelm2toMatrix) -- [affineplane.helm2.toString](#affineplanehelm2toString) +- [affineplane.helm2.projectTo](#affineplanehelm2projectto) +- [affineplane.helm2.ROT0](#affineplanehelm2rot0) +- [affineplane.helm2.ROT180](#affineplanehelm2rot180) +- [affineplane.helm2.ROT270](#affineplanehelm2rot270) +- [affineplane.helm2.ROT45](#affineplanehelm2rot45) +- [affineplane.helm2.ROT90](#affineplanehelm2rot90) +- [affineplane.helm2.rotateBy](#affineplanehelm2rotateby) +- [affineplane.helm2.scaleBy](#affineplanehelm2scaleby) +- [affineplane.helm2.setDilation](#affineplanehelm2setdilation) +- [affineplane.helm2.setRotation](#affineplanehelm2setrotation) +- [affineplane.helm2.setTranslation](#affineplanehelm2settranslation) +- [affineplane.helm2.setTranslation](#affineplanehelm2settranslation) +- [affineplane.helm2.SINGULAR](#affineplanehelm2singular) +- [affineplane.helm2.snapRotation](#affineplanehelm2snaprotation) +- [affineplane.helm2.solveLeft](#affineplanehelm2solveleft) +- [affineplane.helm2.solveRight](#affineplanehelm2solveright) +- [affineplane.helm2.toArray](#affineplanehelm2toarray) +- [affineplane.helm2.toMatrix](#affineplanehelm2tomatrix) +- [affineplane.helm2.toString](#affineplanehelm2tostring) - [affineplane.helm2.transform](#affineplanehelm2transform) -- [affineplane.helm2.transitFrom](#affineplanehelm2transitFrom) -- [affineplane.helm2.UNIT](#affineplanehelm2UNIT) +- [affineplane.helm2.transitFrom](#affineplanehelm2transitfrom) +- [affineplane.helm2.UNIT](#affineplanehelm2unit) - [affineplane.helm2.validate](#affineplanehelm2validate) -- [affineplane.helm2.X2](#affineplanehelm2X2) +- [affineplane.helm2.X2](#affineplanehelm2x2) Source: [helm2/index.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/index.js) - -## affineplane.helm2.addDilation(tr, delta) + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[addDilation](#affineplanehelm2adddilation)(tr, delta) Increase the scale multiplier of the transformation by addition. The rotation and translation properties are preserved. @@ -267,8 +267,8 @@ The rotation and translation properties are preserved. Source: [addDilation.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/addDilation.js) - -## affineplane.helm2.addRotation(tr, angle) + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[addRotation](#affineplanehelm2addrotation)(tr, angle) Increase rotation angle of the transformation by angle. The dilation and translation properties are preserved. @@ -284,8 +284,8 @@ The dilation and translation properties are preserved. Source: [addRotation.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/addRotation.js) - -## affineplane.helm2.almostEqual(tr, ts[, epsilon]) + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[almostEqual](#affineplanehelm2almostequal)(tr, ts[, epsilon]) Are two transforms almost equal? Return true if a matrix norm of the difference is smaller than epsilon. We use modified @@ -303,33 +303,33 @@ Manhattan Distance to compute the difference. **Returns:** - a boolean -Aliases: [affineplane.helm2.almostEquals](#affineplanehelm2almostEquals) +Aliases: [affineplane.helm2.almostEquals](#affineplanehelm2almostequals) Source: [almostEqual.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/almostEqual.js) - -## affineplane.helm2.almostEquals + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[almostEquals](#affineplanehelm2almostequals) -Alias of [affineplane.helm2.almostEqual](#affineplanehelm2almostEqual) +Alias of [affineplane.helm2.almostEqual](#affineplanehelm2almostequal) Source: [almostEqual.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/almostEqual.js) -## affineplane.helm2.clone +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[clone](#affineplanehelm2clone) Alias of [affineplane.helm2.copy](#affineplanehelm2copy) Source: [copy.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/copy.js) -## affineplane.helm2.combine +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[combine](#affineplanehelm2combine) Alias of [affineplane.helm2.compose](#affineplanehelm2compose), [affineplane.helm2.multiply](#affineplanehelm2multiply) Source: [compose.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/compose.js) -## affineplane.helm2.compose(tr, ts) +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[compose](#affineplanehelm2compose)(tr, ts) Multiply transformation matrix tr from the right with the given transformation matrix ts. @@ -349,7 +349,7 @@ Aliases: [affineplane.helm2.combine](#affineplanehelm2combine), [affineplane.hel Source: [compose.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/compose.js) -## affineplane.helm2.copy(tr) +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[copy](#affineplanehelm2copy)(tr) **Parameters:** - *tr* @@ -363,7 +363,7 @@ Aliases: [affineplane.helm2.clone](#affineplanehelm2clone) Source: [copy.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/copy.js) -## affineplane.helm2.create(a, b, x, y) +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[create](#affineplanehelm2create)(a, b, x, y) Create a 2D non-reflective similarity transform object. @@ -383,7 +383,7 @@ Create a 2D non-reflective similarity transform object. Source: [create.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/create.js) -## affineplane.helm2.det(tr) +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[det](#affineplanehelm2det)(tr) The matrix determinant of the transformation. If the determinant equals zero then the matrix cannot be inverted and thus is not a valid @@ -402,19 +402,19 @@ Aliases: [affineplane.helm2.determinant](#affineplanehelm2determinant) Source: [det.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/det.js) -## affineplane.helm2.determinant(tr) +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[determinant](#affineplanehelm2determinant)(tr) Alias of [affineplane.helm2.det](#affineplanehelm2det) Source: [det.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/det.js) -## affineplane.helm2.equal(tr, ts) +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[equal](#affineplanehelm2equal)(tr, ts) Are transforms exactly equal? Note that due to floating-point arithmetics, computation might cause exact equality to be broken. -See [affineplane.helm2.almostEqual](#affineplanehelm2almostEqual) for relaxed alternative. +See [affineplane.helm2.almostEqual](#affineplanehelm2almostequal) for relaxed alternative. **Parameters:** - *tr* @@ -430,14 +430,14 @@ Aliases: [affineplane.helm2.equals](#affineplanehelm2equals) Source: [equal.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/equal.js) -## affineplane.helm2.equals +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[equals](#affineplanehelm2equals) Alias of [affineplane.helm2.equal](#affineplanehelm2equal) Source: [equal.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/equal.js) - -## affineplane.helm2.fromArray(abxy) + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[fromArray](#affineplanehelm2fromarray)(abxy) Create an affine similarity transform from 4-element array. @@ -450,8 +450,8 @@ Create an affine similarity transform from 4-element array. Source: [fromArray.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/fromArray.js) - -## affineplane.helm2.fromFeatures(feats) + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[fromFeatures](#affineplanehelm2fromfeatures)(feats) Create a [helm2](#affineplanehelm2) transformation from human-readable features. @@ -470,8 +470,8 @@ Create a [helm2](#affineplanehelm2) transformation from human-readable features. Source: [fromFeatures.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/fromFeatures.js) - -## affineplane.helm2.fromPolar(scale, rotation[, tx[, ty]]) + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[fromPolar](#affineplanehelm2frompolar)(scale, rotation[, tx[, ty]]) Create a transform object by using scale magnitude, rotation angle, and translation. @@ -494,8 +494,8 @@ Precondition: Source: [fromPolar.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/fromPolar.js) - -## affineplane.helm2.getDilation(tr) + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[getDilation](#affineplanehelm2getdilation)(tr) Get the dilation component of the transformation. @@ -506,12 +506,12 @@ Get the dilation component of the transformation. **Returns:** - a number, the scale multiplier. -Aliases: [affineplane.helm2.getScale](#affineplanehelm2getScale) +Aliases: [affineplane.helm2.getScale](#affineplanehelm2getscale) Source: [getDilation.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/getDilation.js) - -## affineplane.helm2.getRotation(tr) + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[getRotation](#affineplanehelm2getrotation)(tr) Get the rotation component of the transform in radians. @@ -524,15 +524,15 @@ Get the rotation component of the transform in radians. Source: [getRotation.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/getRotation.js) - -## affineplane.helm2.getScale + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[getScale](#affineplanehelm2getscale) -Alias of [affineplane.helm2.getDilation](#affineplanehelm2getDilation) +Alias of [affineplane.helm2.getDilation](#affineplanehelm2getdilation) Source: [getDilation.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/getDilation.js) - -## affineplane.helm2.getTranslation(tr) + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[getTranslation](#affineplanehelm2gettranslation)(tr) Get translation component of the transformation as a vector. @@ -545,31 +545,31 @@ Get translation component of the transformation as a vector. Source: [getTranslation.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/getTranslation.js) - -## affineplane.helm2.HALF + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[HALF](#affineplanehelm2half) Scaling to half size. Source: [helm2/index.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/index.js) - -## affineplane.helm2.I + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[I](#affineplanehelm2i) Identity transform, a kind of multiplication by 1. -Aliases: [affineplane.helm2.IDENTITY](#affineplanehelm2IDENTITY) +Aliases: [affineplane.helm2.IDENTITY](#affineplanehelm2identity) Source: [helm2/index.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/index.js) - -## affineplane.helm2.IDENTITY + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[IDENTITY](#affineplanehelm2identity) -Alias of [affineplane.helm2.I](#affineplanehelm2I) +Alias of [affineplane.helm2.I](#affineplanehelm2i) Source: [helm2/index.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/index.js) -## affineplane.helm2.inverse(tr) +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[inverse](#affineplanehelm2inverse)(tr) Invert the transform. A transform from B to C becomes a transform from C to B. @@ -586,24 +586,26 @@ Aliases: [affineplane.helm2.invert](#affineplanehelm2invert) Source: [inverse.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/inverse.js) -## affineplane.helm2.invert(tr) +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[invert](#affineplanehelm2invert)(tr) Alias of [affineplane.helm2.inverse](#affineplanehelm2inverse) Source: [inverse.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/inverse.js) -## affineplane.helm2.multiply +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[multiply](#affineplanehelm2multiply) Alias of [affineplane.helm2.compose](#affineplanehelm2compose), [affineplane.helm2.combine](#affineplanehelm2combine) Source: [compose.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/compose.js) - -## affineplane.helm2.projectTo(tr, plane[, camera]) + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[projectTo](#affineplanehelm2projectto)(tr, plane[, camera]) Project transformation onto a plane. -If camera is given perspectively. +If camera is given, project perspectively. +Projection does not affect the dilation or rotation property of the tr. +Projection only affects the scale of the translation. **Parameters:** - *tr* @@ -618,43 +620,43 @@ If camera is given perspectively. Source: [projectTo.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/projectTo.js) - -## affineplane.helm2.ROT0 + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[ROT0](#affineplanehelm2rot0) Zero angle rotation. Source: [helm2/index.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/index.js) - -## affineplane.helm2.ROT180 + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[ROT180](#affineplanehelm2rot180) Rotation of 180 degrees. Source: [helm2/index.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/index.js) - -## affineplane.helm2.ROT270 + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[ROT270](#affineplanehelm2rot270) Clockwise rotation of 270 degrees. Source: [helm2/index.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/index.js) - -## affineplane.helm2.ROT45 + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[ROT45](#affineplanehelm2rot45) Clockwise rotation of 45 degrees. Source: [helm2/index.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/index.js) - -## affineplane.helm2.ROT90 + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[ROT90](#affineplanehelm2rot90) Clockwise rotation of 90 degrees. Source: [helm2/index.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/index.js) - -## affineplane.helm2.rotateBy(tr, radians) + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[rotateBy](#affineplanehelm2rotateby)(tr, radians) Rotate image of the transform by the given radians. This changes the direction of the translation but @@ -671,8 +673,8 @@ preserves the scaling and rotating effects. Source: [rotateBy.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/rotateBy.js) - -## affineplane.helm2.scaleBy(tr, multiplier) + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[scaleBy](#affineplanehelm2scaleby)(tr, multiplier) Scale image of the transform by the given multiplier. Dilation and translation are multiplied, @@ -689,8 +691,8 @@ rotation and translation direction are preserved. Source: [scaleBy.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/scaleBy.js) - -## affineplane.helm2.setDilation(tr, dilation) + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[setDilation](#affineplanehelm2setdilation)(tr, dilation) Replace scaling of the transformation. The rotation and translation properties are preserved. @@ -706,8 +708,8 @@ The rotation and translation properties are preserved. Source: [setDilation.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/setDilation.js) - -## affineplane.helm2.setRotation(tr, angle) + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[setRotation](#affineplanehelm2setrotation)(tr, angle) Replace rotation angle of the transformation. The dilation and translation properties are preserved. @@ -723,8 +725,8 @@ The dilation and translation properties are preserved. Source: [setRotation.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/setRotation.js) - -## affineplane.helm2.setTranslation(tr, vec) + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[setTranslation](#affineplanehelm2settranslation)(tr, vec) Increase translation property of the transformation by a vector. The dilation and rotation properties are preserved. @@ -740,8 +742,8 @@ The dilation and rotation properties are preserved. Source: [addTranslation.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/addTranslation.js) - -## affineplane.helm2.setTranslation(tr, vec) + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[setTranslation](#affineplanehelm2settranslation)(tr, vec) Replace translation property of the transformation. The dilation and rotation properties are preserved. @@ -757,8 +759,8 @@ The dilation and rotation properties are preserved. Source: [setTranslation.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/setTranslation.js) - -## affineplane.helm2.SINGULAR + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[SINGULAR](#affineplanehelm2singular) Singular transform, resembles multiplication by 0. Note that singular transformations are note valid affine transformations @@ -768,8 +770,8 @@ you cannot multiply 0 to produce the original 2. Source: [helm2/index.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/index.js) - -## affineplane.helm2.snapRotation(tr) + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[snapRotation](#affineplanehelm2snaprotation)(tr) Round the rotation property of the transformation to nearest orthogonal angle 0, 90, 180, and 270 deg. @@ -787,8 +789,8 @@ floating-point arithmetics. Source: [snapRotation.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/snapRotation.js) - -## affineplane.helm2.solveLeft(tb, tc) + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[solveLeft](#affineplanehelm2solveleft)(tb, tc) Given transforms B, C, find transform A, where AB = C. Given that B is invertible, then A = C * iB. @@ -804,8 +806,8 @@ Given that B is invertible, then A = C * iB. Source: [solveLeft.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/solveLeft.js) - -## affineplane.helm2.solveRight(ta, tc) + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[solveRight](#affineplanehelm2solveright)(ta, tc) Given the transforms A and C, find the transform B, where A * B = C. Given that A is invertible, then B = iA * C. @@ -821,11 +823,11 @@ Given that A is invertible, then B = iA * C. Source: [solveRight.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/solveRight.js) - -## affineplane.helm2.toArray(tr) + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[toArray](#affineplanehelm2toarray)(tr) **Returns:** an array representation of the transformation. -Compatible with [affineplane.helm2.fromArray](#affineplanehelm2fromArray). +Compatible with [affineplane.helm2.fromArray](#affineplanehelm2fromarray). **Parameters:** - *tr* @@ -836,8 +838,8 @@ Compatible with [affineplane.helm2.fromArray](#affineplanehelm2fromArray). Source: [toArray.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/toArray.js) - -## affineplane.helm2.toMatrix(tr) + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[toMatrix](#affineplanehelm2tomatrix)(tr) Get the similarity transformation matrix in the format common to other APIs, including: @@ -854,8 +856,8 @@ in the format common to other APIs, including: Source: [toMatrix.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/toMatrix.js) - -## affineplane.helm2.toString(tr) + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[toString](#affineplanehelm2tostring)(tr) Convert the transformation to a string compatible with the CSS transform-function data type, for example `matrix(1, 2, -2, 1, 3, 4)`. @@ -872,7 +874,7 @@ Together with [affineplane.helm2](#affineplanehelm2).fromString(...), this metho Source: [toString.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/toString.js) -## affineplane.helm2.transform(tr, ts) +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[transform](#affineplanehelm2transform)(tr, ts) Multiply transformation matrix tr from the left with the given transformation matrix ts. @@ -891,8 +893,8 @@ For multiplication from right, see [affineplane.helm2.compose](#affineplanehelm2 Source: [transform.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/transform.js) - -## affineplane.helm2.transitFrom(tr, plane) + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[transitFrom](#affineplanehelm2transitfrom)(tr, plane) Transit a [helm2](#affineplanehelm2) from the source plane to the reference plane. Note that: @@ -911,8 +913,8 @@ to the reference plane. Note that: Source: [transitFrom.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/transitFrom.js) - -## affineplane.helm2.UNIT + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[UNIT](#affineplanehelm2unit) A unit transform. Scales by sqrt(2), rotates by 45deg, and translates by vector (1,1) @@ -920,7 +922,7 @@ and translates by vector (1,1) Source: [helm2/index.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/index.js) -## affineplane.helm2.validate(tr) +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[validate](#affineplanehelm2validate)(tr) Check if object is a valid [helm2](#affineplanehelm2). @@ -933,15 +935,15 @@ Check if object is a valid [helm2](#affineplanehelm2). Source: [validate.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/validate.js) - -## affineplane.helm2.X2 + +## [affineplane](#affineplane).[helm2](#affineplanehelm2).[X2](#affineplanehelm2x2) Scaling to double size. Source: [helm2/index.js](https://github.com/axelpale/affineplane/blob/main/lib/helm2/index.js) -## affineplane.helm3 +## [affineplane](#affineplane).[helm3](#affineplanehelm3) Functions for a special 3D affine transformation that consists of a translation in 3D, rotation around z-axis, and uniform scaling, @@ -956,11 +958,11 @@ Therefore it has no single position in space, and is not affected by plane translations. See [affineplane.plane3](#affineplaneplane3) for a positional variant. -- [affineplane.helm3.addDilation](#affineplanehelm3addDilation) -- [affineplane.helm3.addRotation](#affineplanehelm3addRotation) -- [affineplane.helm3.addTranslation](#affineplanehelm3addTranslation) -- [affineplane.helm3.almostEqual](#affineplanehelm3almostEqual) -- [affineplane.helm3.almostEquals](#affineplanehelm3almostEquals) +- [affineplane.helm3.addDilation](#affineplanehelm3adddilation) +- [affineplane.helm3.addRotation](#affineplanehelm3addrotation) +- [affineplane.helm3.addTranslation](#affineplanehelm3addtranslation) +- [affineplane.helm3.almostEqual](#affineplanehelm3almostequal) +- [affineplane.helm3.almostEquals](#affineplanehelm3almostequals) - [affineplane.helm3.clone](#affineplanehelm3clone) - [affineplane.helm3.combine](#affineplanehelm3combine) - [affineplane.helm3.compose](#affineplanehelm3compose) @@ -970,42 +972,42 @@ See [affineplane.plane3](#affineplaneplane3) for a positional variant. - [affineplane.helm3.determinant](#affineplanehelm3determinant) - [affineplane.helm3.equal](#affineplanehelm3equal) - [affineplane.helm3.equals](#affineplanehelm3equals) -- [affineplane.helm3.fromArray](#affineplanehelm3fromArray) -- [affineplane.helm3.fromFeatures](#affineplanehelm3fromFeatures) -- [affineplane.helm3.getDilation](#affineplanehelm3getDilation) -- [affineplane.helm3.getRotation](#affineplanehelm3getRotation) -- [affineplane.helm3.getScale](#affineplanehelm3getScale) -- [affineplane.helm3.getTranslation](#affineplanehelm3getTranslation) -- [affineplane.helm3.HALF](#affineplanehelm3HALF) -- [affineplane.helm3.I](#affineplanehelm3I) -- [affineplane.helm3.IDENTITY](#affineplanehelm3IDENTITY) +- [affineplane.helm3.fromArray](#affineplanehelm3fromarray) +- [affineplane.helm3.fromFeatures](#affineplanehelm3fromfeatures) +- [affineplane.helm3.getDilation](#affineplanehelm3getdilation) +- [affineplane.helm3.getRotation](#affineplanehelm3getrotation) +- [affineplane.helm3.getScale](#affineplanehelm3getscale) +- [affineplane.helm3.getTranslation](#affineplanehelm3gettranslation) +- [affineplane.helm3.HALF](#affineplanehelm3half) +- [affineplane.helm3.I](#affineplanehelm3i) +- [affineplane.helm3.IDENTITY](#affineplanehelm3identity) - [affineplane.helm3.inverse](#affineplanehelm3inverse) - [affineplane.helm3.invert](#affineplanehelm3invert) -- [affineplane.helm3.projectTo](#affineplanehelm3projectTo) -- [affineplane.helm3.ROT0](#affineplanehelm3ROT0) -- [affineplane.helm3.ROT180](#affineplanehelm3ROT180) -- [affineplane.helm3.ROT270](#affineplanehelm3ROT270) -- [affineplane.helm3.ROT45](#affineplanehelm3ROT45) -- [affineplane.helm3.ROT90](#affineplanehelm3ROT90) -- [affineplane.helm3.rotateBy](#affineplanehelm3rotateBy) -- [affineplane.helm3.scaleBy](#affineplanehelm3scaleBy) -- [affineplane.helm3.setDilation](#affineplanehelm3setDilation) -- [affineplane.helm3.setRotation](#affineplanehelm3setRotation) -- [affineplane.helm3.setTranslation](#affineplanehelm3setTranslation) -- [affineplane.helm3.SINGULAR](#affineplanehelm3SINGULAR) -- [affineplane.helm3.toArray](#affineplanehelm3toArray) -- [affineplane.helm3.toMatrix](#affineplanehelm3toMatrix) -- [affineplane.helm3.transitFrom](#affineplanehelm3transitFrom) -- [affineplane.helm3.UNIT](#affineplanehelm3UNIT) +- [affineplane.helm3.projectTo](#affineplanehelm3projectto) +- [affineplane.helm3.ROT0](#affineplanehelm3rot0) +- [affineplane.helm3.ROT180](#affineplanehelm3rot180) +- [affineplane.helm3.ROT270](#affineplanehelm3rot270) +- [affineplane.helm3.ROT45](#affineplanehelm3rot45) +- [affineplane.helm3.ROT90](#affineplanehelm3rot90) +- [affineplane.helm3.rotateBy](#affineplanehelm3rotateby) +- [affineplane.helm3.scaleBy](#affineplanehelm3scaleby) +- [affineplane.helm3.setDilation](#affineplanehelm3setdilation) +- [affineplane.helm3.setRotation](#affineplanehelm3setrotation) +- [affineplane.helm3.setTranslation](#affineplanehelm3settranslation) +- [affineplane.helm3.SINGULAR](#affineplanehelm3singular) +- [affineplane.helm3.toArray](#affineplanehelm3toarray) +- [affineplane.helm3.toMatrix](#affineplanehelm3tomatrix) +- [affineplane.helm3.transitFrom](#affineplanehelm3transitfrom) +- [affineplane.helm3.UNIT](#affineplanehelm3unit) - [affineplane.helm3.validate](#affineplanehelm3validate) -- [affineplane.helm3.X2](#affineplanehelm3X2) -- [affineplane.helm3.ZERO](#affineplanehelm3ZERO) +- [affineplane.helm3.X2](#affineplanehelm3x2) +- [affineplane.helm3.ZERO](#affineplanehelm3zero) Source: [helm3/index.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/index.js) - -## affineplane.helm3.addDilation(tr, delta) + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[addDilation](#affineplanehelm3adddilation)(tr, delta) Increase the scale multiplier of the transformation by addition. The rotation and translation properties are preserved. @@ -1021,8 +1023,8 @@ The rotation and translation properties are preserved. Source: [addDilation.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/addDilation.js) - -## affineplane.helm3.addRotation(tr, angle) + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[addRotation](#affineplanehelm3addrotation)(tr, angle) Increase rotation angle of the transformation by an angle. The dilation and translation properties are preserved. @@ -1038,8 +1040,8 @@ The dilation and translation properties are preserved. Source: [addRotation.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/addRotation.js) - -## affineplane.helm3.addTranslation(tr, vec) + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[addTranslation](#affineplanehelm3addtranslation)(tr, vec) Modify transformation so that its image is translated by the given vector. @@ -1057,8 +1059,8 @@ further by the given vector. Source: [addTranslation.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/addTranslation.js) - -## affineplane.helm3.almostEqual(tr, ts[, epsilon]) + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[almostEqual](#affineplanehelm3almostequal)(tr, ts[, epsilon]) Are two transforms almost equal? Return true if a matrix norm of the difference is smaller than epsilon. We use modified @@ -1076,33 +1078,33 @@ Manhattan Distance to compute the difference. **Returns:** - a boolean, true if equal -Aliases: [affineplane.helm3.almostEquals](#affineplanehelm3almostEquals) +Aliases: [affineplane.helm3.almostEquals](#affineplanehelm3almostequals) Source: [almostEqual.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/almostEqual.js) - -## affineplane.helm3.almostEquals + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[almostEquals](#affineplanehelm3almostequals) -Alias of [affineplane.helm3.almostEqual](#affineplanehelm3almostEqual) +Alias of [affineplane.helm3.almostEqual](#affineplanehelm3almostequal) Source: [almostEqual.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/almostEqual.js) -## affineplane.helm3.clone +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[clone](#affineplanehelm3clone) Alias of [affineplane.helm3.copy](#affineplanehelm3copy) Source: [copy.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/copy.js) -## affineplane.helm3.combine +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[combine](#affineplanehelm3combine) Alias of [affineplane.helm3.compose](#affineplanehelm3compose) Source: [compose.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/compose.js) -## affineplane.helm3.compose(tr, ts) +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[compose](#affineplanehelm3compose)(tr, ts) Multiply the [helm3](#affineplanehelm3) matrix tr from the right with the [helm3](#affineplanehelm3) matrix ts. @@ -1122,7 +1124,7 @@ Aliases: [affineplane.helm3.combine](#affineplanehelm3combine) Source: [compose.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/compose.js) -## affineplane.helm3.copy(tr) +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[copy](#affineplanehelm3copy)(tr) **Parameters:** - *tr* @@ -1136,7 +1138,7 @@ Aliases: [affineplane.helm3.clone](#affineplanehelm3clone) Source: [copy.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/copy.js) -## affineplane.helm3.create(a, b, x, y, z) +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[create](#affineplanehelm3create)(a, b, x, y, z) Create a new [helm3](#affineplanehelm3) object. @@ -1158,7 +1160,7 @@ Create a new [helm3](#affineplanehelm3) object. Source: [create.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/create.js) -## affineplane.helm3.det(tr) +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[det](#affineplanehelm3det)(tr) The matrix determinant of the transformation. If the determinant equals zero then the matrix cannot be inverted and @@ -1178,19 +1180,19 @@ Aliases: [affineplane.helm3.determinant](#affineplanehelm3determinant) Source: [det.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/det.js) -## affineplane.helm3.determinant(tr) +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[determinant](#affineplanehelm3determinant)(tr) Alias of [affineplane.helm3.det](#affineplanehelm3det) Source: [det.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/det.js) -## affineplane.helm3.equal(tr, ts) +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[equal](#affineplanehelm3equal)(tr, ts) True if transformations are exactly equal. Note that due to floating-point arithmetics, computation might cause exact equality to be broken. -See [affineplane.helm3.almostEqual](#affineplanehelm3almostEqual) for a relaxed alternative. +See [affineplane.helm3.almostEqual](#affineplanehelm3almostequal) for a relaxed alternative. **Parameters:** - *tr* @@ -1206,14 +1208,14 @@ Aliases: [affineplane.helm3.equals](#affineplanehelm3equals) Source: [equal.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/equal.js) -## affineplane.helm3.equals +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[equals](#affineplanehelm3equals) Alias of [affineplane.helm3.equal](#affineplanehelm3equal) Source: [equal.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/equal.js) - -## affineplane.helm3.fromArray(arr) + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[fromArray](#affineplanehelm3fromarray)(arr) Create an affine similarity transform from 5-element array. @@ -1226,8 +1228,8 @@ Create an affine similarity transform from 5-element array. Source: [fromArray.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/fromArray.js) - -## affineplane.helm3.fromFeatures(feats) + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[fromFeatures](#affineplanehelm3fromfeatures)(feats) Create a [helm3](#affineplanehelm3) transformation from human-readable features. @@ -1246,8 +1248,8 @@ Create a [helm3](#affineplanehelm3) transformation from human-readable features. Source: [fromFeatures.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/fromFeatures.js) - -## affineplane.helm3.getDilation(tr) + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[getDilation](#affineplanehelm3getdilation)(tr) Get the dilation component of the transformation. @@ -1258,12 +1260,12 @@ Get the dilation component of the transformation. **Returns:** - a number, the scale multiplier. -Aliases: [affineplane.helm3.getScale](#affineplanehelm3getScale) +Aliases: [affineplane.helm3.getScale](#affineplanehelm3getscale) Source: [getDilation.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/getDilation.js) - -## affineplane.helm3.getRotation(tr) + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[getRotation](#affineplanehelm3getrotation)(tr) Get the rotation component of the transform in radians. This is rotation around z-axis to right hand direction. @@ -1277,15 +1279,15 @@ This is rotation around z-axis to right hand direction. Source: [getRotation.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/getRotation.js) - -## affineplane.helm3.getScale + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[getScale](#affineplanehelm3getscale) -Alias of [affineplane.helm3.getDilation](#affineplanehelm3getDilation) +Alias of [affineplane.helm3.getDilation](#affineplanehelm3getdilation) Source: [getDilation.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/getDilation.js) - -## affineplane.helm3.getTranslation(tr) + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[getTranslation](#affineplanehelm3gettranslation)(tr) Get translation component of the transformation as a vector. @@ -1298,31 +1300,31 @@ Get translation component of the transformation as a vector. Source: [getTranslation.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/getTranslation.js) - -## affineplane.helm3.HALF + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[HALF](#affineplanehelm3half) Scaling to half size. Source: [helm3/index.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/index.js) - -## affineplane.helm3.I + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[I](#affineplanehelm3i) Identity transform, a kind of multiplication by 1. -Aliases: [affineplane.helm3.IDENTITY](#affineplanehelm3IDENTITY) +Aliases: [affineplane.helm3.IDENTITY](#affineplanehelm3identity) Source: [helm3/index.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/index.js) - -## affineplane.helm3.IDENTITY + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[IDENTITY](#affineplanehelm3identity) -Alias of [affineplane.helm3.I](#affineplanehelm3I) +Alias of [affineplane.helm3.I](#affineplanehelm3i) Source: [helm3/index.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/index.js) -## affineplane.helm3.inverse(tr) +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[inverse](#affineplanehelm3inverse)(tr) Invert the transform. A transform from B to C becomes a transform from C to B. @@ -1339,14 +1341,14 @@ Aliases: [affineplane.helm3.invert](#affineplanehelm3invert) Source: [inverse.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/inverse.js) -## affineplane.helm3.invert +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[invert](#affineplanehelm3invert) Alias of [affineplane.helm3.inverse](#affineplanehelm3inverse) Source: [inverse.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/inverse.js) - -## affineplane.helm3.projectTo(tr, plane) + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[projectTo](#affineplanehelm3projectto)(tr, plane) Project transformation onto a plane orthogonally. @@ -1361,43 +1363,43 @@ Project transformation onto a plane orthogonally. Source: [projectTo.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/projectTo.js) - -## affineplane.helm3.ROT0 + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[ROT0](#affineplanehelm3rot0) Zero angle rotation. Source: [helm3/index.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/index.js) - -## affineplane.helm3.ROT180 + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[ROT180](#affineplanehelm3rot180) Rotation of 180 degrees. Source: [helm3/index.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/index.js) - -## affineplane.helm3.ROT270 + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[ROT270](#affineplanehelm3rot270) Clockwise rotation of 270 degrees. Source: [helm3/index.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/index.js) - -## affineplane.helm3.ROT45 + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[ROT45](#affineplanehelm3rot45) Clockwise rotation of 45 degrees. Source: [helm3/index.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/index.js) - -## affineplane.helm3.ROT90 + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[ROT90](#affineplanehelm3rot90) Clockwise rotation of 90 degrees. Source: [helm3/index.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/index.js) - -## affineplane.helm3.rotateBy(tr, radians) + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[rotateBy](#affineplanehelm3rotateby)(tr, radians) Rotate image of the transform by the given radians around z-axis. This changes the direction of the translation but @@ -1415,8 +1417,8 @@ the translation along z. Source: [rotateBy.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/rotateBy.js) - -## affineplane.helm3.scaleBy(tr, multiplier) + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[scaleBy](#affineplanehelm3scaleby)(tr, multiplier) Scale image of the transform by the given multiplier. Dilation and translation are multiplied, @@ -1434,8 +1436,8 @@ Note that also translation along z becomes multiplied. Source: [scaleBy.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/scaleBy.js) - -## affineplane.helm3.setDilation(tr, dilation) + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[setDilation](#affineplanehelm3setdilation)(tr, dilation) Replace scaling of the transformation. The rotation and translation properties are preserved. @@ -1451,8 +1453,8 @@ The rotation and translation properties are preserved. Source: [setDilation.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/setDilation.js) - -## affineplane.helm3.setRotation(tr, angle) + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[setRotation](#affineplanehelm3setrotation)(tr, angle) Replace rotation angle of the transformation. The dilation and translation properties are preserved. @@ -1468,8 +1470,8 @@ The dilation and translation properties are preserved. Source: [setRotation.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/setRotation.js) - -## affineplane.helm3.setTranslation(tr, vec) + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[setTranslation](#affineplanehelm3settranslation)(tr, vec) Replace translation property of the transformation. The dilation and rotation properties are preserved. @@ -1485,8 +1487,8 @@ The dilation and rotation properties are preserved. Source: [setTranslation.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/setTranslation.js) - -## affineplane.helm3.SINGULAR + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[SINGULAR](#affineplanehelm3singular) Singular transform, resembles multiplication by 0. Note that singular transformations are note valid affine transformations @@ -1494,15 +1496,15 @@ because singularity cannot be inverted. For example with numbers, you can multiply 2 by 0 to produce 0 but you cannot multiply 0 to produce the original 2. -Aliases: [affineplane.helm3.ZERO](#affineplanehelm3ZERO) +Aliases: [affineplane.helm3.ZERO](#affineplanehelm3zero) Source: [helm3/index.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/index.js) - -## affineplane.helm3.toArray(tr) + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[toArray](#affineplanehelm3toarray)(tr) Serializes the transformation into an array representation. -Compatible with [affineplane.helm3.fromArray](#affineplanehelm3fromArray). +Compatible with [affineplane.helm3.fromArray](#affineplanehelm3fromarray). **Parameters:** - *tr* @@ -1513,8 +1515,8 @@ Compatible with [affineplane.helm3.fromArray](#affineplanehelm3fromArray). Source: [toArray.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/toArray.js) - -## affineplane.helm3.toMatrix(tr) + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[toMatrix](#affineplanehelm3tomatrix)(tr) Get the transformation as a 4x4 homogeneous 3D transformation matrix, using indexing similar to MDN matrix3d article. @@ -1539,8 +1541,8 @@ Elements are constructed like this: Source: [toMatrix.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/toMatrix.js) - -## affineplane.helm3.transitFrom(tr, source) + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[transitFrom](#affineplanehelm3transitfrom)(tr, source) Transit a [helm3](#affineplanehelm3) from the source plane to the reference plane. @@ -1561,8 +1563,8 @@ Invariants: Source: [transitFrom.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/transitFrom.js) - -## affineplane.helm3.UNIT + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[UNIT](#affineplanehelm3unit) A unit transform. Scales by sqrt(2), rotates by 45deg, and translates by vector (1,1,1) @@ -1570,7 +1572,7 @@ and translates by vector (1,1,1) Source: [helm3/index.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/index.js) -## affineplane.helm3.validate(tr) +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[validate](#affineplanehelm3validate)(tr) Check if object is a valid [helm3](#affineplanehelm3). @@ -1583,22 +1585,22 @@ Check if object is a valid [helm3](#affineplanehelm3). Source: [validate.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/validate.js) - -## affineplane.helm3.X2 + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[X2](#affineplanehelm3x2) Scaling to double size. Source: [helm3/index.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/index.js) - -## affineplane.helm3.ZERO + +## [affineplane](#affineplane).[helm3](#affineplanehelm3).[ZERO](#affineplanehelm3zero) -Alias of [affineplane.helm3.SINGULAR](#affineplanehelm3SINGULAR) +Alias of [affineplane.helm3.SINGULAR](#affineplanehelm3singular) Source: [helm3/index.js](https://github.com/axelpale/affineplane/blob/main/lib/helm3/index.js) -## affineplane.line2 +## [affineplane](#affineplane).[line2](#affineplaneline2) Directed line object with origin point in space and a spanning vector. @@ -1606,14 +1608,14 @@ A [line2](#affineplaneline2) is an object `{ origin: {x,y}, span: {x,y} }` - [affineplane.line2.at](#affineplaneline2at) - [affineplane.line2.create](#affineplaneline2create) -- [affineplane.line2.fromPoints](#affineplaneline2fromPoints) +- [affineplane.line2.fromPoints](#affineplaneline2frompoints) - [affineplane.line2.validate](#affineplaneline2validate) Source: [line2/index.js](https://github.com/axelpale/affineplane/blob/main/lib/line2/index.js) -## affineplane.line2.at(line, c) +## [affineplane](#affineplane).[line2](#affineplaneline2).[at](#affineplaneline2at)(line, c) Get a point on the line at position c from the line origin. For example c=2 gives a point at two spanning vectors away @@ -1631,7 +1633,7 @@ from the origin. Source: [at.js](https://github.com/axelpale/affineplane/blob/main/lib/line2/at.js) -## affineplane.line2.create(origin, span) +## [affineplane](#affineplane).[line2](#affineplaneline2).[create](#affineplaneline2create)(origin, span) Create a line from an origin point and a spanning vector. @@ -1646,8 +1648,8 @@ Create a line from an origin point and a spanning vector. Source: [create.js](https://github.com/axelpale/affineplane/blob/main/lib/line2/create.js) - -## affineplane.line2.fromPoints(p, q) + +## [affineplane](#affineplane).[line2](#affineplaneline2).[fromPoints](#affineplaneline2frompoints)(p, q) Create a line from two points with a spanning vector from p to q. @@ -1664,7 +1666,7 @@ with a spanning vector from p to q. Source: [fromPoints.js](https://github.com/axelpale/affineplane/blob/main/lib/line2/fromPoints.js) -## affineplane.line2.validate(l) +## [affineplane](#affineplane).[line2](#affineplaneline2).[validate](#affineplaneline2validate)(l) Check if the object is a valid [line2](#affineplaneline2). Valid [line2](#affineplaneline2) has origin and span properties @@ -1680,7 +1682,7 @@ that are valid [point2](#affineplanepoint2) and [vec2](#affineplanevec2), respec Source: [validate.js](https://github.com/axelpale/affineplane/blob/main/lib/line2/validate.js) -## affineplane.line3 +## [affineplane](#affineplane).[line3](#affineplaneline3) Directed line object in 3D, Represented as an origin point and a spanning vector. @@ -1689,14 +1691,14 @@ A [line2](#affineplaneline2) is an object `{ origin: {x,y,z}, span: {x,y,z} }` - [affineplane.line3.at](#affineplaneline3at) - [affineplane.line3.create](#affineplaneline3create) -- [affineplane.line3.fromPoints](#affineplaneline3fromPoints) +- [affineplane.line3.fromPoints](#affineplaneline3frompoints) - [affineplane.line3.validate](#affineplaneline3validate) Source: [line3/index.js](https://github.com/axelpale/affineplane/blob/main/lib/line3/index.js) -## affineplane.line3.at(line, c) +## [affineplane](#affineplane).[line3](#affineplaneline3).[at](#affineplaneline3at)(line, c) Get a point on the line at position c from the line origin. For example c=2 gives a point at two spanning vectors away @@ -1714,7 +1716,7 @@ from the origin. Source: [at.js](https://github.com/axelpale/affineplane/blob/main/lib/line3/at.js) -## affineplane.line3.create(origin, span) +## [affineplane](#affineplane).[line3](#affineplaneline3).[create](#affineplaneline3create)(origin, span) Create a 3d line from an origin point and a spanning vector. @@ -1729,8 +1731,8 @@ Create a 3d line from an origin point and a spanning vector. Source: [create.js](https://github.com/axelpale/affineplane/blob/main/lib/line3/create.js) - -## affineplane.line3.fromPoints(p, q) + +## [affineplane](#affineplane).[line3](#affineplaneline3).[fromPoints](#affineplaneline3frompoints)(p, q) Create a line from two points with a spanning vector from p to q. @@ -1747,7 +1749,7 @@ with a spanning vector from p to q. Source: [fromPoints.js](https://github.com/axelpale/affineplane/blob/main/lib/line3/fromPoints.js) -## affineplane.line3.validate(line) +## [affineplane](#affineplane).[line3](#affineplaneline3).[validate](#affineplaneline3validate)(line) Check if the object is a valid [line3](#affineplaneline3). Valid [line3](#affineplaneline3) has origin and span properties @@ -1763,7 +1765,7 @@ that are valid [point3](#affineplanepoint3) and [vec3](#affineplanevec3), respec Source: [validate.js](https://github.com/axelpale/affineplane/blob/main/lib/line3/validate.js) -## affineplane.path2 +## [affineplane](#affineplane).[path2](#affineplanepath2) Two-dimensional path; Array of [point2](#affineplanepoint2); Open sequence of points; Does not form a polygon but a sequence of line segments. @@ -1775,7 +1777,7 @@ Does not form a polygon but a sequence of line segments. Source: [path2/index.js](https://github.com/axelpale/affineplane/blob/main/lib/path2/index.js) -## affineplane.path2.create(points) +## [affineplane](#affineplane).[path2](#affineplanepath2).[create](#affineplanepath2create)(points) Create a path on plane. Deep-clones the points array. @@ -1789,7 +1791,7 @@ Create a path on plane. Deep-clones the points array. Source: [create.js](https://github.com/axelpale/affineplane/blob/main/lib/path2/create.js) -## affineplane.plane2 +## [affineplane](#affineplane).[plane2](#affineplaneplane2) A 2D euclidean plane. @@ -1812,35 +1814,35 @@ is located +20 units along x-axis of the reference plane. - [affineplane.plane2.create](#affineplaneplane2create) - [affineplane.plane2.difference](#affineplaneplane2difference) - [affineplane.plane2.equal](#affineplaneplane2equal) -- [affineplane.plane2.fromFeatures](#affineplaneplane2fromFeatures) -- [affineplane.plane2.getScale](#affineplaneplane2getScale) -- [affineplane.plane2.IDENTITY](#affineplaneplane2IDENTITY) +- [affineplane.plane2.fromFeatures](#affineplaneplane2fromfeatures) +- [affineplane.plane2.getScale](#affineplaneplane2getscale) +- [affineplane.plane2.IDENTITY](#affineplaneplane2identity) - [affineplane.plane2.invert](#affineplaneplane2invert) -- [affineplane.plane2.projectTo](#affineplaneplane2projectTo) -- [affineplane.plane2.rotateBy](#affineplaneplane2rotateBy) -- [affineplane.plane2.rotateTo](#affineplaneplane2rotateTo) -- [affineplane.plane2.rotateToOrtho](#affineplaneplane2rotateToOrtho) -- [affineplane.plane2.scaleBy](#affineplaneplane2scaleBy) -- [affineplane.plane2.scaleTo](#affineplaneplane2scaleTo) +- [affineplane.plane2.projectTo](#affineplaneplane2projectto) +- [affineplane.plane2.rotateBy](#affineplaneplane2rotateby) +- [affineplane.plane2.rotateTo](#affineplaneplane2rotateto) +- [affineplane.plane2.rotateToOrtho](#affineplaneplane2rotatetoortho) +- [affineplane.plane2.scaleBy](#affineplaneplane2scaleby) +- [affineplane.plane2.scaleTo](#affineplaneplane2scaleto) - [affineplane.plane2.transform](#affineplaneplane2transform) -- [affineplane.plane2.transitFrom](#affineplaneplane2transitFrom) -- [affineplane.plane2.transitTo](#affineplaneplane2transitTo) -- [affineplane.plane2.translateBy](#affineplaneplane2translateBy) -- [affineplane.plane2.translateTo](#affineplaneplane2translateTo) +- [affineplane.plane2.transitFrom](#affineplaneplane2transitfrom) +- [affineplane.plane2.transitTo](#affineplaneplane2transitto) +- [affineplane.plane2.translateBy](#affineplaneplane2translateby) +- [affineplane.plane2.translateTo](#affineplaneplane2translateto) - [affineplane.plane2.validate](#affineplaneplane2validate) Source: [plane2/index.js](https://github.com/axelpale/affineplane/blob/main/lib/plane2/index.js) -## affineplane.plane2.between +## [affineplane](#affineplane).[plane2](#affineplaneplane2).[between](#affineplaneplane2between) Alias of [affineplane.plane2.difference](#affineplaneplane2difference) Source: [difference.js](https://github.com/axelpale/affineplane/blob/main/lib/plane2/difference.js) -## affineplane.plane2.compose(planea, planeb) +## [affineplane](#affineplane).[plane2](#affineplaneplane2).[compose](#affineplaneplane2compose)(planea, planeb) Combine two planes together. @@ -1856,7 +1858,7 @@ Combine two planes together. Source: [compose.js](https://github.com/axelpale/affineplane/blob/main/lib/plane2/compose.js) -## affineplane.plane2.copy(plane) +## [affineplane](#affineplane).[plane2](#affineplaneplane2).[copy](#affineplaneplane2copy)(plane) Clone the plane object. @@ -1870,7 +1872,7 @@ Clone the plane object. Source: [copy.js](https://github.com/axelpale/affineplane/blob/main/lib/plane2/copy.js) -## affineplane.plane2.create(origin, span) +## [affineplane](#affineplane).[plane2](#affineplaneplane2).[create](#affineplaneplane2create)(origin, span) Create a [plane2](#affineplaneplane2) from an origin point and a basis vector. @@ -1886,7 +1888,7 @@ Create a [plane2](#affineplaneplane2) from an origin point and a basis vector. Source: [create.js](https://github.com/axelpale/affineplane/blob/main/lib/plane2/create.js) -## affineplane.plane2.difference(source, target) +## [affineplane](#affineplane).[plane2](#affineplaneplane2).[difference](#affineplaneplane2difference)(source, target) Represent a source plane on the target plane. In other words, find a transition from a source plane A @@ -1910,7 +1912,7 @@ Aliases: [affineplane.plane2.between](#affineplaneplane2between) Source: [difference.js](https://github.com/axelpale/affineplane/blob/main/lib/plane2/difference.js) -## affineplane.plane2.equal(p1, p2) +## [affineplane](#affineplane).[plane2](#affineplaneplane2).[equal](#affineplaneplane2equal)(p1, p2) **Parameters:** - *p1* @@ -1923,8 +1925,8 @@ Source: [difference.js](https://github.com/axelpale/affineplane/blob/main/lib/pl Source: [equal.js](https://github.com/axelpale/affineplane/blob/main/lib/plane2/equal.js) - -## affineplane.plane2.fromFeatures(feats) + +## [affineplane](#affineplane).[plane2](#affineplaneplane2).[fromFeatures](#affineplaneplane2fromfeatures)(feats) Create a plane from human readable features. @@ -1943,8 +1945,8 @@ Create a plane from human readable features. Source: [fromFeatures.js](https://github.com/axelpale/affineplane/blob/main/lib/plane2/fromFeatures.js) - -## affineplane.plane2.getScale(plane) + +## [affineplane](#affineplane).[plane2](#affineplaneplane2).[getScale](#affineplaneplane2getscale)(plane) The length of the vector. @@ -1957,15 +1959,15 @@ The length of the vector. Source: [getScale.js](https://github.com/axelpale/affineplane/blob/main/lib/plane2/getScale.js) - -## affineplane.plane2.IDENTITY + +## [affineplane](#affineplane).[plane2](#affineplaneplane2).[IDENTITY](#affineplaneplane2identity) The identity plane is identical to its reference plane. Source: [plane2/index.js](https://github.com/axelpale/affineplane/blob/main/lib/plane2/index.js) -## affineplane.plane2.invert(plane) +## [affineplane](#affineplane).[plane2](#affineplaneplane2).[invert](#affineplaneplane2invert)(plane) A plane is a mapping from the plane's coordinates onto the reference plane. The inversion of the plane switches @@ -1981,8 +1983,8 @@ represented in the coordinates of the given plane. Source: [invert.js](https://github.com/axelpale/affineplane/blob/main/lib/plane2/invert.js) - -## affineplane.plane2.projectTo(plane, target[, camera]) + +## [affineplane](#affineplane).[plane2](#affineplaneplane2).[projectTo](#affineplaneplane2projectto)(plane, target[, camera]) Project a 2D plane from reference to the target parallel 2D plane in 3D. If camera is given, project perspectively, otherwise orthogonally. @@ -2000,8 +2002,8 @@ If camera is given, project perspectively, otherwise orthogonally. Source: [projectTo.js](https://github.com/axelpale/affineplane/blob/main/lib/plane2/projectTo.js) - -## affineplane.plane2.rotateBy(plane, center, radians) + +## [affineplane](#affineplane).[plane2](#affineplaneplane2).[rotateBy](#affineplaneplane2rotateby)(plane, center, radians) Rotate the given plane on the reference plane around a center point. @@ -2019,8 +2021,8 @@ a center point. Source: [rotateBy.js](https://github.com/axelpale/affineplane/blob/main/lib/plane2/rotateBy.js) - -## affineplane.plane2.rotateTo(plane, center, radians) + +## [affineplane](#affineplane).[plane2](#affineplaneplane2).[rotateTo](#affineplaneplane2rotateto)(plane, center, radians) Rotate the plane around a point so that after the rotation, the x-axis of the plane points to the given direction. @@ -2039,8 +2041,8 @@ The center point stays fixed during the operation. Source: [rotateTo.js](https://github.com/axelpale/affineplane/blob/main/lib/plane2/rotateTo.js) - -## affineplane.plane2.rotateToOrtho(plane, center) + +## [affineplane](#affineplane).[plane2](#affineplaneplane2).[rotateToOrtho](#affineplaneplane2rotatetoortho)(plane, center) Rotate plane to nearest orthogonal angle 0, 90, 180, and 270 deg with respect to the reference plane. @@ -2062,8 +2064,8 @@ caused by floating-point arithmetics. Source: [rotateToOrtho.js](https://github.com/axelpale/affineplane/blob/main/lib/plane2/rotateToOrtho.js) - -## affineplane.plane2.scaleBy(plane, center, multiplier) + +## [affineplane](#affineplane).[plane2](#affineplaneplane2).[scaleBy](#affineplaneplane2scaleby)(plane, center, multiplier) Create a plane that is scaled by the multiplier around a center point. For example, if a plane with basis vectors @@ -2083,8 +2085,8 @@ of the new plane are ex_hat = (2,0), ey_hat = (0,2). Source: [scaleBy.js](https://github.com/axelpale/affineplane/blob/main/lib/plane2/scaleBy.js) - -## affineplane.plane2.scaleTo(plane, center, scale) + +## [affineplane](#affineplane).[plane2](#affineplaneplane2).[scaleTo](#affineplaneplane2scaleto)(plane, center, scale) Create a plane that has the given scale. This is achieved by scaling the plane around @@ -2105,7 +2107,7 @@ becomes the desired scale. Source: [scaleTo.js](https://github.com/axelpale/affineplane/blob/main/lib/plane2/scaleTo.js) -## affineplane.plane2.transform(plane, tr) +## [affineplane](#affineplane).[plane2](#affineplaneplane2).[transform](#affineplaneplane2transform)(plane, tr) Transform the plane with a helmert transformation. Basically, the plane is a transformation from its internal @@ -2125,8 +2127,8 @@ For multiplication from right, see [affineplane.plane2.compose](#affineplaneplan Source: [transform.js](https://github.com/axelpale/affineplane/blob/main/lib/plane2/transform.js) - -## affineplane.plane2.transitFrom(plane, source) + +## [affineplane](#affineplane).[plane2](#affineplaneplane2).[transitFrom](#affineplaneplane2transitfrom)(plane, source) Transit a [plane2](#affineplaneplane2) from the source plane to the reference plane. In other words, @@ -2144,8 +2146,8 @@ of the reference plane instead of the source plane. Source: [transitFrom.js](https://github.com/axelpale/affineplane/blob/main/lib/plane2/transitFrom.js) - -## affineplane.plane2.transitTo + +## [affineplane](#affineplane).[plane2](#affineplaneplane2).[transitTo](#affineplaneplane2transitto) Transit a [plane2](#affineplaneplane2) to a target plane. In other words, represent the [plane2](#affineplaneplane2) @@ -2162,8 +2164,8 @@ in the coordinate system of the target plane. Source: [transitTo.js](https://github.com/axelpale/affineplane/blob/main/lib/plane2/transitTo.js) - -## affineplane.plane2.translateBy(plane, vec) + +## [affineplane](#affineplane).[plane2](#affineplaneplane2).[translateBy](#affineplaneplane2translateby)(plane, vec) Translate the plane by a vector. Basically this moves the plane origin @@ -2180,8 +2182,8 @@ on the reference plane. Source: [translateBy.js](https://github.com/axelpale/affineplane/blob/main/lib/plane2/translateBy.js) - -## affineplane.plane2.translateTo(plane, p) + +## [affineplane](#affineplane).[plane2](#affineplaneplane2).[translateTo](#affineplaneplane2translateto)(plane, p) Move the plane origin to a new point. This translates the plane to a new position. @@ -2198,7 +2200,7 @@ This translates the plane to a new position. Source: [translateTo.js](https://github.com/axelpale/affineplane/blob/main/lib/plane2/translateTo.js) -## affineplane.plane2.validate(plane) +## [affineplane](#affineplane).[plane2](#affineplaneplane2).[validate](#affineplaneplane2validate)(plane) Check if object is a valid [plane2](#affineplaneplane2). @@ -2212,7 +2214,7 @@ Check if object is a valid [plane2](#affineplaneplane2). Source: [validate.js](https://github.com/axelpale/affineplane/blob/main/lib/plane2/validate.js) -## affineplane.plane3 +## [affineplane](#affineplane).[plane3](#affineplaneplane3) A [plane3](#affineplaneplane3) does not model any possible plane in 3D space, but is limited to xy planes perpendicular to z-axis and with a known z position. @@ -2238,36 +2240,36 @@ relative to its reference plane. - [affineplane.plane3.create](#affineplaneplane3create) - [affineplane.plane3.difference](#affineplaneplane3difference) - [affineplane.plane3.equal](#affineplaneplane3equal) -- [affineplane.plane3.fromFeatures](#affineplaneplane3fromFeatures) -- [affineplane.plane3.getNormal](#affineplaneplane3getNormal) -- [affineplane.plane3.getScale](#affineplaneplane3getScale) -- [affineplane.plane3.IDENTITY](#affineplaneplane3IDENTITY) +- [affineplane.plane3.fromFeatures](#affineplaneplane3fromfeatures) +- [affineplane.plane3.getNormal](#affineplaneplane3getnormal) +- [affineplane.plane3.getScale](#affineplaneplane3getscale) +- [affineplane.plane3.IDENTITY](#affineplaneplane3identity) - [affineplane.plane3.invert](#affineplaneplane3invert) -- [affineplane.plane3.projectTo](#affineplaneplane3projectTo) -- [affineplane.plane3.rotateBy](#affineplaneplane3rotateBy) -- [affineplane.plane3.rotateTo](#affineplaneplane3rotateTo) -- [affineplane.plane3.rotateToOrtho](#affineplaneplane3rotateToOrtho) -- [affineplane.plane3.scaleBy](#affineplaneplane3scaleBy) -- [affineplane.plane3.scaleTo](#affineplaneplane3scaleTo) +- [affineplane.plane3.projectTo](#affineplaneplane3projectto) +- [affineplane.plane3.rotateBy](#affineplaneplane3rotateby) +- [affineplane.plane3.rotateTo](#affineplaneplane3rotateto) +- [affineplane.plane3.rotateToOrtho](#affineplaneplane3rotatetoortho) +- [affineplane.plane3.scaleBy](#affineplaneplane3scaleby) +- [affineplane.plane3.scaleTo](#affineplaneplane3scaleto) - [affineplane.plane3.transform](#affineplaneplane3transform) -- [affineplane.plane3.transitFrom](#affineplaneplane3transitFrom) -- [affineplane.plane3.transitTo](#affineplaneplane3transitTo) -- [affineplane.plane3.translateBy](#affineplaneplane3translateBy) -- [affineplane.plane3.translateTo](#affineplaneplane3translateTo) +- [affineplane.plane3.transitFrom](#affineplaneplane3transitfrom) +- [affineplane.plane3.transitTo](#affineplaneplane3transitto) +- [affineplane.plane3.translateBy](#affineplaneplane3translateby) +- [affineplane.plane3.translateTo](#affineplaneplane3translateto) - [affineplane.plane3.validate](#affineplaneplane3validate) Source: [plane3/index.js](https://github.com/axelpale/affineplane/blob/main/lib/plane3/index.js) -## affineplane.plane3.between +## [affineplane](#affineplane).[plane3](#affineplaneplane3).[between](#affineplaneplane3between) Alias of [affineplane.plane3.difference](#affineplaneplane3difference) Source: [difference.js](https://github.com/axelpale/affineplane/blob/main/lib/plane3/difference.js) -## affineplane.plane3.compose(planea, planeb) +## [affineplane](#affineplane).[plane3](#affineplaneplane3).[compose](#affineplaneplane3compose)(planea, planeb) Combine two planes together. @@ -2283,7 +2285,7 @@ Combine two planes together. Source: [compose.js](https://github.com/axelpale/affineplane/blob/main/lib/plane3/compose.js) -## affineplane.plane3.copy(plane) +## [affineplane](#affineplane).[plane3](#affineplaneplane3).[copy](#affineplaneplane3copy)(plane) Clone the plane object. @@ -2297,7 +2299,7 @@ Clone the plane object. Source: [copy.js](https://github.com/axelpale/affineplane/blob/main/lib/plane3/copy.js) -## affineplane.plane3.create(origin, span) +## [affineplane](#affineplane).[plane3](#affineplaneplane3).[create](#affineplaneplane3create)(origin, span) Create a plane from 3D origin point and 2D basis vector. @@ -2313,7 +2315,7 @@ Create a plane from 3D origin point and 2D basis vector. Source: [create.js](https://github.com/axelpale/affineplane/blob/main/lib/plane3/create.js) -## affineplane.plane3.difference(source, target) +## [affineplane](#affineplane).[plane3](#affineplaneplane3).[difference](#affineplaneplane3difference)(source, target) Represent a source plane on the target plane. In other words, find a transition from a source plane A @@ -2337,7 +2339,7 @@ Aliases: [affineplane.plane3.between](#affineplaneplane3between) Source: [difference.js](https://github.com/axelpale/affineplane/blob/main/lib/plane3/difference.js) -## affineplane.plane3.equal(p1, p2) +## [affineplane](#affineplane).[plane3](#affineplaneplane3).[equal](#affineplaneplane3equal)(p1, p2) Test if two planes are equal. @@ -2352,8 +2354,8 @@ Test if two planes are equal. Source: [equal.js](https://github.com/axelpale/affineplane/blob/main/lib/plane3/equal.js) - -## affineplane.plane3.fromFeatures(feats) + +## [affineplane](#affineplane).[plane3](#affineplaneplane3).[fromFeatures](#affineplaneplane3fromfeatures)(feats) Create a plane from human readable features. @@ -2372,8 +2374,8 @@ Create a plane from human readable features. Source: [fromFeatures.js](https://github.com/axelpale/affineplane/blob/main/lib/plane3/fromFeatures.js) - -## affineplane.plane3.getNormal(plane) + +## [affineplane](#affineplane).[plane3](#affineplaneplane3).[getNormal](#affineplaneplane3getnormal)(plane) Get a unit vector perpendicular to the plane. @@ -2386,8 +2388,8 @@ Get a unit vector perpendicular to the plane. Source: [getNormal.js](https://github.com/axelpale/affineplane/blob/main/lib/plane3/getNormal.js) - -## affineplane.plane3.getScale(plane) + +## [affineplane](#affineplane).[plane3](#affineplaneplane3).[getScale](#affineplaneplane3getscale)(plane) The length of the basis vector, the scale multiplier. @@ -2400,15 +2402,15 @@ The length of the basis vector, the scale multiplier. Source: [getScale.js](https://github.com/axelpale/affineplane/blob/main/lib/plane3/getScale.js) - -## affineplane.plane3.IDENTITY + +## [affineplane](#affineplane).[plane3](#affineplaneplane3).[IDENTITY](#affineplaneplane3identity) The identity plane is identical to its reference plane. Source: [plane3/index.js](https://github.com/axelpale/affineplane/blob/main/lib/plane3/index.js) -## affineplane.plane3.invert(plane) +## [affineplane](#affineplane).[plane3](#affineplaneplane3).[invert](#affineplaneplane3invert)(plane) **Parameters:** - *plane* @@ -2419,8 +2421,8 @@ Source: [plane3/index.js](https://github.com/axelpale/affineplane/blob/main/lib/ Source: [invert.js](https://github.com/axelpale/affineplane/blob/main/lib/plane3/invert.js) - -## affineplane.plane3.projectTo(plane, target[, camera]) + +## [affineplane](#affineplane).[plane3](#affineplaneplane3).[projectTo](#affineplaneplane3projectto)(plane, target[, camera]) Project the plane based on the image plane position and the optional camera position. @@ -2439,8 +2441,8 @@ If camera is given, project perspectively, otherwise orthogonally. Source: [projectTo.js](https://github.com/axelpale/affineplane/blob/main/lib/plane3/projectTo.js) - -## affineplane.plane3.rotateBy(plane, center, radians) + +## [affineplane](#affineplane).[plane3](#affineplaneplane3).[rotateBy](#affineplaneplane3rotateby)(plane, center, radians) Rotate the given plane in the reference space around a line parallel to z-axis and which goes through @@ -2459,8 +2461,8 @@ the given center point. The plane z depth is preserved. Source: [rotateBy.js](https://github.com/axelpale/affineplane/blob/main/lib/plane3/rotateBy.js) - -## affineplane.plane3.rotateTo(plane, center, radians) + +## [affineplane](#affineplane).[plane3](#affineplaneplane3).[rotateTo](#affineplaneplane3rotateto)(plane, center, radians) Rotate the plane around a line parallel to z-axis and which goes though the given center point. @@ -2482,8 +2484,8 @@ stays fixed during the operation. Source: [rotateTo.js](https://github.com/axelpale/affineplane/blob/main/lib/plane3/rotateTo.js) - -## affineplane.plane3.rotateToOrtho(plane, center) + +## [affineplane](#affineplane).[plane3](#affineplaneplane3).[rotateToOrtho](#affineplaneplane3rotatetoortho)(plane, center) Rotate plane to nearest orthogonal angle 0, 90, 180, and 270 deg with respect to the reference plane. The rotation happens on xy-plane, @@ -2507,8 +2509,8 @@ caused by floating-point arithmetics. Source: [rotateToOrtho.js](https://github.com/axelpale/affineplane/blob/main/lib/plane3/rotateToOrtho.js) - -## affineplane.plane3.scaleBy(plane, center, multiplier) + +## [affineplane](#affineplane).[plane3](#affineplaneplane3).[scaleBy](#affineplaneplane3scaleby)(plane, center, multiplier) Create a plane that is scaled by the multiplier around a center point. For example, if a plane with basis vectors @@ -2531,8 +2533,8 @@ The scaling preserves the z depth of the plane. Source: [scaleBy.js](https://github.com/axelpale/affineplane/blob/main/lib/plane3/scaleBy.js) - -## affineplane.plane3.scaleTo(plane, center, scale) + +## [affineplane](#affineplane).[plane3](#affineplaneplane3).[scaleTo](#affineplaneplane3scaleto)(plane, center, scale) Scale a plane to the given scale. This is achieved by scaling the given plane around @@ -2553,7 +2555,7 @@ the given center point. Source: [scaleTo.js](https://github.com/axelpale/affineplane/blob/main/lib/plane3/scaleTo.js) -## affineplane.plane3.transform(plane, tr) +## [affineplane](#affineplane).[plane3](#affineplaneplane3).[transform](#affineplaneplane3transform)(plane, tr) Transform the plane with a helmert transformation. Basically, the plane is a transformation from its internal @@ -2573,8 +2575,8 @@ For multiplication from right, see [affineplane.plane3.compose](#affineplaneplan Source: [transform.js](https://github.com/axelpale/affineplane/blob/main/lib/plane3/transform.js) - -## affineplane.plane3.transitFrom(plane, source) + +## [affineplane](#affineplane).[plane3](#affineplaneplane3).[transitFrom](#affineplaneplane3transitfrom)(plane, source) Transit a [plane3](#affineplaneplane3) from the source plane to the reference plane. In other words, @@ -2592,8 +2594,8 @@ system of the reference plane. Source: [transitFrom.js](https://github.com/axelpale/affineplane/blob/main/lib/plane3/transitFrom.js) - -## affineplane.plane3.transitTo(plane, target) + +## [affineplane](#affineplane).[plane3](#affineplaneplane3).[transitTo](#affineplaneplane3transitto)(plane, target) Transit a [plane3](#affineplaneplane3) to a target plane. In other words, represent the [plane3](#affineplaneplane3) @@ -2610,8 +2612,8 @@ in the coordinate system of the target plane. Source: [transitTo.js](https://github.com/axelpale/affineplane/blob/main/lib/plane3/transitTo.js) - -## affineplane.plane3.translateBy(plane, vec) + +## [affineplane](#affineplane).[plane3](#affineplaneplane3).[translateBy](#affineplaneplane3translateby)(plane, vec) Translate the plane by a vector. Basically this moves the plane origin @@ -2628,8 +2630,8 @@ on the reference plane by the given vector. Source: [translateBy.js](https://github.com/axelpale/affineplane/blob/main/lib/plane3/translateBy.js) - -## affineplane.plane3.translateTo(plane, p) + +## [affineplane](#affineplane).[plane3](#affineplaneplane3).[translateTo](#affineplaneplane3translateto)(plane, p) Move the plane origin to a new point. This translates the plane to a new position. @@ -2646,7 +2648,7 @@ This translates the plane to a new position. Source: [translateTo.js](https://github.com/axelpale/affineplane/blob/main/lib/plane3/translateTo.js) -## affineplane.plane3.validate(plane) +## [affineplane](#affineplane).[plane3](#affineplaneplane3).[validate](#affineplaneplane3validate)(plane) Check if object is a valid [plane3](#affineplaneplane3). @@ -2660,7 +2662,7 @@ Check if object is a valid [plane3](#affineplaneplane3). Source: [validate.js](https://github.com/axelpale/affineplane/blob/main/lib/plane3/validate.js) -## affineplane.point2 +## [affineplane](#affineplane).[point2](#affineplanepoint2) A two-dimensional point. A point is a position in affine space. Due to affinity, two points cannot be added together, @@ -2669,7 +2671,7 @@ An affine space does not have origin; `{ x:0, y:0 }` is not an origin. ![A point](geometry_point.png) -- [affineplane.point2.almostEqual](#affineplanepoint2almostEqual) +- [affineplane.point2.almostEqual](#affineplanepoint2almostequal) - [affineplane.point2.average](#affineplanepoint2average) - [affineplane.point2.copy](#affineplanepoint2copy) - [affineplane.point2.create](#affineplanepoint2create) @@ -2679,26 +2681,26 @@ An affine space does not have origin; `{ x:0, y:0 }` is not an origin. - [affineplane.point2.distance](#affineplanepoint2distance) - [affineplane.point2.equal](#affineplanepoint2equal) - [affineplane.point2.equals](#affineplanepoint2equals) -- [affineplane.point2.fromArray](#affineplanepoint2fromArray) +- [affineplane.point2.fromArray](#affineplanepoint2fromarray) - [affineplane.point2.mean](#affineplanepoint2mean) - [affineplane.point2.move](#affineplanepoint2move) - [affineplane.point2.offset](#affineplanepoint2offset) -- [affineplane.point2.polarOffset](#affineplanepoint2polarOffset) -- [affineplane.point2.projectTo](#affineplanepoint2projectTo) -- [affineplane.point2.projectToLine](#affineplanepoint2projectToLine) -- [affineplane.point2.rotateBy](#affineplanepoint2rotateBy) -- [affineplane.point2.toArray](#affineplanepoint2toArray) +- [affineplane.point2.polarOffset](#affineplanepoint2polaroffset) +- [affineplane.point2.projectTo](#affineplanepoint2projectto) +- [affineplane.point2.projectToLine](#affineplanepoint2projecttoline) +- [affineplane.point2.rotateBy](#affineplanepoint2rotateby) +- [affineplane.point2.toArray](#affineplanepoint2toarray) - [affineplane.point2.transform](#affineplanepoint2transform) -- [affineplane.point2.transitFrom](#affineplanepoint2transitFrom) -- [affineplane.point2.transitTo](#affineplanepoint2transitTo) +- [affineplane.point2.transitFrom](#affineplanepoint2transitfrom) +- [affineplane.point2.transitTo](#affineplanepoint2transitto) - [affineplane.point2.translate](#affineplanepoint2translate) - [affineplane.point2.validate](#affineplanepoint2validate) Source: [point2/index.js](https://github.com/axelpale/affineplane/blob/main/lib/point2/index.js) - -## affineplane.point2.almostEqual(p, q[, epsilon]) + +## [affineplane](#affineplane).[point2](#affineplanepoint2).[almostEqual](#affineplanepoint2almostequal)(p, q[, epsilon]) Test if points are almost equal by the margin of epsilon. @@ -2716,7 +2718,7 @@ Test if points are almost equal by the margin of epsilon. Source: [almostEqual.js](https://github.com/axelpale/affineplane/blob/main/lib/point2/almostEqual.js) -## affineplane.point2.average(ps) +## [affineplane](#affineplane).[point2](#affineplanepoint2).[average](#affineplanepoint2average)(ps) Average of points. @@ -2732,7 +2734,7 @@ Aliases: [affineplane.point2.mean](#affineplanepoint2mean) Source: [average.js](https://github.com/axelpale/affineplane/blob/main/lib/point2/average.js) -## affineplane.point2.copy(p) +## [affineplane](#affineplane).[point2](#affineplanepoint2).[copy](#affineplanepoint2copy)(p) Copy point object. @@ -2746,7 +2748,7 @@ Copy point object. Source: [copy.js](https://github.com/axelpale/affineplane/blob/main/lib/point2/copy.js) -## affineplane.point2.create(x, y) +## [affineplane](#affineplane).[point2](#affineplanepoint2).[create](#affineplanepoint2create)(x, y) Create a [point2](#affineplanepoint2) object: `{ x, y }`. @@ -2762,21 +2764,21 @@ Create a [point2](#affineplanepoint2) object: `{ x, y }`. Source: [create.js](https://github.com/axelpale/affineplane/blob/main/lib/point2/create.js) -## affineplane.point2.delta +## [affineplane](#affineplane).[point2](#affineplanepoint2).[delta](#affineplanepoint2delta) Alias of [affineplane.point2.difference](#affineplanepoint2difference), [affineplane.point2.diff](#affineplanepoint2diff) Source: [difference.js](https://github.com/axelpale/affineplane/blob/main/lib/point2/difference.js) -## affineplane.point2.diff +## [affineplane](#affineplane).[point2](#affineplanepoint2).[diff](#affineplanepoint2diff) Alias of [affineplane.point2.difference](#affineplanepoint2difference), [affineplane.point2.delta](#affineplanepoint2delta) Source: [difference.js](https://github.com/axelpale/affineplane/blob/main/lib/point2/difference.js) -## affineplane.point2.difference(p, q) +## [affineplane](#affineplane).[point2](#affineplanepoint2).[difference](#affineplanepoint2difference)(p, q) A vector from point p to point q. @@ -2794,7 +2796,7 @@ Aliases: [affineplane.point2.diff](#affineplanepoint2diff), [affineplane.point2. Source: [difference.js](https://github.com/axelpale/affineplane/blob/main/lib/point2/difference.js) -## affineplane.point2.distance(p, q) +## [affineplane](#affineplane).[point2](#affineplanepoint2).[distance](#affineplanepoint2distance)(p, q) Distance between two points. @@ -2810,7 +2812,7 @@ Distance between two points. Source: [distance.js](https://github.com/axelpale/affineplane/blob/main/lib/point2/distance.js) -## affineplane.point2.equal(p, q) +## [affineplane](#affineplane).[point2](#affineplanepoint2).[equal](#affineplanepoint2equal)(p, q) Test if points p, q are equal. @@ -2828,14 +2830,14 @@ Aliases: [affineplane.point2.equals](#affineplanepoint2equals) Source: [equal.js](https://github.com/axelpale/affineplane/blob/main/lib/point2/equal.js) -## affineplane.point2.equals +## [affineplane](#affineplane).[point2](#affineplanepoint2).[equals](#affineplanepoint2equals) Alias of [affineplane.point2.equal](#affineplanepoint2equal) Source: [equal.js](https://github.com/axelpale/affineplane/blob/main/lib/point2/equal.js) - -## affineplane.point2.fromArray(arrp) + +## [affineplane](#affineplane).[point2](#affineplanepoint2).[fromArray](#affineplanepoint2fromarray)(arrp) Create `{ x, y }` point from array [x, y]. @@ -2849,21 +2851,21 @@ Create `{ x, y }` point from array [x, y]. Source: [fromArray.js](https://github.com/axelpale/affineplane/blob/main/lib/point2/fromArray.js) -## affineplane.point2.mean +## [affineplane](#affineplane).[point2](#affineplanepoint2).[mean](#affineplanepoint2mean) Alias of [affineplane.point2.average](#affineplanepoint2average) Source: [average.js](https://github.com/axelpale/affineplane/blob/main/lib/point2/average.js) -## affineplane.point2.move +## [affineplane](#affineplane).[point2](#affineplanepoint2).[move](#affineplanepoint2move) Alias of [affineplane.point2.translate](#affineplanepoint2translate) Source: [translate.js](https://github.com/axelpale/affineplane/blob/main/lib/point2/translate.js) -## affineplane.point2.offset(p, dx, dy) +## [affineplane](#affineplane).[point2](#affineplanepoint2).[offset](#affineplanepoint2offset)(p, dx, dy) Offset a point by scalars dx dy. @@ -2880,8 +2882,8 @@ Offset a point by scalars dx dy. Source: [offset.js](https://github.com/axelpale/affineplane/blob/main/lib/point2/offset.js) - -## affineplane.point2.polarOffset(p, distance, angle) + +## [affineplane](#affineplane).[point2](#affineplanepoint2).[polarOffset](#affineplanepoint2polaroffset)(p, distance, angle) Create a point away from p at the given distance and angle. @@ -2898,8 +2900,8 @@ Create a point away from p at the given distance and angle. Source: [polarOffset.js](https://github.com/axelpale/affineplane/blob/main/lib/point2/polarOffset.js) - -## affineplane.point2.projectTo(point, plane[, camera]) + +## [affineplane](#affineplane).[point2](#affineplanepoint2).[projectTo](#affineplanepoint2projectto)(point, plane[, camera]) Project a point onto another plane in 3d. If camera is given, project perspectively. @@ -2918,8 +2920,8 @@ Otherwise, project orthogonally. Source: [projectTo.js](https://github.com/axelpale/affineplane/blob/main/lib/point2/projectTo.js) - -## affineplane.point2.projectToLine(p, line) + +## [affineplane](#affineplane).[point2](#affineplanepoint2).[projectToLine](#affineplanepoint2projecttoline)(p, line) Project a point orthogonally onto a line. @@ -2934,8 +2936,8 @@ Project a point orthogonally onto a line. Source: [projectToLine.js](https://github.com/axelpale/affineplane/blob/main/lib/point2/projectToLine.js) - -## affineplane.point2.rotateBy(p, origin, radians) + +## [affineplane](#affineplane).[point2](#affineplanepoint2).[rotateBy](#affineplanepoint2rotateby)(p, origin, radians) Rotate point about the given center. @@ -2952,8 +2954,8 @@ Rotate point about the given center. Source: [rotateBy.js](https://github.com/axelpale/affineplane/blob/main/lib/point2/rotateBy.js) - -## affineplane.point2.toArray(p) + +## [affineplane](#affineplane).[point2](#affineplanepoint2).[toArray](#affineplanepoint2toarray)(p) Get the [point2](#affineplanepoint2) object as an array. @@ -2967,7 +2969,7 @@ Get the [point2](#affineplanepoint2) object as an array. Source: [toArray.js](https://github.com/axelpale/affineplane/blob/main/lib/point2/toArray.js) -## affineplane.point2.transform(p, tr) +## [affineplane](#affineplane).[point2](#affineplanepoint2).[transform](#affineplanepoint2transform)(p, tr) Transform a point. @@ -2982,8 +2984,8 @@ Transform a point. Source: [transform.js](https://github.com/axelpale/affineplane/blob/main/lib/point2/transform.js) - -## affineplane.point2.transitFrom(point, plane) + +## [affineplane](#affineplane).[point2](#affineplanepoint2).[transitFrom](#affineplanepoint2transitfrom)(point, plane) Transit a [point2](#affineplanepoint2) from the source plane to the reference plane. @@ -2999,8 +3001,8 @@ to the reference plane. Source: [transitFrom.js](https://github.com/axelpale/affineplane/blob/main/lib/point2/transitFrom.js) - -## affineplane.point2.transitTo(point, target) + +## [affineplane](#affineplane).[point2](#affineplanepoint2).[transitTo](#affineplanepoint2transitto)(point, target) Transit a [point2](#affineplanepoint2) to a target plane. In other words, represent the [point2](#affineplanepoint2) @@ -3018,7 +3020,7 @@ in the coordinate system of the plane. Source: [transitTo.js](https://github.com/axelpale/affineplane/blob/main/lib/point2/transitTo.js) -## affineplane.point2.translate(p, vec) +## [affineplane](#affineplane).[point2](#affineplanepoint2).[translate](#affineplanepoint2translate)(p, vec) Translate the point by the given vector. @@ -3036,7 +3038,7 @@ Aliases: [affineplane.point2.move](#affineplanepoint2move) Source: [translate.js](https://github.com/axelpale/affineplane/blob/main/lib/point2/translate.js) -## affineplane.point2.validate(p) +## [affineplane](#affineplane).[point2](#affineplanepoint2).[validate](#affineplanepoint2validate)(p) Check if the object is a valid [point2](#affineplanepoint2). Valid [point2](#affineplanepoint2) has x and y properties that are valid numbers. @@ -3051,11 +3053,11 @@ Valid [point2](#affineplanepoint2) has x and y properties that are valid numbers Source: [validate.js](https://github.com/axelpale/affineplane/blob/main/lib/point2/validate.js) -## affineplane.point3 +## [affineplane](#affineplane).[point3](#affineplanepoint3) Three-dimensional point { x, y, z }. -- [affineplane.point3.almostEqual](#affineplanepoint3almostEqual) +- [affineplane.point3.almostEqual](#affineplanepoint3almostequal) - [affineplane.point3.average](#affineplanepoint3average) - [affineplane.point3.copy](#affineplanepoint3copy) - [affineplane.point3.create](#affineplanepoint3create) @@ -3065,23 +3067,23 @@ Three-dimensional point { x, y, z }. - [affineplane.point3.distance](#affineplanepoint3distance) - [affineplane.point3.equal](#affineplanepoint3equal) - [affineplane.point3.equals](#affineplanepoint3equals) -- [affineplane.point3.fromArray](#affineplanepoint3fromArray) +- [affineplane.point3.fromArray](#affineplanepoint3fromarray) - [affineplane.point3.mean](#affineplanepoint3mean) - [affineplane.point3.offset](#affineplanepoint3offset) -- [affineplane.point3.polarOffset](#affineplanepoint3polarOffset) -- [affineplane.point3.projectTo](#affineplanepoint3projectTo) -- [affineplane.point3.rotateBy](#affineplanepoint3rotateBy) -- [affineplane.point3.toArray](#affineplanepoint3toArray) -- [affineplane.point3.transitFrom](#affineplanepoint3transitFrom) -- [affineplane.point3.transitTo](#affineplanepoint3transitTo) +- [affineplane.point3.polarOffset](#affineplanepoint3polaroffset) +- [affineplane.point3.projectTo](#affineplanepoint3projectto) +- [affineplane.point3.rotateBy](#affineplanepoint3rotateby) +- [affineplane.point3.toArray](#affineplanepoint3toarray) +- [affineplane.point3.transitFrom](#affineplanepoint3transitfrom) +- [affineplane.point3.transitTo](#affineplanepoint3transitto) - [affineplane.point3.translate](#affineplanepoint3translate) - [affineplane.point3.validate](#affineplanepoint3validate) Source: [point3/index.js](https://github.com/axelpale/affineplane/blob/main/lib/point3/index.js) - -## affineplane.point3.almostEqual(p, q[, epsilon]) + +## [affineplane](#affineplane).[point3](#affineplanepoint3).[almostEqual](#affineplanepoint3almostequal)(p, q[, epsilon]) Test if points are almost equal by the margin of epsilon. @@ -3099,7 +3101,7 @@ Test if points are almost equal by the margin of epsilon. Source: [almostEqual.js](https://github.com/axelpale/affineplane/blob/main/lib/point3/almostEqual.js) -## affineplane.point3.average(ps) +## [affineplane](#affineplane).[point3](#affineplanepoint3).[average](#affineplanepoint3average)(ps) Average of points. @@ -3115,7 +3117,7 @@ Aliases: [affineplane.point3.mean](#affineplanepoint3mean) Source: [average.js](https://github.com/axelpale/affineplane/blob/main/lib/point3/average.js) -## affineplane.point3.copy(p) +## [affineplane](#affineplane).[point3](#affineplanepoint3).[copy](#affineplanepoint3copy)(p) Clone [point3](#affineplanepoint3) to a new object. @@ -3125,7 +3127,7 @@ Clone [point3](#affineplanepoint3) to a new object. Source: [copy.js](https://github.com/axelpale/affineplane/blob/main/lib/point3/copy.js) -## affineplane.point3.create(x, y, z) +## [affineplane](#affineplane).[point3](#affineplanepoint3).[create](#affineplanepoint3create)(x, y, z) Create a three-dimensional point `{x, y, z}`. @@ -3135,21 +3137,21 @@ Create a three-dimensional point `{x, y, z}`. Source: [create.js](https://github.com/axelpale/affineplane/blob/main/lib/point3/create.js) -## affineplane.point3.delta +## [affineplane](#affineplane).[point3](#affineplanepoint3).[delta](#affineplanepoint3delta) Alias of [affineplane.point3.difference](#affineplanepoint3difference), [affineplane.point3.diff](#affineplanepoint3diff) Source: [difference.js](https://github.com/axelpale/affineplane/blob/main/lib/point3/difference.js) -## affineplane.point3.diff +## [affineplane](#affineplane).[point3](#affineplanepoint3).[diff](#affineplanepoint3diff) Alias of [affineplane.point3.difference](#affineplanepoint3difference), [affineplane.point3.delta](#affineplanepoint3delta) Source: [difference.js](https://github.com/axelpale/affineplane/blob/main/lib/point3/difference.js) -## affineplane.point3.difference(p, q) +## [affineplane](#affineplane).[point3](#affineplanepoint3).[difference](#affineplanepoint3difference)(p, q) A vector from point p to point q. @@ -3167,7 +3169,7 @@ Aliases: [affineplane.point3.diff](#affineplanepoint3diff), [affineplane.point3. Source: [difference.js](https://github.com/axelpale/affineplane/blob/main/lib/point3/difference.js) -## affineplane.point3.distance(p, q) +## [affineplane](#affineplane).[point3](#affineplanepoint3).[distance](#affineplanepoint3distance)(p, q) Euclidean distance between two points. @@ -3183,7 +3185,7 @@ Euclidean distance between two points. Source: [distance.js](https://github.com/axelpale/affineplane/blob/main/lib/point3/distance.js) -## affineplane.point3.equal(p, q) +## [affineplane](#affineplane).[point3](#affineplanepoint3).[equal](#affineplanepoint3equal)(p, q) Test if points p, q are equal in value. @@ -3201,14 +3203,14 @@ Aliases: [affineplane.point3.equals](#affineplanepoint3equals) Source: [equal.js](https://github.com/axelpale/affineplane/blob/main/lib/point3/equal.js) -## affineplane.point3.equals +## [affineplane](#affineplane).[point3](#affineplanepoint3).[equals](#affineplanepoint3equals) Alias of [affineplane.point3.equal](#affineplanepoint3equal) Source: [equal.js](https://github.com/axelpale/affineplane/blob/main/lib/point3/equal.js) - -## affineplane.point3.fromArray(arrp) + +## [affineplane](#affineplane).[point3](#affineplanepoint3).[fromArray](#affineplanepoint3fromarray)(arrp) Create a [point3](#affineplanepoint3) from array `[x, y, z]`. @@ -3222,14 +3224,14 @@ Create a [point3](#affineplanepoint3) from array `[x, y, z]`. Source: [fromArray.js](https://github.com/axelpale/affineplane/blob/main/lib/point3/fromArray.js) -## affineplane.point3.mean +## [affineplane](#affineplane).[point3](#affineplanepoint3).[mean](#affineplanepoint3mean) Alias of [affineplane.point3.average](#affineplanepoint3average) Source: [average.js](https://github.com/axelpale/affineplane/blob/main/lib/point3/average.js) -## affineplane.point3.offset(p, dx, dy, dz) +## [affineplane](#affineplane).[point3](#affineplanepoint3).[offset](#affineplanepoint3offset)(p, dx, dy, dz) Offset a point by scalars dx, dy, dz. @@ -3248,8 +3250,8 @@ Offset a point by scalars dx, dy, dz. Source: [offset.js](https://github.com/axelpale/affineplane/blob/main/lib/point3/offset.js) - -## affineplane.point3.polarOffset(p, distance, roll, pitch) + +## [affineplane](#affineplane).[point3](#affineplanepoint3).[polarOffset](#affineplanepoint3polaroffset)(p, distance, roll, pitch) Create a point near p at the given distance, roll angle, and pitch angle. @@ -3269,8 +3271,8 @@ and pitch angle. Source: [polarOffset.js](https://github.com/axelpale/affineplane/blob/main/lib/point3/polarOffset.js) - -## affineplane.point3.projectTo(point, plane[, camera]) + +## [affineplane](#affineplane).[point3](#affineplanepoint3).[projectTo](#affineplanepoint3projectto)(point, plane[, camera]) Project a 3D point onto a plane in 3D space. @@ -3287,8 +3289,8 @@ Project a 3D point onto a plane in 3D space. Source: [projectTo.js](https://github.com/axelpale/affineplane/blob/main/lib/point3/projectTo.js) - -## affineplane.point3.rotateBy(p, origin, roll, pitch) + +## [affineplane](#affineplane).[point3](#affineplanepoint3).[rotateBy](#affineplanepoint3rotateby)(p, origin, roll, pitch) Rotate point around the given center point. Roll is applied before pitch. @@ -3308,11 +3310,11 @@ Roll is applied before pitch. Source: [rotateBy.js](https://github.com/axelpale/affineplane/blob/main/lib/point3/rotateBy.js) - -## affineplane.point3.toArray(p) + +## [affineplane](#affineplane).[point3](#affineplanepoint3).[toArray](#affineplanepoint3toarray)(p) Get the [point3](#affineplanepoint3) object as an array. -Compatible with [affineplane.point3.fromArray](#affineplanepoint3fromArray). +Compatible with [affineplane.point3.fromArray](#affineplanepoint3fromarray). **Parameters:** - *p* @@ -3323,8 +3325,8 @@ Compatible with [affineplane.point3.fromArray](#affineplanepoint3fromArray). Source: [toArray.js](https://github.com/axelpale/affineplane/blob/main/lib/point3/toArray.js) - -## affineplane.point3.transitFrom(point, plane) + +## [affineplane](#affineplane).[point3](#affineplanepoint3).[transitFrom](#affineplanepoint3transitfrom)(point, plane) Represent the point on the reference plane without losing information. @@ -3340,8 +3342,8 @@ without losing information. Source: [transitFrom.js](https://github.com/axelpale/affineplane/blob/main/lib/point3/transitFrom.js) - -## affineplane.point3.transitTo(point, plane) + +## [affineplane](#affineplane).[point3](#affineplanepoint3).[transitTo](#affineplanepoint3transitto)(point, plane) Represent the point on the target plane without losing information. @@ -3358,7 +3360,7 @@ without losing information. Source: [transitTo.js](https://github.com/axelpale/affineplane/blob/main/lib/point3/transitTo.js) -## affineplane.point3.translate(p, vec) +## [affineplane](#affineplane).[point3](#affineplanepoint3).[translate](#affineplanepoint3translate)(p, vec) Translate the point by the given vector. @@ -3374,7 +3376,7 @@ Translate the point by the given vector. Source: [translate.js](https://github.com/axelpale/affineplane/blob/main/lib/point3/translate.js) -## affineplane.point3.validate(p) +## [affineplane](#affineplane).[point3](#affineplanepoint3).[validate](#affineplanepoint3validate)(p) Check if the object is a valid [point3](#affineplanepoint3). Valid [point3](#affineplanepoint3) has props x, y and z that are valid numbers. @@ -3389,7 +3391,7 @@ Valid [point3](#affineplanepoint3) has props x, y and z that are valid numbers. Source: [validate.js](https://github.com/axelpale/affineplane/blob/main/lib/point3/validate.js) -## affineplane.poly2 +## [affineplane](#affineplane).[poly2](#affineplanepoly2) A two-dimensional polygon; Array of [point2](#affineplanepoint2); A closed sequence of points `[{ x, y }, { x, y }, ...]`. @@ -3400,7 +3402,7 @@ A closed sequence of points `[{ x, y }, { x, y }, ...]`. Source: [poly2/index.js](https://github.com/axelpale/affineplane/blob/main/lib/poly2/index.js) -## affineplane.poly2.create(points) +## [affineplane](#affineplane).[poly2](#affineplanepoly2).[create](#affineplanepoly2create)(points) Create a polygon on plane. Deep-clones the points array. @@ -3414,24 +3416,24 @@ Create a polygon on plane. Deep-clones the points array. Source: [create.js](https://github.com/axelpale/affineplane/blob/main/lib/poly2/create.js) -## affineplane.size2 +## [affineplane](#affineplane).[size2](#affineplanesize2) Two-dimensional rectangular size, consisting of width and height. Represented with an object `{ w, h }`. - [affineplane.size2.area](#affineplanesize2area) -- [affineplane.size2.atNorm](#affineplanesize2atNorm) +- [affineplane.size2.atNorm](#affineplanesize2atnorm) - [affineplane.size2.create](#affineplanesize2create) -- [affineplane.size2.scaleBy](#affineplanesize2scaleBy) -- [affineplane.size2.transitFrom](#affineplanesize2transitFrom) -- [affineplane.size2.transitTo](#affineplanesize2transitTo) +- [affineplane.size2.scaleBy](#affineplanesize2scaleby) +- [affineplane.size2.transitFrom](#affineplanesize2transitfrom) +- [affineplane.size2.transitTo](#affineplanesize2transitto) Source: [size2/index.js](https://github.com/axelpale/affineplane/blob/main/lib/size2/index.js) -## affineplane.size2.area(sz) +## [affineplane](#affineplane).[size2](#affineplanesize2).[area](#affineplanesize2area)(sz) Area. If your w and h are in px, this gives you the total number of pixels. @@ -3445,8 +3447,8 @@ the total number of pixels. Source: [area.js](https://github.com/axelpale/affineplane/blob/main/lib/size2/area.js) - -## affineplane.size2.atNorm(sz, nw, nh) + +## [affineplane](#affineplane).[size2](#affineplanesize2).[atNorm](#affineplanesize2atnorm)(sz, nw, nh) Find a point on the area. @@ -3464,7 +3466,7 @@ Find a point on the area. Source: [atNorm.js](https://github.com/axelpale/affineplane/blob/main/lib/size2/atNorm.js) -## affineplane.size2.create(width, height) +## [affineplane](#affineplane).[size2](#affineplanesize2).[create](#affineplanesize2create)(width, height) Create a [size2](#affineplanesize2) object. @@ -3479,8 +3481,8 @@ Create a [size2](#affineplanesize2) object. Source: [create.js](https://github.com/axelpale/affineplane/blob/main/lib/size2/create.js) - -## affineplane.size2.scaleBy(sz, multiplier) + +## [affineplane](#affineplane).[size2](#affineplanesize2).[scaleBy](#affineplanesize2scaleby)(sz, multiplier) Ratio-preserving scale. Multiplies all dimensions uniformly. @@ -3495,8 +3497,8 @@ Ratio-preserving scale. Multiplies all dimensions uniformly. Source: [scaleBy.js](https://github.com/axelpale/affineplane/blob/main/lib/size2/scaleBy.js) - -## affineplane.size2.transitFrom(size, source) + +## [affineplane](#affineplane).[size2](#affineplanesize2).[transitFrom](#affineplanesize2transitfrom)(size, source) Transit a size from the source plane to the reference plane. @@ -3512,8 +3514,8 @@ to the reference plane. Source: [transitFrom.js](https://github.com/axelpale/affineplane/blob/main/lib/size2/transitFrom.js) - -## affineplane.size2.transitTo(size, target) + +## [affineplane](#affineplane).[size2](#affineplanesize2).[transitTo](#affineplanesize2transitto)(size, target) Transit a [size2](#affineplanesize2) to a target plane. In other words, represent the size @@ -3531,7 +3533,7 @@ in the coordinate system of the target plane. Source: [transitTo.js](https://github.com/axelpale/affineplane/blob/main/lib/size2/transitTo.js) -## affineplane.vec2 +## [affineplane](#affineplane).[vec2](#affineplanevec2) Vector is a two dimensional dynamic movent between points, also known as a displacement vector. See [affineplane.point2](#affineplanepoint2) for @@ -3542,7 +3544,7 @@ position vectors. Aliases: [affineplane.vector2](#affineplanevector2) - [affineplane.vec2.add](#affineplanevec2add) -- [affineplane.vec2.almostEqual](#affineplanevec2almostEqual) +- [affineplane.vec2.almostEqual](#affineplanevec2almostequal) - [affineplane.vec2.average](#affineplanevec2average) - [affineplane.vec2.copy](#affineplanevec2copy) - [affineplane.vec2.create](#affineplanevec2create) @@ -3551,8 +3553,8 @@ Aliases: [affineplane.vector2](#affineplanevector2) - [affineplane.vec2.divide](#affineplanevec2divide) - [affineplane.vec2.dot](#affineplanevec2dot) - [affineplane.vec2.equal](#affineplanevec2equal) -- [affineplane.vec2.fromArray](#affineplanevec2fromArray) -- [affineplane.vec2.fromPolar](#affineplanevec2fromPolar) +- [affineplane.vec2.fromArray](#affineplanevec2fromarray) +- [affineplane.vec2.fromPolar](#affineplanevec2frompolar) - [affineplane.vec2.independent](#affineplanevec2independent) - [affineplane.vec2.invert](#affineplanevec2invert) - [affineplane.vec2.magnitude](#affineplanevec2magnitude) @@ -3562,17 +3564,17 @@ Aliases: [affineplane.vector2](#affineplanevector2) - [affineplane.vec2.negate](#affineplanevec2negate) - [affineplane.vec2.norm](#affineplanevec2norm) - [affineplane.vec2.normalize](#affineplanevec2normalize) -- [affineplane.vec2.projectTo](#affineplanevec2projectTo) -- [affineplane.vec2.rotateBy](#affineplanevec2rotateBy) -- [affineplane.vec2.rotateTo](#affineplanevec2rotateTo) -- [affineplane.vec2.scaleBy](#affineplanevec2scaleBy) -- [affineplane.vec2.scaleTo](#affineplanevec2scaleTo) +- [affineplane.vec2.projectTo](#affineplanevec2projectto) +- [affineplane.vec2.rotateBy](#affineplanevec2rotateby) +- [affineplane.vec2.rotateTo](#affineplanevec2rotateto) +- [affineplane.vec2.scaleBy](#affineplanevec2scaleby) +- [affineplane.vec2.scaleTo](#affineplanevec2scaleto) - [affineplane.vec2.sum](#affineplanevec2sum) -- [affineplane.vec2.toArray](#affineplanevec2toArray) -- [affineplane.vec2.toPolar](#affineplanevec2toPolar) -- [affineplane.vec2.transformBy](#affineplanevec2transformBy) -- [affineplane.vec2.transitFrom](#affineplanevec2transitFrom) -- [affineplane.vec2.transitTo](#affineplanevec2transitTo) +- [affineplane.vec2.toArray](#affineplanevec2toarray) +- [affineplane.vec2.toPolar](#affineplanevec2topolar) +- [affineplane.vec2.transformBy](#affineplanevec2transformby) +- [affineplane.vec2.transitFrom](#affineplanevec2transitfrom) +- [affineplane.vec2.transitTo](#affineplanevec2transitto) - [affineplane.vec2.unit](#affineplanevec2unit) - [affineplane.vec2.validate](#affineplanevec2validate) @@ -3580,7 +3582,7 @@ Aliases: [affineplane.vector2](#affineplanevector2) Source: [vec2/index.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/index.js) -## affineplane.vec2.add(v, w) +## [affineplane](#affineplane).[vec2](#affineplanevec2).[add](#affineplanevec2add)(v, w) Add two vectors. See vector.sum to add many vectors. @@ -3595,8 +3597,8 @@ Add two vectors. See vector.sum to add many vectors. Source: [add.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/add.js) - -## affineplane.vec2.almostEqual(v, w[, epsilon]) + +## [affineplane](#affineplane).[vec2](#affineplanevec2).[almostEqual](#affineplanevec2almostequal)(v, w[, epsilon]) Test if two vectors v and w are almost equal by the margin of epsilon. @@ -3614,7 +3616,7 @@ Test if two vectors v and w are almost equal by the margin of epsilon. Source: [almostEqual.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/almostEqual.js) -## affineplane.vec2.average(vs) +## [affineplane](#affineplane).[vec2](#affineplanevec2).[average](#affineplanevec2average)(vs) Arithmetic mean of an array of vectors. @@ -3630,7 +3632,7 @@ Aliases: [affineplane.vec2.mean](#affineplanevec2mean) Source: [average.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/average.js) -## affineplane.vec2.copy(v) +## [affineplane](#affineplane).[vec2](#affineplanevec2).[copy](#affineplanevec2copy)(v) Copy vector object. @@ -3644,7 +3646,7 @@ Copy vector object. Source: [copy.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/copy.js) -## affineplane.vec2.create(x, y) +## [affineplane](#affineplane).[vec2](#affineplanevec2).[create](#affineplanevec2create)(x, y) Create a vector object `{ x, y }`. @@ -3660,7 +3662,7 @@ Create a vector object `{ x, y }`. Source: [create.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/create.js) -## affineplane.vec2.cross(v, w) +## [affineplane](#affineplane).[vec2](#affineplanevec2).[cross](#affineplanevec2cross)(v, w) The magnitude of cross product of two 2D vectors. While in 3D, the cross product returns a perpendicular vector, in 2D we must @@ -3678,7 +3680,7 @@ settle for a scalar result, the length of that 3D vector. Source: [cross.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/cross.js) -## affineplane.vec2.difference(v, w) +## [affineplane](#affineplane).[vec2](#affineplanevec2).[difference](#affineplanevec2difference)(v, w) A vector between v and w, in other words, v - w. @@ -3694,7 +3696,7 @@ A vector between v and w, in other words, v - w. Source: [difference.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/difference.js) -## affineplane.vec2.divide(vec, divisor) +## [affineplane](#affineplane).[vec2](#affineplanevec2).[divide](#affineplanevec2divide)(vec, divisor) The division of a vector. Equivalent to multiplying the vector by the inverse of the divisor. @@ -3715,7 +3717,7 @@ The direction of the vector does not change. Source: [divide.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/divide.js) -## affineplane.vec2.dot(v, w) +## [affineplane](#affineplane).[vec2](#affineplanevec2).[dot](#affineplanevec2dot)(v, w) The dot product of two vectors, also called the scalar product. @@ -3732,7 +3734,7 @@ also called the scalar product. Source: [dot.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/dot.js) -## affineplane.vec2.equal(v, w) +## [affineplane](#affineplane).[vec2](#affineplanevec2).[equal](#affineplanevec2equal)(v, w) Test if vectors v,w are equal @@ -3747,8 +3749,8 @@ Test if vectors v,w are equal Source: [equal.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/equal.js) - -## affineplane.vec2.fromArray(arrp) + +## [affineplane](#affineplane).[vec2](#affineplanevec2).[fromArray](#affineplanevec2fromarray)(arrp) Create `{ x, y }` vector from array `[x, y]`. @@ -3761,8 +3763,8 @@ Create `{ x, y }` vector from array `[x, y]`. Source: [fromArray.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/fromArray.js) - -## affineplane.vec2.fromPolar(magnitude, direction) + +## [affineplane](#affineplane).[vec2](#affineplanevec2).[fromPolar](#affineplanevec2frompolar)(magnitude, direction) Create a vector from polar coordinates. @@ -3778,7 +3780,7 @@ Create a vector from polar coordinates. Source: [fromPolar.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/fromPolar.js) -## affineplane.vec2.independent(v, w) +## [affineplane](#affineplane).[vec2](#affineplanevec2).[independent](#affineplanevec2independent)(v, w) Test if the two vectors are [linearly independent]( https://en.wikipedia.org/wiki/Linear_independence) or almost so @@ -3796,7 +3798,7 @@ within the margin of [affineplane.epsilon](#affineplaneepsilon). Source: [independent.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/independent.js) -## affineplane.vec2.invert(v) +## [affineplane](#affineplane).[vec2](#affineplanevec2).[invert](#affineplanevec2invert)(v) Negate the vector. For example `inverse({ x: 1, y: -1 })` returns `{ x: -1, y: 1 }`. @@ -3813,7 +3815,7 @@ Aliases: [affineplane.vec2.negate](#affineplanevec2negate) Source: [inverse.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/inverse.js) -## affineplane.vec2.magnitude(v) +## [affineplane](#affineplane).[vec2](#affineplanevec2).[magnitude](#affineplanevec2magnitude)(v) The length of the vector. @@ -3829,7 +3831,7 @@ Aliases: [affineplane.vec2.norm](#affineplanevec2norm) Source: [magnitude.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/magnitude.js) -## affineplane.vec2.max(v, w) +## [affineplane](#affineplane).[vec2](#affineplanevec2).[max](#affineplanevec2max)(v, w) Element-wise maximum of two vectors. @@ -3845,14 +3847,14 @@ Element-wise maximum of two vectors. Source: [max.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/max.js) -## affineplane.vec2.mean(vs) +## [affineplane](#affineplane).[vec2](#affineplanevec2).[mean](#affineplanevec2mean)(vs) Alias of [affineplane.vec2.average](#affineplanevec2average) Source: [average.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/average.js) -## affineplane.vec2.min(v, w) +## [affineplane](#affineplane).[vec2](#affineplanevec2).[min](#affineplanevec2min)(v, w) Element-wise minimum of two vectors @@ -3868,28 +3870,28 @@ Element-wise minimum of two vectors Source: [min.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/min.js) -## affineplane.vec2.negate +## [affineplane](#affineplane).[vec2](#affineplanevec2).[negate](#affineplanevec2negate) Alias of [affineplane.vec2.invert](#affineplanevec2invert) Source: [inverse.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/inverse.js) -## affineplane.vec2.norm +## [affineplane](#affineplane).[vec2](#affineplanevec2).[norm](#affineplanevec2norm) Alias of [affineplane.vec2.magnitude](#affineplanevec2magnitude) Source: [magnitude.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/magnitude.js) -## affineplane.vec2.normalize +## [affineplane](#affineplane).[vec2](#affineplanevec2).[normalize](#affineplanevec2normalize) Alias of [affineplane.vec2.unit](#affineplanevec2unit) Source: [unit.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/unit.js) - -## affineplane.vec2.projectTo(v, plane[, camera]) + +## [affineplane](#affineplane).[vec2](#affineplanevec2).[projectTo](#affineplanevec2projectto)(v, plane[, camera]) Project a vector onto another plane. If camera is given, project perspectively. @@ -3908,8 +3910,8 @@ Otherwise, project orthogonally. Source: [projectTo.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/projectTo.js) - -## affineplane.vec2.rotateBy(v, radians) + +## [affineplane](#affineplane).[vec2](#affineplanevec2).[rotateBy](#affineplanevec2rotateby)(v, radians) Rotate vector by the given angle. @@ -3924,8 +3926,8 @@ Rotate vector by the given angle. Source: [rotateBy.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/rotateBy.js) - -## affineplane.vec2.rotateTo(v, radians) + +## [affineplane](#affineplane).[vec2](#affineplanevec2).[rotateTo](#affineplanevec2rotateto)(v, radians) Rotate vector so that it points to the given angle. @@ -3940,8 +3942,8 @@ Rotate vector so that it points to the given angle. Source: [rotateTo.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/rotateTo.js) - -## affineplane.vec2.scaleBy(vec, multiplier) + +## [affineplane](#affineplane).[vec2](#affineplanevec2).[scaleBy](#affineplanevec2scaleby)(vec, multiplier) The scalar multiplication of a vector. Scale the vector by a multiplier. @@ -3958,8 +3960,8 @@ The direction of the vector does not change. Source: [scaleBy.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/scaleBy.js) - -## affineplane.vec2.scaleTo(vec, magnitude) + +## [affineplane](#affineplane).[vec2](#affineplanevec2).[scaleTo](#affineplanevec2scaleto)(vec, magnitude) Scale the vector to a certain length. The direction of the vector does not change. @@ -3977,7 +3979,7 @@ As an exception, zero vector length remains zero. Source: [scaleTo.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/scaleTo.js) -## affineplane.vec2.sum(vs) +## [affineplane](#affineplane).[vec2](#affineplanevec2).[sum](#affineplanevec2sum)(vs) Add an array of vectors together. See [affineplane.vec2.add](#affineplanevec2add) to add two vectors together. @@ -3991,8 +3993,8 @@ See [affineplane.vec2.add](#affineplanevec2add) to add two vectors together. Source: [sum.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/sum.js) - -## affineplane.vec2.toArray(v) + +## [affineplane](#affineplane).[vec2](#affineplanevec2).[toArray](#affineplanevec2toarray)(v) Get the vector object as an array. @@ -4005,8 +4007,8 @@ Get the vector object as an array. Source: [toArray.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/toArray.js) - -## affineplane.vec2.toPolar(v) + +## [affineplane](#affineplane).[vec2](#affineplanevec2).[toPolar](#affineplanevec2topolar)(v) Get polar coordinates of a vector. @@ -4019,8 +4021,8 @@ Get polar coordinates of a vector. Source: [toPolar.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/toPolar.js) - -## affineplane.vec2.transformBy(vec, tr) + +## [affineplane](#affineplane).[vec2](#affineplanevec2).[transformBy](#affineplanevec2transformby)(vec, tr) Transform a vector. Translation does not affect the vector. @@ -4035,8 +4037,8 @@ Transform a vector. Translation does not affect the vector. Source: [transformBy.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/transformBy.js) - -## affineplane.vec2.transitFrom(vec, plane) + +## [affineplane](#affineplane).[vec2](#affineplanevec2).[transitFrom](#affineplanevec2transitfrom)(vec, plane) Transit a [vec2](#affineplanevec2) from the source plane to the reference plane. @@ -4054,8 +4056,8 @@ only scaling and rotation do. Source: [transitFrom.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/transitFrom.js) - -## affineplane.vec2.transitTo(vec, plane) + +## [affineplane](#affineplane).[vec2](#affineplanevec2).[transitTo](#affineplanevec2transitto)(vec, plane) Transit a [vec2](#affineplanevec2) to a target plane. In other words, represent the [vec2](#affineplanevec2) @@ -4074,7 +4076,7 @@ Translation of the plane does not affect the vector. Source: [transitTo.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/transitTo.js) -## affineplane.vec2.unit(v) +## [affineplane](#affineplane).[vec2](#affineplanevec2).[unit](#affineplanevec2unit)(v) Get unit vector parallel to the given vector. The magnitude of unit vector is equal to one. @@ -4092,7 +4094,7 @@ Aliases: [affineplane.vec2.normalize](#affineplanevec2normalize) Source: [unit.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/unit.js) -## affineplane.vec2.validate(v) +## [affineplane](#affineplane).[vec2](#affineplanevec2).[validate](#affineplanevec2validate)(v) Check if object is a valid [vec2](#affineplanevec2). @@ -4106,14 +4108,14 @@ Check if object is a valid [vec2](#affineplanevec2). Source: [validate.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/validate.js) -## affineplane.vec3 +## [affineplane](#affineplane).[vec3](#affineplanevec3) Three-dimensional vector. Aliases: [affineplane.vector3](#affineplanevector3) - [affineplane.vec3.add](#affineplanevec3add) -- [affineplane.vec3.almostEqual](#affineplanevec3almostEqual) +- [affineplane.vec3.almostEqual](#affineplanevec3almostequal) - [affineplane.vec3.average](#affineplanevec3average) - [affineplane.vec3.copy](#affineplanevec3copy) - [affineplane.vec3.create](#affineplanevec3create) @@ -4123,27 +4125,27 @@ Aliases: [affineplane.vector3](#affineplanevector3) - [affineplane.vec3.divide](#affineplanevec3divide) - [affineplane.vec3.dot](#affineplanevec3dot) - [affineplane.vec3.equal](#affineplanevec3equal) -- [affineplane.vec3.fromArray](#affineplanevec3fromArray) -- [affineplane.vec3.fromPolar](#affineplanevec3fromPolar) -- [affineplane.vec3.fromSpherical](#affineplanevec3fromSpherical) +- [affineplane.vec3.fromArray](#affineplanevec3fromarray) +- [affineplane.vec3.fromPolar](#affineplanevec3frompolar) +- [affineplane.vec3.fromSpherical](#affineplanevec3fromspherical) - [affineplane.vec3.independent](#affineplanevec3independent) - [affineplane.vec3.invert](#affineplanevec3invert) - [affineplane.vec3.magnitude](#affineplanevec3magnitude) - [affineplane.vec3.negate](#affineplanevec3negate) - [affineplane.vec3.normalize](#affineplanevec3normalize) -- [affineplane.vec3.projectTo](#affineplanevec3projectTo) -- [affineplane.vec3.rotateBy](#affineplanevec3rotateBy) -- [affineplane.vec3.rotateBy](#affineplanevec3rotateBy) -- [affineplane.vec3.scaleBy](#affineplanevec3scaleBy) -- [affineplane.vec3.scaleTo](#affineplanevec3scaleTo) +- [affineplane.vec3.projectTo](#affineplanevec3projectto) +- [affineplane.vec3.rotateBy](#affineplanevec3rotateby) +- [affineplane.vec3.rotateBy](#affineplanevec3rotateby) +- [affineplane.vec3.scaleBy](#affineplanevec3scaleby) +- [affineplane.vec3.scaleTo](#affineplanevec3scaleto) - [affineplane.vec3.subtract](#affineplanevec3subtract) - [affineplane.vec3.sum](#affineplanevec3sum) -- [affineplane.vec3.toArray](#affineplanevec3toArray) -- [affineplane.vec3.toPolar](#affineplanevec3toPolar) -- [affineplane.vec3.toSpherical](#affineplanevec3toSpherical) -- [affineplane.vec3.transformBy](#affineplanevec3transformBy) -- [affineplane.vec3.transitFrom](#affineplanevec3transitFrom) -- [affineplane.vec3.transitTo](#affineplanevec3transitTo) +- [affineplane.vec3.toArray](#affineplanevec3toarray) +- [affineplane.vec3.toPolar](#affineplanevec3topolar) +- [affineplane.vec3.toSpherical](#affineplanevec3tospherical) +- [affineplane.vec3.transformBy](#affineplanevec3transformby) +- [affineplane.vec3.transitFrom](#affineplanevec3transitfrom) +- [affineplane.vec3.transitTo](#affineplanevec3transitto) - [affineplane.vec3.unit](#affineplanevec3unit) - [affineplane.vec3.validate](#affineplanevec3validate) @@ -4151,7 +4153,7 @@ Aliases: [affineplane.vector3](#affineplanevector3) Source: [vec3/index.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/index.js) -## affineplane.vec3.add(v, w) +## [affineplane](#affineplane).[vec3](#affineplanevec3).[add](#affineplanevec3add)(v, w) **Parameters:** - *v* @@ -4164,8 +4166,8 @@ Source: [vec3/index.js](https://github.com/axelpale/affineplane/blob/main/lib/ve Source: [add.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/add.js) - -## affineplane.vec3.almostEqual(v, w[, epsilon]) + +## [affineplane](#affineplane).[vec3](#affineplanevec3).[almostEqual](#affineplanevec3almostequal)(v, w[, epsilon]) Test if vectors are almost equal by the margin of epsilon. @@ -4184,7 +4186,7 @@ Test if vectors are almost equal by the margin of epsilon. Source: [almostEqual.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/almostEqual.js) -## affineplane.vec3.average(vs) +## [affineplane](#affineplane).[vec3](#affineplanevec3).[average](#affineplanevec3average)(vs) Arithmetic mean of an array of vectors. @@ -4198,7 +4200,7 @@ Arithmetic mean of an array of vectors. Source: [average.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/average.js) -## affineplane.vec3.copy(v) +## [affineplane](#affineplane).[vec3](#affineplanevec3).[copy](#affineplanevec3copy)(v) Clone the vector object. @@ -4212,7 +4214,7 @@ Clone the vector object. Source: [copy.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/copy.js) -## affineplane.vec3.create(x, y, z) +## [affineplane](#affineplane).[vec3](#affineplanevec3).[create](#affineplanevec3create)(x, y, z) **Parameters:** - *x* @@ -4228,7 +4230,7 @@ Source: [copy.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/cop Source: [create.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/create.js) -## affineplane.vec3.cross(v, w) +## [affineplane](#affineplane).[vec3](#affineplanevec3).[cross](#affineplanevec3cross)(v, w) The cross product of two 3D vectors. Returns a vector perpendicular to the given vectors. In other words, the result will be normal @@ -4246,14 +4248,14 @@ to the plane span by the given vectors. Source: [cross.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/cross.js) -## affineplane.vec3.diff(v, w) +## [affineplane](#affineplane).[vec3](#affineplanevec3).[diff](#affineplanevec3diff)(v, w) Alias of [affineplane.vec3.difference](#affineplanevec3difference), [affineplane.vec3.subtract](#affineplanevec3subtract) Source: [difference.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/difference.js) -## affineplane.vec3.difference(v, w) +## [affineplane](#affineplane).[vec3](#affineplanevec3).[difference](#affineplanevec3difference)(v, w) Get the vector v - w. In other words, if we place v, w to begin from the same point then the result is a vector @@ -4273,7 +4275,7 @@ Aliases: [affineplane.vec3.diff](#affineplanevec3diff), [affineplane.vec3.subtra Source: [difference.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/difference.js) -## affineplane.vec3.divide(vec, divisor) +## [affineplane](#affineplane).[vec3](#affineplanevec3).[divide](#affineplanevec3divide)(vec, divisor) The division of a vector. Equivalent to multiplying the vector by the inverse of the divisor. @@ -4291,7 +4293,7 @@ The direction of the vector does not change. Source: [divide.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/divide.js) -## affineplane.vec3.dot(v, w) +## [affineplane](#affineplane).[vec3](#affineplanevec3).[dot](#affineplanevec3dot)(v, w) Dot product of two vectors, also called the scalar product. @@ -4308,7 +4310,7 @@ also called the scalar product. Source: [dot.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/dot.js) -## affineplane.vec3.equal(v, w) +## [affineplane](#affineplane).[vec3](#affineplanevec3).[equal](#affineplanevec3equal)(v, w) Test if vectors v, w are equal in value. @@ -4323,8 +4325,8 @@ Test if vectors v, w are equal in value. Source: [equal.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/equal.js) - -## affineplane.vec3.fromArray(arrv) + +## [affineplane](#affineplane).[vec3](#affineplanevec3).[fromArray](#affineplanevec3fromarray)(arrv) Create a [vec3](#affineplanevec3) from an array `[x, y, z]`. @@ -4340,11 +4342,11 @@ Create a [vec3](#affineplanevec3) from an array `[x, y, z]`. Source: [fromArray.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/fromArray.js) - -## affineplane.vec3.fromPolar(magnitude, direction, depth) + +## [affineplane](#affineplane).[vec3](#affineplanevec3).[fromPolar](#affineplanevec3frompolar)(magnitude, direction, depth) Create a vector from cylindrical polar coordinates. -See also [affineplane.vec3.toPolar](#affineplanevec3toPolar). +See also [affineplane.vec3.toPolar](#affineplanevec3topolar). **Parameters:** - *magnitude* @@ -4359,11 +4361,11 @@ See also [affineplane.vec3.toPolar](#affineplanevec3toPolar). Source: [fromPolar.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/fromPolar.js) - -## affineplane.vec3.fromSpherical(magnitude, roll, pitch) + +## [affineplane](#affineplane).[vec3](#affineplanevec3).[fromSpherical](#affineplanevec3fromspherical)(magnitude, roll, pitch) Create a vector from spherical polar coordinates. -See also [affineplane.vec3.toSpherical](#affineplanevec3toSpherical). +See also [affineplane.vec3.toSpherical](#affineplanevec3tospherical). **Parameters:** - *magnitude* @@ -4379,7 +4381,7 @@ See also [affineplane.vec3.toSpherical](#affineplanevec3toSpherical). Source: [fromSpherical.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/fromSpherical.js) -## affineplane.vec3.independent(v, w) +## [affineplane](#affineplane).[vec3](#affineplanevec3).[independent](#affineplanevec3independent)(v, w) Test if the two vectors are [linearly independent]( https://en.wikipedia.org/wiki/Linear_independence) or almost so @@ -4397,7 +4399,7 @@ within the margin of [affineplane.epsilon](#affineplaneepsilon). Source: [independent.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/independent.js) -## affineplane.vec3.invert(v) +## [affineplane](#affineplane).[vec3](#affineplanevec3).[invert](#affineplanevec3invert)(v) Get the vector -v. @@ -4413,7 +4415,7 @@ Aliases: [affineplane.vec3.negate](#affineplanevec3negate) Source: [invert.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/invert.js) -## affineplane.vec3.magnitude(v) +## [affineplane](#affineplane).[vec3](#affineplanevec3).[magnitude](#affineplanevec3magnitude)(v) The euclidean length of the vector. @@ -4427,21 +4429,21 @@ The euclidean length of the vector. Source: [magnitude.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/magnitude.js) -## affineplane.vec3.negate +## [affineplane](#affineplane).[vec3](#affineplanevec3).[negate](#affineplanevec3negate) Alias of [affineplane.vec3.invert](#affineplanevec3invert) Source: [invert.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/invert.js) -## affineplane.vec3.normalize +## [affineplane](#affineplane).[vec3](#affineplanevec3).[normalize](#affineplanevec3normalize) Alias of [affineplane.vec3.unit](#affineplanevec3unit) Source: [unit.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/unit.js) - -## affineplane.vec3.projectTo(vec, plane) + +## [affineplane](#affineplane).[vec3](#affineplanevec3).[projectTo](#affineplanevec3projectto)(vec, plane) Project a 3D vector onto a 2D plane orthogonally. We cannot project 3D vectors perspectively because @@ -4460,8 +4462,8 @@ for perspective projection of a vector with fixed position. Source: [projectTo.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/projectTo.js) - -## affineplane.vec3.rotateBy(v, roll[, pitch]) + +## [affineplane](#affineplane).[vec3](#affineplanevec3).[rotateBy](#affineplanevec3rotateby)(v, roll[, pitch]) Rotate vector by the given radian angles. Roll is applied before pitch. @@ -4479,8 +4481,8 @@ Roll is applied before pitch. Source: [rotateBy.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/rotateBy.js) - -## affineplane.vec3.rotateBy(v, roll[, pitch]) + +## [affineplane](#affineplane).[vec3](#affineplanevec3).[rotateBy](#affineplanevec3rotateby)(v, roll[, pitch]) Rotate vector so that it points to the given radian angles. The vector magnitude is preserved. @@ -4499,8 +4501,8 @@ Roll is applied before pitch. Source: [rotateTo.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/rotateTo.js) - -## affineplane.vec3.scaleBy(vec, multiplier) + +## [affineplane](#affineplane).[vec3](#affineplanevec3).[scaleBy](#affineplanevec3scaleby)(vec, multiplier) The scalar multiplication of a vector. Scale the vector by a multiplier. @@ -4517,8 +4519,8 @@ The direction of the vector does not change. Source: [scaleBy.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/scaleBy.js) - -## affineplane.vec3.scaleTo(vec, magnitude) + +## [affineplane](#affineplane).[vec3](#affineplanevec3).[scaleTo](#affineplanevec3scaleto)(vec, magnitude) Scale the vector to a certain length. The direction of the vector does not change. @@ -4536,14 +4538,14 @@ As an exception, zero vector length remains zero. Source: [scaleTo.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/scaleTo.js) -## affineplane.vec3.subtract +## [affineplane](#affineplane).[vec3](#affineplanevec3).[subtract](#affineplanevec3subtract) Alias of [affineplane.vec3.difference](#affineplanevec3difference), [affineplane.vec3.diff](#affineplanevec3diff) Source: [difference.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/difference.js) -## affineplane.vec3.sum(vs) +## [affineplane](#affineplane).[vec3](#affineplanevec3).[sum](#affineplanevec3sum)(vs) Add an array of vectors together. See [affineplane.vec3.add](#affineplanevec3add) to add two vectors together. @@ -4557,8 +4559,8 @@ See [affineplane.vec3.add](#affineplanevec3add) to add two vectors together. Source: [sum.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/sum.js) - -## affineplane.vec3.toArray(v) + +## [affineplane](#affineplane).[vec3](#affineplanevec3).[toArray](#affineplanevec3toarray)(v) Convert vector to array with elements `[x, y, z]`. @@ -4571,8 +4573,8 @@ Convert vector to array with elements `[x, y, z]`. Source: [toArray.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/toArray.js) - -## affineplane.vec3.toPolar(v) + +## [affineplane](#affineplane).[vec3](#affineplanevec3).[toPolar](#affineplanevec3topolar)(v) Get cylindrical polar coordinates of a vector. @@ -4591,11 +4593,11 @@ Get cylindrical polar coordinates of a vector. Source: [toPolar.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/toPolar.js) - -## affineplane.vec3.toSpherical(v) + +## [affineplane](#affineplane).[vec3](#affineplanevec3).[toSpherical](#affineplanevec3tospherical)(v) Get spherical polar coordinates for a vector. -See also [affineplane.vec3.fromSpherical](#affineplanevec3fromSpherical). +See also [affineplane.vec3.fromSpherical](#affineplanevec3fromspherical). **Parameters:** - *v* @@ -4612,8 +4614,8 @@ See also [affineplane.vec3.fromSpherical](#affineplanevec3fromSpherical). Source: [toSpherical.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/toSpherical.js) - -## affineplane.vec3.transformBy(vec, tr) + +## [affineplane](#affineplane).[vec3](#affineplanevec3).[transformBy](#affineplanevec3transformby)(vec, tr) Transform a vector. Translation does not affect the vector. @@ -4628,8 +4630,8 @@ Transform a vector. Translation does not affect the vector. Source: [transformBy.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/transformBy.js) - -## affineplane.vec3.transitFrom(vec, plane) + +## [affineplane](#affineplane).[vec3](#affineplanevec3).[transitFrom](#affineplanevec3transitfrom)(vec, plane) Represent the vector on the reference plane without losing information. @@ -4646,8 +4648,8 @@ Note that plane translation does not affect vectors. Source: [transitFrom.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/transitFrom.js) - -## affineplane.vec3.transitTo(vec, plane) + +## [affineplane](#affineplane).[vec3](#affineplanevec3).[transitTo](#affineplanevec3transitto)(vec, plane) Represent the vec on the target plane without losing information. @@ -4664,7 +4666,7 @@ without losing information. Source: [transitTo.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/transitTo.js) -## affineplane.vec3.unit(v) +## [affineplane](#affineplane).[vec3](#affineplanevec3).[unit](#affineplanevec3unit)(v) Get unit vector parallel to the given vector. The magnitude of unit vector is equal to one. @@ -4682,7 +4684,7 @@ Aliases: [affineplane.vec3.normalize](#affineplanevec3normalize) Source: [unit.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/unit.js) -## affineplane.vec3.validate(v) +## [affineplane](#affineplane).[vec3](#affineplanevec3).[validate](#affineplanevec3validate)(v) Check if object is a valid [vec3](#affineplanevec3). @@ -4696,21 +4698,21 @@ Check if object is a valid [vec3](#affineplanevec3). Source: [validate.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/validate.js) -## affineplane.vector2 +## [affineplane](#affineplane).[vector2](#affineplanevector2) Alias of [affineplane.vec2](#affineplanevec2) Source: [vec2/index.js](https://github.com/axelpale/affineplane/blob/main/lib/vec2/index.js) -## affineplane.vector3 +## [affineplane](#affineplane).[vector3](#affineplanevector3) Alias of [affineplane.vec3](#affineplanevec3) Source: [vec3/index.js](https://github.com/axelpale/affineplane/blob/main/lib/vec3/index.js) -## affineplane.version +## [affineplane](#affineplane).[version](#affineplaneversion) Package version string, for example `'1.2.3'`. Uses semantic versioning.