Constructs a mutable instance of Geometric2 from coordinates and an optional unit of measure.
Optional
coords: [a: number, x: number, y: number, b: number]The 4 coordinates are in the order [a, x, y, b].
Optional
uom: UnitThe optional unit of measure.
Static
Readonly
IConstructs a basis vector corresponding to the β
coordinate.
The returned multivector is locked.
Static
Readonly
ampereSI base unit of electric current. The ampere is that constant current which, if maintained in two straight parallel conductors of infinite length, of negligible circular cross-section, and placed 1 meter apart in vacuum, would produce between these conductors a force equal to 2 x 10-7 newton per meter of length.
Static
Readonly
candelaSI base unit of luminous intensity. The candela is the luminous intensity, in a given direction, of a source that emits monochromatic radiation of frequency 540 x 1012 hertz and that has a radiant intensity in that direction of 1 / 683 watt per steradian.
Static
Readonly
coulombSI derived unit of electric charge, quantity of electricity.
Static
Readonly
e1Constructs a basis vector corresponding to the x
coordinate.
The returned multivector is locked.
Static
Readonly
e2Constructs a basis vector corresponding to the y
coordinate.
The returned multivector is locked.
Static
Readonly
jouleSI derived unit of energy, work, quantity of heat.
Static
Readonly
kelvinSI base unit of thermodynamic temperature. The kelvin, unit of thermodynamic temperature, is the fraction 1 / 273.16 of the thermodynamic temperature of the triple point of water.
Static
Readonly
kilogramSI base unit of mass. The kilogram is the unit of mass; it is equal to the mass of the international prototype of the kilogram.
Static
Readonly
meterSI base unit of length. The meter is the length of the path travelled by light in vacuum during a time interval of 1 / 299 792 458 of a second.
Static
Readonly
moleSI base unit of amount of substance.
The mole is the amount of substance of a system which contains as many elementary entities as there are atoms in 0.012 kilogram of carbon 12; its symbol is "mol."
When the mole is used, the elementary entities must be specified and may be atoms, molecules, ions, electrons, other particles, or specified groups of such particles.
Static
Readonly
newtonSI derived unit of force.
Static
Readonly
oneConstructs a Geometric2 representing the number one. The identity element for multiplication, 1. The returned multivector is locked.
Static
Readonly
secondSI base unit of time. The second is the duration of 9 192 631 770 periods of the radiation corresponding to the transition between the two hyperfine levels of the ground state of the cesium 133 atom.
Static
Readonly
zeroConstructs a Geometric2 representing the number zero. The identity element for addition, 0. The returned multivector is locked.
The scalar part of this multivector.
The pseudoscalar part of this multivector.
A bitmask describing the grades.
0x0 = zero 0x1 = scalar 0x2 = vector 0x4 = bivector 0x8 = pseudoscalar
The coordinate corresponding to the e1 standard basis vector.
The coordinate corresponding to the e2 standard basis vector.
Adds a multivector value to this multivector with optional scaling.
The multivector to be added to this multivector.
Optional
α: numberAn optional scale factor that multiplies the multivector argument.
this + M * α
Optional
uom: UnitAdds a multiple of a scalar to this multivector.
The scalar value to be added to this multivector.
Optional
uom: UnitThe optional unit of measure.
Optional
α: numberThe fraction of (a * uom) to be added. Default is 1.
this + (a * uom) * α
The vector to be added to this multivector.
Optional
α: numberAn optional scale factor that multiplies the vector argument.
this + v * α
copy(this)
Sets this multivector to the value of the scalar, α. The non-scalar components are set to zero.
The scalar to be copied.
The unit of measure.
this / magnitude(this)
The multivector dividend.
this / m;
Optional
uom: Unit
this ⟼ this / (α * uom)
The scalar dividend.
The unit of measure.
this ^ m
Computes the right inverse of this multivector. inv(X) satisfies X * inv(X) = 1.
inverse(this)
Computes the square root of the squared norm.
this * m
this * α
this * (α * uom)
this * -1
If this
is mutable, then sets this
multivector to its reflection in the plane orthogonal to vector n. The result is mutable.
If this
is immutable (locked), a copy of this
is made, which is then reflected. The result is immutable (locked).
i.e. The result is mutable (unlocked) iff this
is mutable (unlocked).
Mathematically,
this ⟼ - n * this * n
Geometrically,
Reflects this multivector in the plane orthogonal to the unit vector, n. This implementation does assume that n is a vector, but does not assume that it is normalized to unity.
If n is not a unit vector then the result is scaled by n squared. The scalar component gets an extra minus sign. The pseudoscalar component does not change sign. The units of measure are carried through but in most cases n SHOULD be dimensionless.
The unit vector that defines the reflection plane.
reverse has a ++-- structure on the grades. The scalar component, a, will not change. The vector components, x and y, will not change. The bivector component, b, will change sign.
(α + βI)(a + x.e1 + y.e2 + b.I)(α - β.I)
the spinor that rotates this multivector.
R * this * reverse(R)
Computes a rotor, R, from two unit vectors, where R = (|b||a| + b * a) / sqrt(2 * |b||a|(|b||a| + b << a))
The result is independent of the magnitudes of a and b.
The starting vector
The ending vector
The rotor representing a rotation from a to b.
Sets this multivector to a rotor that rotates through angle θ in the oriented plane defined by B.
The (unit) bivector generating the rotation.
The rotation angle in radians when the rotor is applied on both sides as R * M * ~R
R = sqrt(|b|/|a|) * (|b||a| + b * a) / sqrt(2 * |b||a|(|b||a| + b << a))
The result is depends on the magnitudes of a and b.
this | m
Optional
α: numberthis - M * α
Subtracts a multiple of a scalar from this multivector.
The scalar value to be subtracted from this multivector.
Optional
uom: UnitThe optional unit of measure.
Optional
α: numberThe fraction of (a * uom) to be subtracted. Default is 1.
this - (a * uom) * α
The vector to subtract from this multivector.
Optional
α: numberThe multiplier for the amount of the vector to subtract.
this - v * α
Sets this Geometric2 to have the specified cartesian coordinates and unit of measure.
this.a ⟼ 0, this.x ⟼ x, this.y ⟼ y, this.b ⟼ 0, this.uom ⟼ uom
The cartesian x coordinate corresponding to the e1 basis vector.
The cartesian y coordinate corresponding to the e2 basis vector.
Optional
uom: UnitThe optional unit of measure.
this Geometric2.
An Error if this Geometric2 is not mutable.
Static
bivectorCreates a grade 2 (bivector) multivector from the specified cartesian coordinates. The bivector returned is in the unlocked (mutable) state.
The coordinate corresponding to the e1e2 basis bivector.
Optional
uom: UnitThe optional unit of measure. Equivalent to 1 if omitted.
Static
copyStatic
fromStatic
fromStatic
fromStatic
fromStatic
rotorStatic
rotorStatic
scalarCreates a grade 0 (scalar) multivector with value alpha * uom
.
The scalar returned is in the unlocked (mutable) state.
The scaling factor for the unit of measure.
Optional
uom: UnitThe optional unit of measure. Equivalent to 1 if omitted.
Static
spinorCreates a spinor valued multivector from the specified cartesian coordinates. The spinor returned is in the unlocked (mutable) state.
The scalar coordinate.
The pseudoscalar coordinate.
Optional
uom: UnitThe optional unit of measure. Equivalent to 1 if omitted.
Static
vectorCreates a grade 1 (vector) multivector from the specified cartesian coordinates.
The coordinate corresponding to the e1 basis vector.
The coordinate corresponding to the e2 basis vector.
Optional
uom: UnitThe optional unit of measure. Equivalent to 1 if omitted.
Generated using TypeDoc
A mutable and lockable multivector in 2D with a Euclidean metric and optional unit of measure.