All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class figPac.Affine2dV2V

java.lang.Object
   |
   +----figPac.Affine2dV2V

public class Affine2dV2V
extends Object
implements invertibleV2V
Each instance of the class Affine2dV2V represents an affine map in two dimensions.


Variable Index

 o det
The affine map has a true inverse if and only if the determinant is nonzero.
 o invmatrix
The method invmap applies the affine linear map determined by this matrix.
 o matrix
The affine linear map is determined by this matrix.

Constructor Index

 o Affine2dV2V()
Creates an affine map and sets it to the identity.
 o Affine2dV2V(double, double, double, double, double, double)
Creates an affine map with the specified matrix elements.
 o Affine2dV2V(double[][])
Creates an affine map with the specified 2x3 matrix.

Method Index

 o invertmap(double[][])
Computes the inverse of the affine linear map determined by array map, when it exists.
 o invmap(double[])
This applies the inverse affine linear map, if it exists, instead of the map itself.
 o map(double[])
This applies the affine linear map, determined by the array matrix, to the two component array input.
 o postrotate(double)
Constructs a new affine map consisting of the old affine map followed by a rotation.
 o postscale(double, double)
Constructs a new affine map consisting the old affine map followed by a scaling.
 o posttranslate(double, double)
Constructs a new affine map consisting of the old affine map followed by a translation.
 o rotate(double)
Constructs a new affine map consisting of a rotation followed by the old affine map.
 o scale(double, double)
Constructs a new affine map consisting of a scaling followed by the old affine map.
 o setMatrix(double[][])
Sets the matrix to that specified.
 o setToIdentity()
Sets the affine map to the identity map.
 o translate(double, double)
Constructs a new affine map consisting of a translation followed by the old affine map.

Variables

 o matrix
 public double matrix[][]
The affine linear map is determined by this matrix.

 o invmatrix
 public double invmatrix[][]
The method invmap applies the affine linear map determined by this matrix. If the affine linear map determined by matrix is invertible, invmap applies the inverse map.

 o det
 public double det
The affine map has a true inverse if and only if the determinant is nonzero.

Constructors

 o Affine2dV2V
 public Affine2dV2V(double newmatrix[][])
Creates an affine map with the specified 2x3 matrix.

 o Affine2dV2V
 public Affine2dV2V(double matrix00,
                    double matrix01,
                    double matrix02,
                    double matrix10,
                    double matrix11,
                    double matrix12)
Creates an affine map with the specified matrix elements.

 o Affine2dV2V
 public Affine2dV2V()
Creates an affine map and sets it to the identity.

Methods

 o map
 public double[] map(double input[])
This applies the affine linear map, determined by the array matrix, to the two component array input.
output[0] = matrix[0][0]*input[0]+matrix[0][1]*input[1]+matrix[0][2] ;
output[1] = matrix[1][0]*input[0]+matrix[1][1]*input[1]+matrix[1][2] ;

Parameters:
input - A two component array giving the coordinates fo the vector to be mapped.
Returns:
A two component array giving the image of input under the affine linear map.
 o invmap
 public double[] invmap(double input[])
This applies the inverse affine linear map, if it exists, instead of the map itself. If the inverse does not exist, invmap applies another affine linear map determined by the method invertmap.

 o invertmap
 public double[][] invertmap(double map[][])
Computes the inverse of the affine linear map determined by array map, when it exists. If map sends the two component vector x to the two component vector Ax+b, then invmap sends x to Cx+d with d=-Cb and C determined as follows. If A is invertible, C is the inverse of A. If A is not invertible, but its trace is nonzero (so that A has one nonzero eigenvalue) then C=A/(tr A)^2. Then AC=CA has the same null space as A and is the identity on the range of A. If both the determinant and trace of A vanish (so that A is niltpotent), C is the zero matrix.

 o translate
 public void translate(double x,
                       double y)
Constructs a new affine map consisting of a translation followed by the old affine map.

 o scale
 public void scale(double xfactor,
                   double yfactor)
Constructs a new affine map consisting of a scaling followed by the old affine map.

 o rotate
 public void rotate(double angle)
Constructs a new affine map consisting of a rotation followed by the old affine map.

 o posttranslate
 public void posttranslate(double x,
                           double y)
Constructs a new affine map consisting of the old affine map followed by a translation.

 o postscale
 public void postscale(double xfactor,
                       double yfactor)
Constructs a new affine map consisting the old affine map followed by a scaling.

 o postrotate
 public void postrotate(double angle)
Constructs a new affine map consisting of the old affine map followed by a rotation.

 o setToIdentity
 public void setToIdentity()
Sets the affine map to the identity map.

 o setMatrix
 public void setMatrix(double newmatrix[][])
Sets the matrix to that specified.


All Packages  Class Hierarchy  This Package  Previous  Next  Index