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.
-
det
- The affine map has a true inverse if and only if the determinant is nonzero.
-
invmatrix
- The method invmap applies the affine linear map determined by this matrix.
-
matrix
- The affine linear map is determined by this matrix.
-
Affine2dV2V()
- Creates an affine map and sets it to the identity.
-
Affine2dV2V(double, double, double, double, double, double)
- Creates an affine map with the specified matrix elements.
-
Affine2dV2V(double[][])
- Creates an affine map with the specified 2x3 matrix.
-
invertmap(double[][])
- Computes the inverse of the affine linear map determined by array map, when it exists.
-
invmap(double[])
- This applies the inverse affine linear map, if it exists, instead of the map itself.
-
map(double[])
-
This applies the affine linear map, determined by the array matrix, to the two component array input.
-
postrotate(double)
- Constructs a new affine map consisting of the old affine map followed by a rotation.
-
postscale(double, double)
- Constructs a new affine map consisting the old affine map followed by a scaling.
-
posttranslate(double, double)
- Constructs a new affine map consisting of the old affine map followed by a translation.
-
rotate(double)
- Constructs a new affine map consisting of a rotation followed by the old affine map.
-
scale(double, double)
- Constructs a new affine map consisting of a scaling followed by the old affine map.
-
setMatrix(double[][])
- Sets the matrix to that specified.
-
setToIdentity()
- Sets the affine map to the identity map.
-
translate(double, double)
- Constructs a new affine map consisting of a translation followed by the old affine map.
matrix
public double matrix[][]
- The affine linear map is determined by this matrix.
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.
det
public double det
- The affine map has a true inverse if and only if the determinant is nonzero.
Affine2dV2V
public Affine2dV2V(double newmatrix[][])
- Creates an affine map with the specified 2x3 matrix.
Affine2dV2V
public Affine2dV2V(double matrix00,
double matrix01,
double matrix02,
double matrix10,
double matrix11,
double matrix12)
- Creates an affine map with the specified matrix elements.
Affine2dV2V
public Affine2dV2V()
- Creates an affine map and sets it to the identity.
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.
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.
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.
translate
public void translate(double x,
double y)
- Constructs a new affine map consisting of a translation followed by the old affine map.
scale
public void scale(double xfactor,
double yfactor)
- Constructs a new affine map consisting of a scaling followed by the old affine map.
rotate
public void rotate(double angle)
- Constructs a new affine map consisting of a rotation followed by the old affine map.
posttranslate
public void posttranslate(double x,
double y)
- Constructs a new affine map consisting of the old affine map followed by a translation.
postscale
public void postscale(double xfactor,
double yfactor)
- Constructs a new affine map consisting the old affine map followed by a scaling.
postrotate
public void postrotate(double angle)
- Constructs a new affine map consisting of the old affine map followed by a rotation.
setToIdentity
public void setToIdentity()
- Sets the affine map to the identity map.
setMatrix
public void setMatrix(double newmatrix[][])
- Sets the matrix to that specified.
All Packages Class Hierarchy This Package Previous Next Index