Class Geometric3

A mutable and lockable multivector in 3D with a Euclidean metric and optional unit of measure.

Hierarchy

  • AbstractMeasure
    • Geometric3

Constructors

  • Constructs a mutable instance of Geometric3 from coordinates and an optional unit of measure.

    Parameters

    • Optional coords: [a: number, x: number, y: number, z: number, xy: number, yz: number, zx: number, b: number]

      The 8 coordinates are in the order [a, x, y, z, xy, yz, zx, b].

    • Optional uom: Unit

      The optional unit of measure.

    Returns Geometric3

Properties

Constructs a basis vector corresponding to the β coordinate. The returned multivector is locked.

ampere: Geometric3

SI 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.

candela: Geometric3

SI 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.

coulomb: Geometric3

SI derived unit of electric charge, quantity of electricity.

Constructs a basis vector corresponding to the x coordinate. The returned multivector is locked.

Constructs a basis vector corresponding to the y coordinate. The returned multivector is locked.

Constructs a basis vector corresponding to the z coordinate. The returned multivector is locked.

joule: Geometric3

SI derived unit of energy, work, quantity of heat.

kelvin: Geometric3

SI 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.

kilogram: Geometric3

SI base unit of mass. The kilogram is the unit of mass; it is equal to the mass of the international prototype of the kilogram.

meter: Geometric3

SI 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.

SI base unit of amount of substance.

  1. 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."

  2. 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.

newton: Geometric3

SI derived unit of force.

Constructs a Geometric3 representing the number one. The identity element for multiplication, 1. The returned multivector is locked.

second: Geometric3

SI 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.

Constructs a Geometric3 representing the number zero. The identity element for addition, 0. The returned multivector is locked.

Accessors

  • get a(): number
  • The scalar part of this multivector.

    Returns number

  • set a(a): void
  • Parameters

    • a: number

    Returns void

  • get b(): number
  • The pseudoscalar part of this multivector.

    Returns number

  • set b(b): void
  • Parameters

    • b: number

    Returns void

  • get grades(): number
  • A bitmask describing the grades.

    0x0 = zero 0x1 = scalar 0x2 = vector 0x4 = bivector 0x8 = pseudoscalar

    Returns number

  • get uom(): Unit
  • Returns Unit

  • set uom(uom): void
  • Parameters

    Returns void

  • get x(): number
  • The coordinate corresponding to the e1 standard basis vector.

    Returns number

  • set x(x): void
  • Parameters

    • x: number

    Returns void

  • get xy(): number
  • The coordinate corresponding to the e1e2 standard basis bivector.

    Returns number

  • set xy(xy): void
  • Parameters

    • xy: number

    Returns void

  • get y(): number
  • The coordinate corresponding to the e2 standard basis vector.

    Returns number

  • set y(y): void
  • Parameters

    • y: number

    Returns void

  • get yz(): number
  • The coordinate corresponding to the e2e3 standard basis bivector.

    Returns number

  • set yz(yz): void
  • Parameters

    • yz: number

    Returns void

  • get z(): number
  • The coordinate corresponding to the e3 standard basis vector.

    Returns number

  • set z(z): void
  • Parameters

    • z: number

    Returns void

  • get zx(): number
  • The coordinate corresponding to the e3e1 standard basis bivector.

    Returns number

  • set zx(zx): void
  • Parameters

    • zx: number

    Returns void

