// by Kirby Urner, 4D Solutions
// Last modified: Feb 28, 1999

import  java.awt.* ;

public class Artist {
// I'm an artist.  I live inside a Studio object and expect to
// be registered with a Flipbook, which will invoke my 'compose'
// method

  public int maxwidth;
  public int maxheight;

  int noPoints;
  int s1 [ ][ ];

  public void crisscross(Graphics canvas){
      canvas.drawLine(0,0,maxwidth,maxheight);
      canvas.drawLine(0,maxheight,maxwidth,0);
  }

  public void compose(Graphics canvas){
       canvas.setColor(Color.red);
       crisscross(canvas);
  }

  public void viewcoord (double[][] dim3, int[][] s) {
      double f=1.0/5.0;
      double[][] dim2 = new double[noPoints][2];
			for (int i=0; i<noPoints; i++){
         dim2[i][0]= (dim3[i][0]/(f*dim3[i][2]+1.3));
         dim2[i][1]= (dim3[i][1]/(f*dim3[i][2]+1.3));
         s[i][0]=(int) (Math.round(dim2[i][0]*50)+maxwidth/2.0) ;
         s[i][1]=(int) (Math.round(-dim2[i][1]*50)+maxheight/2.0);
         }
  }

  public void drawLines (Graphics r, int x1, int y1, int x2, int y2)
  {
		r.drawLine(x1, y1, x2, y2) ;
		r.drawLine(x1+1, y1, x2+1, y2) ;
  }

}
