//Bolt
#declare e= 1.5;
#declare Fork1= union {
sphere_sweep {b_spline 15
<-5,0,0>,BRad
<-5,0,0>,BRad
<0-e,2*e,2*e>,BRad
<5+e,-3*e,-3*e>,BRad
<10-e,1*e,1*e>,BRad
<15+e,-2*e,3*e>,BRad
<20-e,2*e,1*e>,BRad
<25-e,-3*e,-3*e>,BRad
<30+e,2*e,-3*e>,BRad
<35+e,-3*e,2*e>,BRad
<40-e,3*e,-2*e>,BRad
<45+e,-2*e,3*e>,BRad
<50+e,1*e,1*e>,BRad
<55,0,0>,BRad
<55,0,0>,BRad tolerance .1}
texture {pigment {color Cyan transmit .5} finish {ambient 2}}};
#declare Fork2= union {
sphere_sweep {b_spline 15
<-5,0,0>,BRad
<-5,0,0>,BRad
<0+e,-1*e,-3*e>,BRad
<5+e,-2*e,2*e>,BRad
<8-e,-3*e,-4*e>,BRad
<15+e,-2*e,2*e>,BRad
<20-e,2*e,-1*e>,BRad
<22+e,-3*e,-2*e>,BRad
<30-e,3*e,1*e>,BRad
<35-e,2*e,3*e>,BRad
<38+e,-3*e,1*e>,BRad
<40-e,2*e,-1*e>,BRad
<55+e,-3*e,2*e>,BRad
<60,0,0>,BRad
<60,0,0>,BRad tolerance .1}
texture {pigment {color Cyan transmit .5} finish {ambient 2}}};
#declare Light=
media {emission .5
density {bozo turbulence <1,1,1>
octaves 2 omega 1.9 lambda 1.5 color_map {
[0.0 color rgb <0,0,0>]
[0.4 color rgb <0,0,0>]
[0.5 color rgb <.6,1,1>]
[0.6 color rgb <0,0,0>]
[0.9 color rgb <0,0,0>]
[0.9 color rgb <1,1,1>]
[1.0 color rgb <1,1,1>]}}
scale (9+9*sin360)};
#declare Dust= isosurface {
function {f_helix1(x,y,z, 1, 1, DRad, .75, 1, 1, 0)}
//P0 : Number of helixes - e.g. 2 for a double helix
//P1 : Period - is related to the number of turns per unit length
//P2 : Minor radius (major radius > minor radius)
//P3 : Major radius
//P4 : Shape parameter. If this is greater than 1 then the tube becomes fatter in the y direction
//P5 : Cross section type
//P6 : Cross section rotation angle (degrees)
contained_by {sphere {<0,0,0>,20}} scale <1,3,1> translate y*55 rotate z*-90
texture {pigment {color rgbt <1,1,1,(1-.3*cos180)>}} interior {media {Light}} hollow};
#declare Bolt= union {
object {Dust}
light_source {<0,0,0> color Cyan fade_distance (BRad*50) fade_power 2 looks_like {object {Fork1}}}
light_source {<0,0,0> color Cyan fade_distance (BRad*50) fade_power 2 looks_like {object {Fork2}}}};