
////////////////
/*Sparkle Code//
////////////////
//Glistening
#declare sparkle=box { <-1, -1, -1>, <1, 1, 1>*.5 pigment { color 1 } finish { Metallic_Finish }
                rotate rand(seed(2)) };
#declare Cnt=0;
#declare PosX=20*Miles;
#while (PosX < 3)
  #declare PosY=20*Miles;
//object {snow}
  #while (PosY < 21*Miles)
    // trace function
    #declare Norm = <0, 0, 0>;
    #declare Start = <PosX+(rand(seed(2))-0.5)*.1, PosY+(rand(seed(2))-0.5)*.1, 1.0>;
    #declare Pos = trace (
                  snow,     // object to test
                  Start,           // starting point
                  -y,              // direction
                  Norm );          // normal
    #if (Norm.x != 0 | Norm.y != 0 | Norm.z != 0)   // if intersection is found, normal differs from 0
      #if ((vdot(Norm, z)>0.85) & (Pos.z < 0.25))
      // criteria for placing sparkles
        object {
          sparkle (0.05+rand(seed(2))*0.02)
          translate Pos
        }
        #declare Cnt=Cnt+1;
      #end
    #end

    #declare PosY=PosY+.1;

  #end

  #declare PosX=PosX+.1;
#end

#debug concat("Placed ", str(Cnt,0,0), " Sparkles\n")
///////////////
//End Dropped*/
///////////////