フラクタルの描画

 ドラゴンと呼ばれるフラクタルを乱数により球で描画します。
 //**********************************************************************************
  #local Pvs=< 1, 1 >; #local Rnd=seed(2465);
  #local i=0; #while(i<2000)
   #if(rand(Rnd)<0.5)
   #local Pve=< 0.5*Pvs.x+0.5*Pvs.y+0.125, -0.5*Pvs.x+0.5*Pvs.y+0.625 >;
   #else
   #local Pve=< 0.5*Pvs.x+0.5*Pvs.y-0.125, -0.5*Pvs.x+0.5*Pvs.y+0.375 >;
   #end
   sphere { Pve 0.01 translate < -0.5, -0.5 >
   pigment { color rgbt < 0.9, 0.8, 0.7, 0.7 > } scale 250 translate 3*(int(i/50))*z }
   #local Pvs=Pve;
  #local i=i+1; #end
 //**********************************************************************************