#include "colors.inc"
#include "textures.inc"
global_settings
{ photons { count 1e6 }
#macro C(P, N)
pigment { rgbf P }
finish { ior 1.5 reflection .3 phong 2} }
#if(N)
sphere
{ <sin(N) N/70-.6 cos(N)+5> .5
photons { target refraction 1 }
C(1 N-1)
#end
#end
}
light_source
{ 9, 1
area_light z*2 y, 9, 5
}
fog { fog_type 2
distance 200
color White
fog_offset 0.1
fog_alt 1.5
turbulence 1.8
}
#include "colors.inc"
#include "textures.inc"
#include "glass.inc"
#include "metals.inc"
#include "golds.inc"
#include "stones.inc"
#include "woods.inc"
#include "shapes.inc"
#include "shapes2.inc"
#include "functions.inc"
#include "math.inc"
#include "transforms.inc"
#declare Camera_Number = 1 ;
#switch ( Camera_Number )
#case (0)
#declare Camera_Position = < 0.00, 0.01, -0.0001> ;
#declare Camera_Look_At = < 0.00,150, 0.00> ;
#declare Camera_Angle = 179.999 ;
#break
#case (1)
#declare Camera_Position = < 5.00, 1.00,-5.00> ;
#declare Camera_Look_At = < 0.00, 4.00, 0.00> ;
#declare Camera_Angle = 65 ;
#break
#else
#declare Camera_Position = < 0.00, 1.00,-10.00> ;
#declare Camera_Look_At = < 0.00, 1.00, 0.00> ;
#declare Camera_Angle = 65 ;
#break
#end
camera{ location Camera_Position
right x*image_width/image_height
angle Camera_Angle
look_at Camera_Look_At
}
light_source{<1500,2500,-2500> color White*0.9}
light_source{ Camera_Position color rgb<0.9,0.9,1>*0.1}
#ifndef( Correct_Gamma) #declare Correct_Gamma = 1.5; #end
#macro Correct_Pigment_Gamma(Original_Pigment_, New_Gamma_)
#local Correct_Pigment_fn = function{ pigment {Original_Pigment_ } }
pigment{ average pigment_map{
[function{ pow(Correct_Pigment_fn(x,y,z).x, New_Gamma_)} color_map{[0 rgb 0][1 rgb<3,0,0>] } ]
[function{ pow(Correct_Pigment_fn(x,y,z).y, New_Gamma_)} color_map{[0 rgb 0][1 rgb<0,3,0>] } ]
[function{ pow(Correct_Pigment_fn(x,y,z).z, New_Gamma_)} color_map{[0 rgb 0][1 rgb<0,0,3>] } ]
} }
#end
sky_sphere{
Correct_Pigment_Gamma(
pigment{
image_map{ jpeg "sky_map_p_04_5200x1300.jpg"
map_type 2
interpolate 2
once
}
scale<1,2,1>
}
, 2.2)
rotate<0,30,0>
}
camera {
location <0, 0, -110>
look_at 0
angle 90
}
light_source { <300, 300, -1000> White }
#declare Half_Torus = difference {
torus {
4, 1
rotate -90*x
}
box { <-5, -5, -1>, <5, 0, 1> }
}
#declare Flip_It_Over = 180*x;
#declare Torus_Translate = 8;
#declare Chain_Segment = cylinder {
<0, 4, 0>, <0, -4, 0>, 1
}
#declare Chain_Gold = texture {
pigment { Gold }
finish {
ambient .1
diffuse 0.1
reflection .15
specular 0.4
metallic
}
}
#declare Link = union {
object {
Half_Torus
translate y*Torus_Translate/2
}
object {
Half_Torus
rotate Flip_It_Over
translate -y*Torus_Translate/2
}
object {
Chain_Segment
translate x*Torus_Translate/2
}
object {
Chain_Segment
translate -x*Torus_Translate/2
}
texture { Chain_Gold }
}
#declare i = 0;
#declare l = 14;
#declare link_max = 130;
#declare R = l/(2*tan(360*3.14/(2*180*link_max)));
#declare Chain = union {
#while ( i < link_max )
object {
Link
rotate <0,110*i,0>
rotate <0,0,(360/link_max)*i>
translate <R*cos((360/link_max)*i*3.14/180),R*sin((360/link_max*3.14/180)*i),0>
}
#declare i= i + 1;
#end
}
object { Chain
scale 0.15
rotate <90,0,0>
translate <-2,5,-20>
}
#declare s = 0;
#while (s < 15)
object { Chain
scale 0.15
rotate <0,90,0>
rotate <0,s*12,0>
translate <-2,5,-20>
}
#declare s = s + 1;
#end
plane {
<0,1,0>,-10
texture{Polished_Chrome
normal { crackle 1 scale 1.2
turbulence 1 translate<0,0,5>}
finish { diffuse 0.2 reflection 0.30}}
}
sphere
{<-2,5,-20>,35
texture{ Polished_Chrome }
}