import javax.swing.*; import javax.swing.table.*; import java.awt.*; /** A figure to help you visualize coordinate transformations * with Java2D. The dotted rectangle represents a "picture frame" * into which a person is drawing. The gray rectangle represents * a sheet of paper under the frame, onto which the drawing occurs. * The idea is that the transformation results in the frame (and * drawer) being moved, the drawing being performed, and then * the frame moved back to see the final result. The view an outside * observer would see (where the drawer and frame moves to do the * drawing) is illustrated in the second column. The view the drawer * himself would see (where the paper appears to move in the opposite * direction from that specified in the transformation) is shown * in the third column. The last column shows the result. * * From tutorial on learning Java2D at * http://www.apl.jhu.edu/~hall/java/Java2D-Tutorial.html * * 1998 Marty Hall, http://www.apl.jhu.edu/~hall/java/ */ public class TransformTest { public static void main(String[] args) { WindowUtilities.setNativeLookAndFeel(); double[][] transforms = { { 15, 25, 0 }, { 0, 0, Math.PI/25 }, { 15, 25, Math.PI/25 } }; TransformExample[][] transformExamples = new TransformExample[3][4]; for(int i=0; i