// Instructions: // Compile and execute. Confirm that the printed coordinates in // the new basis make sense. public class DrawBasisExample { // Number of data points: static int n = 8; // Data in standard coordinates: static double[] x = {1.1, 2.1, 2.8, 3.8, 5.1, 5.8, 7.2, 7.8}; static double[] y = {1.0, 1.9, 2.9, 4.1, 5.2, 6.1, 7.3, 8.1}; // New basis vectors v1, v2: v1=(1,1), v2=(-1,1) static double[] v1 = {1,1}; static double[] v2 = {-1,1}; // Coordinates in new basis with basis vectors u1, u2. static double[] xp = new double [n]; static double[] yp = new double [n]; public static void main (String[] argv) { DrawTool.display (); DrawTool.setXYRange (0,10, 0,10); for (int i=0; i