Methods

  • Adds a multivector value to this multivector with optional scaling.

    Parameters

    • M: GeometricE3

      The multivector to be added to this multivector.

    • Optional α: number

      An optional scale factor that multiplies the multivector argument.

    Returns Geometric3

    this + M * α

  • Adds a pseudoscalar value to this multivector.

    Parameters

    • β: number

      The pseudoscalar value to be added to this multivector.

    • Optional uom: Unit

      The optional unit of measure.

    Returns Geometric3

    this + (Iβ * uom)

  • Adds a scalar value to this multivector.

    Parameters

    • a: number
    • Optional uom: Unit

      The optional unit of measure.

    • Optional α: number

      The scalar value to be added to this multivector.

    Returns Geometric3

    this + (α * uom)

  • Returns Geometric3

    copy(this)

  • Clifford conjugation

    Returns Geometric3

  • this ⟼ copy(M)

    Parameters

    • M: GeometricE3

      The multivector to be copied.

    Returns this

  • this ⟼ copy(B)

    Parameters

    • B: BivectorE3

      The bivector to be copied.

    Returns this

  • Sets this multivector to the value of the scalar, α. The non-scalar components are set to zero.

    Parameters

    • α: number

      The scalar to be copied.

    • uom: Unit

      The unit of measure.

    Returns this

  • Copies the spinor argument value into this multivector. The non-spinor components are set to zero.

    Parameters

    • spinor: SpinorE3

      The spinor to be copied.

    Returns this

  • Copies the vector argument value into this multivector. The non-vector components are set to zero.

    Parameters

    • vector: VectorE3

      The vector to be copied.

    Returns this

  • Sets this multivector to the generalized vector cross product with another multivector.

    Parameters

    • m: GeometricE3

    Returns Geometric3

    -I * (this ^ m)

  • Returns Geometric3

    this / magnitude(this)

  • Parameters

    • m: GeometricE3

      The multivector dividend.

    Returns Geometric3

    this / m;

  • this ⟼ this / (a * uom)

    Parameters

    • a: number

      The scalar dividend.

    • Optional uom: Unit

      The unit of measure.

    Returns Geometric3

  • Parameters

    • v: VectorE3

    Returns Geometric3

  • dualization: dual(Ak) = Ak << inv(I)

    In an n-dimensional Euclidean space, the inverse is the reverse.

    Returns Geometric3

  • Parameters

    • other: unknown

    Returns boolean

  • Parameters

    • m: GeometricE3

    Returns Geometric3

    this ^ m

  • Sets this multivector to the result of keeping only the specified grade. This is the grade extraction operation.

    Parameters

    • n: number

      the grade to be retained.

    Returns Geometric3

    grade(this, n)

  • Computes the inverse of this multivector.

    Returns Geometric3

    inverse(this)

  • Returns boolean

  • Determines whether this multivector is locked. If the multivector is in the unlocked state then it is mutable. If the multivector is in the locked state then it is immutable.

    Returns boolean

  • Returns boolean

  • Determines whether this multivector is exactly 1 (one).

    Returns boolean

  • Returns boolean

  • Returns boolean

  • Returns boolean

  • Determines whether this multivector is exactly 0 (zero).

    Returns boolean

  • Parameters

    • m: GeometricE3

    Returns Geometric3

    this << m

  • Locks this multivector (preventing any further mutation), and returns a token that may be used to unlock it.

    Returns number

  • Computes the square root of the squared norm.

    Returns Geometric3

  • Returns the geometric product of this multivector with the rhs multivector.

    Parameters

    • rhs: GeometricE3

      The operand on the right hand side of the * operator.

    Returns Geometric3

    this * rhs

  • Parameters

    • B: BivectorE3

    Returns Geometric3

  • Parameters

    • α: number
    • Optional uom: Unit

    Returns Geometric3

    this * (α * uom)

  • Parameters

    • v: VectorE3

    Returns Geometric3

  • Returns Geometric3

    this * -1

  • Sets this multivector to the identity element for multiplication, 1.

    Returns this

  • Returns this

  • Parameters

    • m: GeometricE3

    Returns Geometric3

    this >> m

  • Sets this multivector to its reflection in the plane orthogonal to vector n.

    Mathematically,

    this ⟼ - n * this * n

    Geometrically,

    Reflects this multivector in the plane orthogonal to the unit vector, n.

    If n is not a unit vector then the result is scaled by n squared.

    Parameters

    • n: VectorE3

      The unit vector that defines the reflection plane.

    Returns Geometric3

  • Returns Geometric3

    reverse(this)

  • Parameters

    • R: SpinorE3

      the spinor that rotates this multivector.

    Returns Geometric3

    R * this * reverse(R)

  • Sets this multivector to a rotor that rotates through angle θ around the specified axis.

    Parameters

    • axis: VectorE3

      The (unit) vector defining the rotation aspect and orientation.

    • θ: number

      The rotation angle in radians when the rotor is applied on both sides as R * M * ~R

    Returns this

  • 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.

    Parameters

    • a: VectorE3

      The starting vector

    • b: VectorE3

      The ending vector

    Returns this

    The rotor representing a rotation from a to b.

  • Parameters

    • es: VectorE3[]
    • fs: VectorE3[]

    Returns this

  • Sets this multivector to a rotor that rotates through angle θ in the oriented plane defined by B.

    Parameters

    • B: BivectorE3

      The (unit) bivector generating the rotation.

    • θ: number

      The rotation angle in radians when the rotor is applied on both sides as R * M * ~R

    Returns this

  • R = (|b||a| + b * a) / sqrt(2 * |b||a|(|b||a| + b << a))

    The result is independent of the magnitudes of a and b.

    Parameters

    • a: VectorE3
    • b: VectorE3
    • B: BivectorE3

    Returns this

  • Parameters

    • α: number

    Returns Geometric3

  • Parameters

    • m: GeometricE3

    Returns Geometric3

    this | m

  • Currently limited to taking the square root of a positive scalar quantity.

    Returns Geometric3

  • Computes the squared norm of this multivector.

    This is an alias for the quaditude method.

    Returns Geometric3

  • Parameters

    • M: GeometricE3
    • Optional α: number

    Returns Geometric3

    this - M * α

  • Subtracts a multiple of a scalar from this multivector.

    Parameters

    • a: number

      The scalar value to be subtracted from this multivector.

    • Optional uom: Unit

      The optional unit of measure.

    • Optional α: number

      The fraction of (a * uom) to be subtracted. Default is 1.

    Returns Geometric3

    this - (a * uom) * α

  • Returns a string representing the number in exponential notation.

    Parameters

    • Optional fractionDigits: number

    Returns string

  • Returns a string representing the number in fixed-point notation.

    Parameters

    • Optional fractionDigits: number

    Returns string

  • Parameters

    • Optional radix: number

    Returns string

  • Parameters

    • Optional precision: number

    Returns string

  • Returns a string representation of the number.

    Parameters

    • Optional radix: number

    Returns string

  • Unlocks this multivector (allowing mutation), using a token that was obtained from a preceding lock method call.

    Parameters

    • token: number

    Returns this

  • this ⟼ a * b

    Sets this Geometric3 to the geometric product a * b of the vector arguments.

    Parameters

    • a: VectorE3
    • b: VectorE3

    Returns this

  • Parameters

    • mv: GeometricE3

    Returns void

  • Parameters

    • B: BivectorE3

    Returns void

  • Parameters

    • v: VectorE3

    Returns void

  • Sets this multivector to the identity element for addition, 0.

    Returns this

  • Creates a grade 2 (bivector) multivector from the specified cartesian coordinates. The bivector returned is in the unlocked (mutable) state.

    Parameters

    • yz: number

      The coordinate corresponding to the e2e3 basis bivector.

    • zx: number

      The coordinate corresponding to the e3e1 basis bivector.

    • xy: number

      The coordinate corresponding to the e1e2 basis bivector.

    • Optional uom: Unit

      The optional unit of measure. Equivalent to 1 if omitted.

    Returns Geometric3

  • Parameters

    • mv: GeometricE3

      The multivector to be copied.

    Returns Geometric3

  • Parameters

    • B: BivectorE3

    Returns Geometric3

  • Parameters

    • v: VectorE3

    Returns Geometric3

  • Parameters

    • B: BivectorE3

    Returns Geometric3

  • Parameters

    • alpha: Scalar

    Returns Geometric3

  • Parameters

    • R: SpinorE3

    Returns Geometric3

  • Parameters

    • v: VectorE3

    Returns Geometric3

  • Parameters

    • b: number
    • Optional uom: Unit

    Returns Geometric3

  • Computes a multivector with random components.

    Returns Geometric3

  • Computes the rotor that rotates vector a to vector b.

    Parameters

    • a: VectorE3

      The from vector.

    • b: VectorE3

      The to vector.

    Returns Geometric3

  • Parameters

    • es: VectorE3[]
    • fs: VectorE3[]

    Returns Geometric3

  • Parameters

    • a: VectorE3
    • b: VectorE3
    • B: BivectorE3

    Returns Geometric3

  • Creates a grade 0 (scalar) multivector with value alpha * uom. The scalar returned is in the unlocked (mutable) state.

    Parameters

    • a: number

      The scaling factor for the unit of measure.

    • Optional uom: Unit

      The optional unit of measure. Equivalent to 1 if omitted.

    Returns Geometric3

  • Creates a spinor valued multivector from the specified cartesian coordinates. The spinor returned is in the unlocked (mutable) state.

    Parameters

    • a: number

      The scalar coordinate.

    • yz: number

      The coordinate corresponding to the e2e3 basis bivector.

    • zx: number

      The coordinate corresponding to the e3e1 basis bivector.

    • xy: number

      The coordinate corresponding to the e1e2 basis bivector.

    • Optional uom: Unit

      The optional unit of measure. Equivalent to 1 if omitted.

    Returns Geometric3

  • Creates a grade 1 (vector) multivector from the specified cartesian coordinates.

    Parameters

    • x: number

      The coordinate corresponding to the e1 basis vector.

    • y: number

      The coordinate corresponding to the e2 basis vector.

    • z: number

      The coordinate corresponding to the e3 basis vector.

    • Optional uom: Unit

      The optional unit of measure. Equivalent to 1 if omitted.

    Returns Geometric3

Generated using TypeDoc