World {
  Name "Example World 4 (Wandering Planet)";
  Version 0x00010101;
  
  Object {
    // first define the vertices
    Vertex A (33,53,-29); Vertex B (51,45,10);    Vertex C (0,69,-4);    Vertex D (-15,-43,-52);Vertex E (41,25,50);
    Vertex F (68,1,13);   Vertex G (-14,31,60);   Vertex H (11,-4,68);   Vertex I (-64,-24,11); Vertex J (48,-21,45);
    Vertex K (8,-47,50);  Vertex L (-35,-58,-14); Vertex M (30, -24,-57);Vertex N (45,-51,13);  Vertex O (-47,18,-48);
    Vertex P (61,15,-30); Vertex Q (-32,-16,59);  Vertex R (-8,47,-50);  Vertex S (-35,53,26);  Vertex T (-40,53,-17);
    Vertex U (20,-60,-29);Vertex V (2,-69,9);     Vertex W (-13,-1,-68); Vertex X (-67,18,-5);  Vertex Y (-35,-51,32);
    Vertex Z (27,19,-61); Vertex AA (-56,-22,-35);Vertex BB (-56,14,38); Vertex CC (13,58,36);  Vertex DD (59,-29,-22);
    // then define the polygons
    Poly (I,AA,L); Poly (H,J,E);  Poly (O,R,W);  Poly (BB,G,S); Poly (Q,Y,K);  Poly (J,F,E);
    Poly (CC,G,E); Poly (H,K,J);  Poly (CC,E,B); Poly (D,L,AA); Poly (D,W,M);  Poly (O,W,D);
    Poly (F,J,N);  Poly (AA,O,W); Poly (X,AA,I); Poly (M,Z,P);  Poly (Z,W,R);  Poly (M,U,D);
    Poly (F,P,B);  Poly (U,M,DD); Poly (K,H,Q);  Poly (V,N,J);  Poly (A,P,Z);  Poly (Q,H,G);
    Poly (T,S,C);  Poly (T,O,X);  Poly (J,K,N);  Poly (Q,BB,I); Poly (H,E,G);  Poly (U,V,D);
    Poly (E,F,B);  Poly (DD,N,U); Poly (V,K,Y);  Poly (C,CC,A); Poly (T,R,O);  Poly (W,Z,M);
    Poly (K,V,N);  Poly (B,A,C);  Poly (X,I,BB); Poly (Z,R,A);  Poly (L,D,U);  Poly (V,Y,L);
    Poly (AA,X,O); Poly (BB,S,X); Poly (E,CC,H); Poly (G,CC,S); Poly (T,X,BB); Poly (DD,M,P);
    Poly (AA,O,D); Poly (R,C,A);  Poly (W,O,Z);  Poly (V,U,N);  Poly (CC,C,S); Poly (DD,F,N);
    Poly (F,DD,P); Poly (D,AA,W); Poly (R,T,C);  Poly (B,P,A);  Poly (G,CC,C); Poly (Z,P,DD);
    Poly (U,V,L);  Poly (CC,B,C); Poly (BB,Q,G); Poly (Q,BB,Y); Poly (I,Y,X);  Poly (L,Y,AA);
    Poly (A,B,F);  Poly (J,K,V);  Poly (I,L,Y);  Poly (W,Z,D);  Poly (V,L,D);  Poly (X,O,I);
    Poly (M,Z,DD); Poly (A,Z,C);  Poly (G,H,CC); Poly (E,J,B);  Poly (B,A,CC); Poly (I,Y,Q);
    Poly (S,T,X);  Poly (R,Z,O);  Poly (W,D,L);  Poly (Q,Y,H);  Poly (I,Y,BB); Poly (K,H,Y);
    Poly (CC,C,T);
    } SparkleSphere;
  Object {
    Vertex A (33,53,-29);  Vertex B (51,45,10);    Vertex C (0,69,-4);    Vertex D (-15,-43,-52);Vertex E (41,25,50);
    Vertex F (68,1,13);    Vertex G (-14,31,60);   Vertex H (11,-4,68);   Vertex I (-64,-24,11); Vertex J (48,-21,45);
    Vertex K (8,-47,50);   Vertex L (-35,-58,-14); Vertex M (30,-24,-57); Vertex N (45,-51,13);  Vertex O (-47,18,-48);
    Vertex P (61,15,-30);  Vertex Q (-32,-16,59);  Vertex R (-8,47,-50);  Vertex S (-35,53,26);  Vertex T (-40,53,-17);
    Vertex U (20,-60,-29); Vertex V (2,-69,9);     Vertex W (-13,-1,-68); Vertex X (-67,18,-5);  Vertex Y (-35,-51,32);
    Vertex Z (27,19,-61);  Vertex AA(-56,-22,-35); Vertex BB(-56,14,38);  Vertex CC(13,58,36);   Vertex DD(59,-29,-22);
    Poly(I,AA,L); Poly(H,J,E);  Poly(O,R,W);  Poly(BB,G,S); Poly(Q,Y,K);  Poly(J,F,E);
    Poly(CC,G,E); Poly(H,K,J);  Poly(CC,E,B); Poly(D,L,AA); Poly(D,W,M);  Poly(O,W,D);
    Poly(F,J,N);  Poly(X,AA,I); Poly(M,Z,P);  Poly(Z,W,R);  Poly(M,U,D);  Poly(F,P,B);
    Poly(U,M,DD); Poly(K,H,Q);  Poly(V,N,J);  Poly(A,P,Z);  Poly(Q,H,G);  Poly(T,S,C);
    Poly(T,O,X);  Poly(Q,BB,I); Poly(H,E,G);  Poly(U,V,D);  Poly(E,F,B);  Poly(DD,N,U);
    Poly(V,K,Y);  Poly(C,CC,A); Poly(T,R,O);  Poly(W,Z,M);  Poly(X,I,BB); Poly(Z,R,A);
    Poly(V,Y,L);  Poly(AA,X,O); Poly(BB,S,X); Poly(G,CC,S); Poly(DD,M,P); Poly(AA,O,D);
    Poly(R,C,A);  Poly(V,U,N);  Poly(CC,C,S); Poly(DD,F,N); Poly(F,DD,P); Poly(R,T,C);
    Poly(B,P,A);  Poly(BB,Q,G); Poly(J,K,V);  Poly(I,L,Y);  Poly(V,L,D);  Poly(B,A,CC);
    Poly(I,Y,Q);  Poly(S,T,X);
    } Ball;
  }; // end of World block

