import zBuffer;

public class Pilze extends StereoImage
{
PixelGraphic pgr;
XYZ Edge0,EdgeX,EdgeY;
int i;

public void init()
  {
    int Size=200;
    String param=getParameter("Size");
    Size=(param==null)?Size:Integer.parseInt(param);
    Resize(Size,Size);
    Edge0=new XYZ(-1f,-1f,2f);
    EdgeX=new XYZ(1f,-1f,2f);
    EdgeY=new XYZ(-1f,1f,2f);
    Scale(0.4f);
    RotateX(-0.5f);
    RotateY(0.3f);
    pgr=new PixelGraphic(this,getCodeBase(),"mushroom.gif");
    DrawFaster();
    for (i=0;i<6;i++) {
      RotateY((float)Math.PI/3);
      TexturedPlane(Edge0,EdgeX,EdgeY,pgr);
    };
    repaint();
  }
}
