All Implemented Interfaces:
Inversion, Jacobian, Mapping2D, Cloneable

public class Rotation2D extends AffineMapping2D

This class represents a pure 2D rotation about the coordinate origin (as a special case of affine mapping). It can be assumed that every instance of this class is indeed a rotation. See Secs. 21.1.3 and 21.3.1 of [1] for details.

[1] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).

  • Constructor Details

    • Rotation2D

      public Rotation2D(double alpha)
      Constructor. Creates a 2D rotation by a given angle about the origin.
      Parameters:
      alpha - rotation angle (in radians)
    • Rotation2D

      protected Rotation2D(double a00, double a01, double a10, double a11)
      Auxiliary constructor used internally for duplicating instances.
      Parameters:
      a00 - matrix element A_00
      a01 - matrix element A_01
      a10 - matrix element A_10
      a11 - matrix element A_11
    • Rotation2D

      Constructor. Creates a new Rotation2D object from an existing instance.
      Parameters:
      m - a Rotation2D instance
  • Method Details

    • concat

      Concatenates this rotation (A) with another rotation (B) and returns a new rotation (C), such that C(x) = B(A(x)).
      Parameters:
      B - the second rotation
      Returns:
      the concatenated rotations
    • duplicate

      Description copied from class: AffineMapping2D
      Returns a copy of this mapping.
      Overrides:
      duplicate in class AffineMapping2D
      Returns:
      a new affine mapping
    • getInverse

      Description copied from class: AffineMapping2D
      Calculates and returns the inverse mapping. Note that the inverse A' of a projective transformation matrix A is again a linear transformation but its a'2' element is generally not 1. Scaling A' to A'' = A' / a22' yields a projective transformation that reverses A. While A * A' = I, the result of A * A'' is a scaled identity matrix. Note that inverting an affine transformation always yields another affine transformation.
      Specified by:
      getInverse in interface Inversion
      Overrides:
      getInverse in class AffineMapping2D
      Returns:
      the inverse projective transformation