Palette {
  Color 0   (0,0,0);
  Color 85  (255,0,0);
  Color 170 (255,128,0);
  Color 255 (255,255,0);
  Color 256 (255,255,255);
  } Fire;

Palette {
  Color -256 (0,255,0);
  Color 0    (0,0,0);
  Color 256  (0,255,0);
  } Green;

Palette {
  Color -256 (0,0,255);
  Color 0    (0,0,0);
  Color 256  (0,0,255);
  } Blue;

Palette {
  Color -256 (0,255,0);
  Color 0    (200,200,0);
  Color 192  (200,100,0);
  Color 256  (255,0,0);
  } Mars;

Scene {
  Name "Wandering Planet";
  Version 0x00010101;
  Light (0,0,1);

  Item SparkleSphere {
    Palette Fire;
    CmdStream Translation {
      Move   60  (0, 0, 2500);
      Stay   10000;
      };
    CmdStream Rotation {
      Spin     60  -6.0;            // degrees/frame
      Stay     60;
      Move     120 0.0 -90.0 45.0;  // Phi(x) Phi(y) Theta(z)  [degrees]
      Stay     60;
      MoveSpin 120 4.5 90.0 0.0;    // V(Theta(z)) [degrees/frame] Phi(x) Phi(y) [degrees]
      Spin     60  6.0;             // degrees/frame
      Stay     60;
      };
    } TheSun;

  Item Ball {
    Palette Green;
    CmdStream Translation {
      Move   60  (-2142, 0, 2500);
      Orbit  10000 (0,0,2500) -4.0 0.125; // Pc, Alpha(z) (degrees), V(theta) [degrees/frame]
      };
    CmdStream Rotation {
      MoveSpin 180 1.40625   0.0  90.0; // V(Theta(z)) [degrees/frame] Phi(x) Phi(y) [degrees]
      MoveSpin 180 1.66992   0.0 180.0; // V(Theta(z)) [degrees/frame] Phi(x) Phi(y) [degrees]
      MoveSpin 180 1.93359   0.0 -90.0; // V(Theta(z)) [degrees/frame] Phi(x) Phi(y) [degrees]
      MoveSpin 180 2.8125    0.0   0.0; // V(Theta(z)) [degrees/frame] Phi(x) Phi(y) [degrees]
      MoveSpin 180 2.8125  -90.0   0.0; // V(Theta(z)) [degrees/frame] Phi(x) Phi(y) [degrees]
      MoveSpin 120 2.46094 180.0   0.0; // V(Theta(z)) [degrees/frame] Phi(x) Phi(y) [degrees]
      MoveSpin 180 1.93359  90.0   0.0; // V(Theta(z)) [degrees/frame] Phi(x) Phi(y) [degrees]
      MoveSpin  90 1.58203  45.0  22.5; // V(Theta(z)) [degrees/frame] Phi(x) Phi(y) [degrees]
      MoveSpin 120 1.40625   0.0 202.5; // V(Theta(z)) [degrees/frame] Phi(x) Phi(y) [degrees]
      };
    } ThePlanet;

  Item Points {
    CmdStream Translation {
      Move   60  (-2142, 0, 2500);
      Orbit  10000 (0,0,2500) -4.0 0.125; // Pc, Alpha(z) (degrees), V(theta) [degrees/frame]
      };
    CmdStream Rotation {
      Stay   720;
      Move     0  0.0 0.0 0.0;     // Phi(x) Phi(y) Theta(z)  [degrees]
      Spin    10  3.0;
      Spin    20 -3.0;
      Spin    10  3.0;
      Stay   1440;
      Spin    10 -3.0;
      Spin    20  3.0;
      Spin    10 -3.0;
      Stay   1440;
      Spin    360  0.008;
      Spin    720 -0.008;
      Spin    360  0.008;
      };
    CmdStream Morph {
      SaturnRings   60 10000 20       // Ring Height                [pixels]
                             100      // Minimum Ring Radius        [pixels]
                             200      // Maximum Ring Radius        [pixels]
                             70       // Planet Radius              [pixels]
                             1.0      // Planet Rotation Velocity   [degrees/frame]
                             0.25;    // Minimum Ring Velocity      [degrees/frame]
      };  // end of morphing command stream
    };    // end of Points object definition
  
  Item Ball {
    Palette Blue;
    CmdStream Translation {
      Move   60  (0, 0, 1000);
      Orbit  10000 (0,0,2500) 2.0 0.187; // Pc, Alpha(z) (degrees), V(theta) [degrees/frame]
      };
    CmdStream Rotation {
      Stay   1;
      Move   0   90.0 0.0 0.0;     // Phi(x) Phi(y) Theta(z)  [degrees]
      Spin   10000  1.0;
      };
    } BluePlanet;

  Item Ball {
    Palette Mars;
    CmdStream Translation {
      Move   60  (0, 0, 2000);
      Orbit  10000 (0,0,2500) 0.0 0.243; // Pc, Alpha(z) (degrees), V(theta) [degrees/frame]
      };
    CmdStream Rotation {
      Stay   1;
      Move   0   90.0 0.0 0.0;     // Phi(x) Phi(y) Theta(z)  [degrees]
      Spin   10000  -1.86;
      };
    } MarsPlanet;

  };  // end of scene description

// end of file
