A Geometric Number representing the even sub-algebra of G3.

Constructors

  • Initializes the spinor from the specified coordinates. The spinor is not locked. The spinor is not modified.

    Parameters

    • coords: number[]

      [yz, zx, xy, a]

    • code: number

    Returns Spinor3

Properties

one: Spinor3 = ...

A spinor with the value of 1. The spinor is not modified (initially). The spinor is not locked (initially).

This value may become locked in future. User Spinor3.spinor(0, 0, 0, 1) instead.

zero: Spinor3 = ...

A spinor with the value of 0. The spinor is not modified (initially). The spinor is not locked (initially).

This value may become locked in future. User Spinor3.spinor(0, 0, 0, 0) instead.

Accessors

Methods

  • The Clifford conjugate. The multiplier for the grade x is (-1) raised to the power x * (x + 1) / 2 The pattern of grades is +--++--+

    Returns Spinor3

    conj(this)

  • this ⟼ this / α

    Parameters

    • α: number

    Returns this

    divByScalar

  • this ⟼ dual(v) = v <<< inv(I)

    Parameters

    • v: VectorE3

      The vector whose dual will be used to set this spinor.

    • changeSign: boolean

      Changes the sign from the usual convention for a right-handed pseudoscalar.

    Returns Spinor3

    dual

  • Computes the square root of the squared norm.

    This method does not change this multivector.

    Returns number

  • Sets this Spinor to the value of its reflection in the plane orthogonal to n. The geometric formula for bivector reflection is B' = n * B * n.

    Parameters

    Returns this

    reflect

  • Computes a rotor, R, from two vectors, where R = (abs(b) * abs(a) + b * a) / sqrt(2 * (quad(b) * quad(a) + abs(b) * abs(a) * b << a))

    Parameters

    Returns this

    The rotor representing a rotation from a to b.

    rotorFromDirections

  • Parameters

    • OptionalfractionDigits: number

    Returns string

    toExponential

  • Parameters

    • Optionalradix: number

    Returns string

    A non-normative string representation of the target.

    toString

  • Constructs a new Spinor3 from coordinates. The returned spinor is not locked. The returned spinor is not modified.

    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.

    • a: number

      The coordinate corresponding to the 1 basis scalar.

    Returns Spinor3