| java.lang.Object com.vividsolutions.jump.warp.CoordinateTransform com.vividsolutions.jump.warp.AffineTransform
AffineTransform | public class AffineTransform extends CoordinateTransform (Code) | | An AffineTransform implementation that is initialized by specifying
three points and the three points they map to.
From http://graphics.lcs.mit.edu/classes/6.837/F01/Lecture07/lecture07.pdf:
[ x1_ ] = [ x1 y1 1 0 0 0 ] [ a11 ]
[ y1_ ] = [ 0 0 0 x1 y1 1 ] [ a12 ]
[ x2_ ] = [ x2 y2 1 0 0 0 ] [ a13 ]
[ y2_ ] = [ 0 0 0 x2 y2 1 ] [ a21 ]
[ x3_ ] = [ x3 y3 1 0 0 0 ] [ a22 ]
[ y3_ ] = [ 0 0 0 x3 y3 1 ] [ a23 ]
x_ = X a
Solution: a = Xinv x_
|
Constructor Summary | |
public | AffineTransform(Coordinate p1, Coordinate p1_) A transformation that maps p1 to p1_ via a translation (no rotation or shear). | public | AffineTransform(Coordinate p1, Coordinate p1_, Coordinate p2, Coordinate p2_) A transformation that maps p1 to p1_ and p2 to p2_ via a translation,
rotation, and scaling (no "relative" shear). | public | AffineTransform(Coordinate p1, Coordinate p1_, Coordinate p2, Coordinate p2_, Coordinate p3, Coordinate p3_) A transformation that maps p1 to p1_, p2 to p2_ and p3 to p3_. |
Method Summary | |
public static Coordinate | rotate90(Coordinate a, Coordinate b) Determines where a point would end up if it were rotated 90 degrees about
another point. | public Coordinate | transform(Coordinate c) Applies the affine transform to a point. |
AffineTransform | public AffineTransform(Coordinate p1, Coordinate p1_)(Code) | | A transformation that maps p1 to p1_ via a translation (no rotation or shear).
Parameters: p1 - a point Parameters: p1_ - the point it maps to |
AffineTransform | public AffineTransform(Coordinate p1, Coordinate p1_, Coordinate p2, Coordinate p2_)(Code) | | A transformation that maps p1 to p1_ and p2 to p2_ via a translation,
rotation, and scaling (no "relative" shear).
Parameters: p1 - a point Parameters: p1_ - the point p1 maps to Parameters: p2 - another point Parameters: p2_ - the point p2 maps to |
AffineTransform | public AffineTransform(Coordinate p1, Coordinate p1_, Coordinate p2, Coordinate p2_, Coordinate p3, Coordinate p3_)(Code) | | A transformation that maps p1 to p1_, p2 to p2_ and p3 to p3_.
Parameters: p1 - a point Parameters: p1_ - the point p1 maps to Parameters: p2 - another point Parameters: p2_ - the point p2 maps to Parameters: p3 - another point Parameters: p3_ - the point p3 maps to |
rotate90 | public static Coordinate rotate90(Coordinate a, Coordinate b)(Code) | | Determines where a point would end up if it were rotated 90 degrees about
another point.
Parameters: a - the fixed point Parameters: b - the point to rotate (b itself will not be changed) b rotated 90 degrees clockwise about a |
transform | public Coordinate transform(Coordinate c)(Code) | | Applies the affine transform to a point.
From http://graphics.lcs.mit.edu/classes/6.837/F01/Lecture07/lecture07.pdf:
[ x_ ] = [ a11 a12 a13 ] [ x ]
[ y_ ] = [ a21 a22 a23 ] [ y ]
[ 1 ] = [ 0 0 1 ] [ 1 ]
Parameters: c - the input to the affine transform the result of applying the affine transform to c |
|
|