Documentation of 'vmm3d.core.Quaternion' Java class
Quaternion
vmm3d.core

Class Quaternion



  • public class Quaternion
    extends java.lang.Object
    Represents an element of the set of quaternions.
    • Constructor Detail

      • Quaternion

        public Quaternion()
        Create a quaternion with all coordinates intially equal to zero.
      • Quaternion

        public Quaternion(double a,
                          double b,
                          double c,
                          double d)
        Create a quaternion from initial values for each coordinate.
      • Quaternion

        public Quaternion(Quaternion source)
        Create a copy of an exiting non-null Quaternion object
        Parameters:
        source - the object to be copied. A NullPointerException is thrown if this is null.
    • Method Detail

      • equals

        public boolean equals(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • dot

        public double dot(Quaternion q)
        p.dot(q) returns the scalar product
      • norm

        public double norm()
        Returns the norm of this quaternion.
      • conj

        public Quaternion conj()
        p.conj() returns the conjugate to p
      • plus

        public Quaternion plus(Quaternion q)
        Compute the sum of this quaternaion and another quaternion
        Parameters:
        q - the non-null quaternion to be added to this one. If this is null, a NullPointerException is thrown.
      • minus

        public Quaternion minus(Quaternion q)
        Compute the difference of this quaternaion and another quaternion
        Parameters:
        q - the non-null quaternion to be subtracted from this one. If this is null, a NullPointerException is thrown.
      • times

        public Quaternion times(Quaternion q)
        Compute the product of this quaternaion and another quaternion
        Parameters:
        q - the non-null quaternion to be ultiplied by this one. If this is null, a NullPointerException is thrown.
      • times

        public Quaternion times(double x)
        Compute the product of this quaternaion and a real number
      • inverse

        public Quaternion inverse()
        Compute the multiplicative inverser of this quaternion. Note that the inverse of zero will not generate an error; instead, the inverse of zero is a quaternion object in which every coordinate is Double.NaN.
      • dividedBy

        public Quaternion dividedBy(Quaternion q)
        Compute the quotient of this quaternaion by another quaternion. Note that division by zero does not generate an error. Instead, the the result is a vector in which each coordinate is Double.NaN.
        Parameters:
        q - the non-null quaternion that this quaternion is to be multiplied by. If this is null, a NullPointerException is thrown.
      • rotateAroundHopfFibre

        public Quaternion rotateAroundHopfFibre(double phi)
        Returns rotation by phi around standard Hopf fiber through (1,0,0,0)
      • rotateAroundHopfFibre

        public Quaternion rotateAroundHopfFibre(double phi,
                                                Quaternion q0)
        Returns rotation by phi around standard Hopf fiber through q0
      • StereographicProjection

        public Vector3D StereographicProjection()
        Returns stereographic projection from (-1,0,0,0)

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.