#declare SteelBall = sphere{
0 , 0.2
texture{
pigment{color rgb <224/255, 223/255, 219/255>}
finish{
reflection 0.7
diffuse 0.5
specular 1
roughness 0.005
metallic
}
}
photons{
target
reflection on
refraction on
}
}
#macro Rod(End1, End2, Col)
cylinder{
End1, End2, 0.1
texture{
pigment{Col}
}
}
#end
#include "colors.inc"
#include "vert_edge.inc"
#declare phi = (1+sqrt(5))/2;
camera{
location -13*z
look_at 0
angle 25
}
light_source{
<-5,5,-5>
White
area_light
0.3*y, 0.3*z, 15,15
adaptive 2
photons{
reflection on
refraction on
}
}
light_source{
<5,5,-5>
White
area_light
0.3*y, 0.3*z, 15,15
adaptive 2
photons{
reflection on
refraction on
}
}
light_source{
0
0.4*White
photons{
reflection on
refraction on
}
}
//6 groups each of 5 edges. Consider the inscribed cube, as in http://commons.wikimedia.org/wiki/File:Dodecahedron-with-inscribed-cube.svg . Each group consists of a "hut" made on one face of the cube
#macro EdgeGroup(Face, HutPar, HutPerp, Col) //Face identifies the face of the cube under consideration. HutPar is parallel to the roof of the "hut", and HutPerp is perpendicular to it. All these should be unit vectors. HutPar and HutPerp can be multiplied by -1 without affecting the output
Rod(phi*Face + (1/phi)*HutPar, phi*Face - (1/phi)*HutPar, Col) //The roof of the hut
Rod(phi*Face + (1/phi)*HutPar, Face + HutPar + HutPerp, Col)
Rod(phi*Face + (1/phi)*HutPar, Face + HutPar - HutPerp, Col)
Rod(phi*Face - (1/phi)*HutPar, Face - HutPar + HutPerp, Col)
Rod(phi*Face - (1/phi)*HutPar, Face - HutPar - HutPerp, Col)
#end
#declare Mone = array[2] {1,-1};
#declare Mphi = array[2] {phi,-phi};
#declare Mphirec = array[2] {1/phi,-1/phi};
union{
#declare i=0; #while (i<2)
#declare j=0; #while (j<2)
#declare k=0; #while (k<2)
object{SteelBall translate <Mone[i], Mone[j], Mone[k]>}
#declare k=k+1; #end
#declare j=j+1; #end
#declare i=i+1; #end
#declare i=0; #while (i<2)
#declare j=0; #while (j<2)
object{SteelBall translate <0, Mphirec[i], Mphi[j]>}
#declare j=j+1; #end
#declare i=i+1; #end
#declare i=0; #while (i<2)
#declare j=0; #while (j<2)
object{SteelBall translate <Mphirec[i], Mphi[j], 0>}
#declare j=j+1; #end
#declare i=i+1; #end
#declare i=0; #while (i<2)
#declare j=0; #while (j<2)
object{SteelBall translate <Mphi[j], 0, Mphirec[i]>}
#declare j=j+1; #end
#declare i=i+1; #end
EdgeGroup(x,z,y, Red)
EdgeGroup(-x,z,y, Blue)
EdgeGroup(z,y,x, Green)
EdgeGroup(-z,y,x, Yellow)
EdgeGroup(y,x,z, Orange)
EdgeGroup(-y,x,z, Med_Purple)
rotate <15,10,15>
}
global_settings{
max_trace_level 20
photons{count 100000}
radiosity{recursion_limit 10}
}