|
|
Alan Kong wrote in message ...
>
> I am feeding coins through the ventilation slots in my computer. Are they
>coming through at your end? :)
// --------8<--------8<-----------8<----------8<-----------8<--------8<-----
#version 3.5;
#declare MoneyAmount=30;
#include "colors.inc"
#include "rand.inc"
#declare Coin=
union
{ difference
{ cylinder
{ 0,y*.3,2
pigment { Copper }
normal
{ radial 1 slope_map { [0 <0,1>][.5 <1,0>][1 <0,-1>] }
frequency 120
}
finish { specular .5 metallic reflection .1 }
}
cylinder { -y*.01,y*.05,1.9 }
cylinder { y*.31,y*.25,1.9 }
}
union
{ difference
{ cylinder { <0,.2,.8><0,.35,.8>,1 }
cylinder { <0,.2,.8><0,.36,.8>,.6 }
box { <.001,.2,-.2><1,.36,.8> }
}
difference
{ cylinder { <0,.2,-.8><0,.35,-.8>,1 }
cylinder { <0,.2,-.8><0,.36,-.8>,.6 }
box { <0,.2,.2><-1,.36,-.8> }
}
scale <1,1,.8>
}
box { <-.08,.2,-1.7><.08,.35,1.7> translate -x*.25 }
box { <-.08,.2,-1.7><.08,.35,1.7> translate x*.25 }
pigment { Copper }
normal { bumps .2 scale .1 }
finish { specular 1 roughness .002 metallic reflection .1 }
scale .5
}
camera { location <0,1,-1>*(sqrt(MoneyAmount)*2+5) look_at 0 angle 35 }
light_source { <50,200,-100> 1 }
plane { y,0 pigment { granite scale 5 } }
#declare Loc=array[MoneyAmount]
#declare R=seed(2);
#declare Ind=0;
#while(Ind<MoneyAmount)
#declare Dist=Rand_Gauss(0,1,R)*sqrt(Ind)*1.5;
#declare Ang = rand(R)*pi*2;
#declare Loc[Ind] = <Dist*sin(Ang),0,Dist*cos(Ang)>;
#declare Ind2=0;
#while(Ind2<Ind)
#declare cx=Loc[Ind2].x-Loc[Ind].x;
#declare cz=Loc[Ind2].z-Loc[Ind].z;
#if(cx*cx+cz*cz<4 & Loc[Ind2].y=Loc[Ind].y)
#declare Loc[Ind]=Loc[Ind]+y*.15;
#declare Ind2=0;
#else
#declare Ind2=Ind2+1;
#end
#end
object {
Coin
#if(rand(R) > .5)
scale <1,-1,1>
translate y*.15
#end
rotate y*rand(R)*360
translate Loc[Ind]
}
#declare Ind=Ind+1;
#end
Post a reply to this message
|
|