/* OUTLINE.java - Produces large outline of turtle with
     square shell.
     Created by Randel McGirr
     Trona, CA 
     2011
*/
import java.awt.*;
import java.applet.*;
import java.util.*;

public class OUTLINE extends Applet{

  Dimension d;
  Image offI;

public void init(){
  d = getSize();
}

public void paint(Graphics g){
  g.setColor(Color.yellow);
  g.fillRect(0,0,d.width,d.height);
  g.setFont(new Font("Courier",Font.BOLD,60));
  g.setColor(Color.black);
  int endPT=6;
  int start=120;
  for(int yy=0; yy<4; yy++){
    for(int xx=0; xx<endPT; xx++){
      g.fillRect(start+xx*124,400-yy*124,120,120);
    }
    start+=62;
    endPT--;
  }
//tail
  int c[] = {120,235,180,20,100,120 };
  int d[] = {530,530,570,610,560,530 };
  Polygon tail = new Polygon(c,d,c.length);
  g.fillPolygon(tail);
//back leg
  int bx[]={300,370,420,250,300};
  int by[]={530,530,650,650,530};
  Polygon backleg=new Polygon(bx,by,bx.length);
  g.fillPolygon(backleg);
//front leg
  int fx[]={600,670,720,550,600};
  int fy[]={530,530,650,650,530};
  Polygon frontleg=new Polygon(fx,fy,fx.length);
  g.fillPolygon(frontleg);
//head
  int hx[]={750,890,940,1000,1060,1000,920,890,790,750};
  int hy[]={530,530,400,400,530,610,610,580,580,530};
  Polygon head=new Polygon(hx,hy,hx.length);
  g.fillPolygon(head);
//cut out middle
  g.setColor(Color.yellow);
  endPT=6;
  start=128;
  for(int yy=0; yy<4; yy++){
    for(int xx=0; xx<endPT; xx++){
      g.fillRect(start+xx*124,408-yy*124,104,104);
    }
    start+=62;
    endPT--;
  }
//tail
  int c2[] = {128,212,174,56,108,128 };
  int d2[] = {538,538,564,595,568,538 };
  tail = new Polygon(c2,d2,c2.length);
  g.fillPolygon(tail);
//back leg
  int bx2[]={308,362,405,265,308};
  int by2[]={538,538,642,642,538};
  backleg=new Polygon(bx2,by2,bx2.length);
  g.fillPolygon(backleg);
//front leg
  int fx2[]={608,662,705,565,608};
  int fy2[]={538,538,642,642,538};
  frontleg=new Polygon(fx2,fy2,fx2.length);
  g.fillPolygon(frontleg);
//head
  int hx2[]={769,898,948,992,1048,992,926,898,798,769};
  int hy2[]={538,538,408,408,530,600,600,572,572,538};
  head=new Polygon(hx2,hy2,hx2.length);
  g.fillPolygon(head);
  g.setColor(Color.black);
  g.fillOval(972,452,32,32);
  g.setColor(Color.yellow);
  g.fillOval(978,458,20,20);
//mouth
  g.setColor(Color.black);
  int mx[]={970,1026,1024,970,970};
  int my[]={540,570,578,548,540};
  Polygon mouth=new Polygon(mx,my,mx.length);
  g.fillPolygon(mouth);
}
}
//<applet code=OUTLINE.class height=700 width=1100></applet>
