import zBuffer;

public class StereoTest extends StereoImage
{
PixelGraphic pgr;
RGB Pink,Blue;
XYZ Null,North,Green;
int i;

public void init()
  {
    int Size=100;
    String param=getParameter("Size");
    Size=(param==null)?Size:Integer.parseInt(param);
    Resize(Size,Size);
    Null=new XYZ(0f,0f,0f);
    North=new XYZ(0f,-1f,0f);
    Green=new XYZ(-1f,0f,0f);
    /* Green stands for 'Greenwich', not for the color */
    Scale(0.65f);
    RotateX(-0.5f);
    RotateY(0.3f);
    pgr=new PixelGraphic(this,getCodeBase(),"mushroom.gif");
    Pink=new RGB(1f,0.4f,0.7f);
    Blue=new RGB(0.4f,0.7f,1f);
    LightSource(new XYZ(-0.5f,-0.5f,1f),0.1f);
    DrawFaster();
    Torus(Null,North,1f,.25f,pgr,Green,12,3);
    Torus(Null,Green,1f,.25f,Pink);
    Torus(Null,XYZ.Cross(North,Green),1f,.25f,Blue);
    repaint();
  }
}
