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

    • 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

I: Geometric3 = ...

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.

e1: Geometric3 = ...

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

e2: Geometric3 = ...

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

e3: Geometric3 = ...

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.

mole: Geometric3 = ...

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.

one: Geometric3 = ...

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.

zero: Geometric3 = ...

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

Accessors

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

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

    Returns number

Methods

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

    Parameters

    • M: GeometricE3

      The multivector to be added to this multivector.

    • α: number = 1

      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.

    • α: number = 1

      The scalar value to be added to this multivector.

    Returns Geometric3

    this + (α * uom)

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

  • 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

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

    Returns boolean

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

    Returns boolean

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

    Returns number

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

    Returns this

  • 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

  • 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

    Returns this

    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.

    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

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

    • α: number = 1

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

  • 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

  • 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