// Source code for image "Death of a Cliche ..." // Author : Michael Andrews (m.c.andrews [at] rdg.ac.uk // Date : 22 April 2002 #version 3.5; #include "functions.inc" #include "transforms.inc" #include "metals.inc" global_settings { max_trace_level 20 assumed_gamma 1 ambient_light 1 #if(1) radiosity { pretrace_start 16/image_width pretrace_end 4/image_width count 51 error_bound 0.3 recursion_limit 3 normal on } #end } #declare BC = <4/7,5.5/7,1>; sky_sphere { pigment { planar colour_map {[0 rgb 0.3*BC^4][1 rgb 0.7*BC]} } } #declare lightDir = vrotate(vnormalize(<0.1,3,-1>), 0); #declare lightLen = 100000; #declare lightRad = lightLen*2*sin(radians(0.25)); #declare camPos = <0.0, 1.0, -20>; #declare camLookAt = <0.0,0.0,0.0>; #declare camAngle = 40; camera { up y right x*image_width/image_height location camPos direction z angle camAngle look_at camLookAt // aperture 0.5 // blur_samples 61 // focal_point <5,0,20> // confidence 1-1e-9 // variance 1e-9 } //* light_source { 0*x colour rgb 1-0.2*BC^4 translate lightDir*lightLen parallel point_at camLookAt } light_source { 0*x colour rgb 3*<1.0,.3,.2> translate <-20,-15,80> } // */ //* fog { fog_type 2 colour rgb BC*0.3 distance 100 fog_alt 6 fog_offset -7 } fog { fog_type 2 colour rgb (1-BC)*0.5 distance 500 fog_alt 15 fog_offset -7 } // */ #macro Proximity_Pattern(Object,Range,Count) // by ABX // modified by MCA #local P=function{pattern{object{Object}}}; #local Range=Range+0*x; #local X=Range.x; #local Y=Range.y; #local Z=Range.z; #local C=max(int(Count),1); #local mC=C; #local Phi = 2/(sqrt(5)-1); function{ (1/C)*( #while(C) #local C1 = vrotate(y,); #local C1x = C1.x; #local C1y = C1.y; #local C1z = C1.z; P( x+X*C1x*f_noise_generator(100*(x+C1x),100*(y+C1y),100*(z+C1z),2), y+Y*C1y*f_noise_generator(100*(x+C1x),100*(y+C1y),100*(z+C1z),2), z+Z*C1z*f_noise_generator(100*(x+C1x),100*(y+C1y),100*(z+C1z),2) ) #local C=C-1; #if(C)+#end #end ) } #end //* #declare Shape = blob { threshold 0.5 sphere { 0, 6, 1 } #local Phi = 2/(sqrt(5)-1); #declare mC = 19; #declare C = 1; #while (C <= mC) #local C1 = vrotate(y,); sphere { 4*C1, 1, 1 } sphere { 4.5*C1, 0.7, -1 } #declare C = C + 1; #end #declare tSpln = spline { natural_spline -.25, <0,-.25,0>, 0.00, <0.001,0.001,0.001>, 0.10, <0,0.1,0>, 0.25, <0,0.25,0.5>, 0.50, <-1,0.5,0>, 0.75, <0,0.75,-0.5>, 0.90, <0.001,0.9,0.001>, 1.00, <0,1,0>, 1.25, <0,1.25,0> } #declare mC = 29; #declare C = 0; #while (C <= mC) #declare F = C/mC; sphere { 0, (1-F)*0.2+0.2, 1 scale 1/<1,-3.5,1> translate tSpln(F) scale <1,-3.5,1> translate <-1,-3.2,0> } sphere { 0, (1-F)*0.2+0.2, 1 scale 1/<1,-3.5,1> translate tSpln(F) scale <1,-3.5,1> translate <-1,-3.2,0> scale <-1,1,1> } #declare C = C + 1; #end } #declare Virus = object { Shape texture{ pigment_pattern { Proximity_Pattern(Shape,.75,100) pigment_map { [0 rgb 0] [0.5 crackle form x colour_map {[0 rgb 0.65][1 rgb 0.4]} scale 0.3 ] [1 rgb 1] } } poly_wave 3 texture_map { [0.45^3 pigment { granite colour_map {[0 P_Copper1][1 P_Brass5]} } finish { F_MetalC ambient 0 reflection { 0.3, 0.6 metallic fresnel } conserve_energy } normal { granite 0.2 } ] [0.5^3 pigment { granite colour_map {[0 rgb <.8,.8,1>*0.6][1 rgb <.7,.9,.9>*0.7]} } finish { F_MetalA ambient 0 metallic 0.1 reflection { 0.05, 0.1 metallic 0.1 fresnel } conserve_energy } normal { granite 0.4 } ] [0.6^3 pigment { granite colour_map {[0 rgb <0,1,.3>*0.6][1 rgb <0,1,.3>*0.3]} } finish { F_MetalB ambient 0 reflection { 0.05, 0.1 metallic 0.1 fresnel } conserve_energy } normal { granite 0.4 } ] } } } object { Virus translate <5,0,20> } object { Virus translate <-20,10,80> } object { Virus rotate <90,30,0> translate <60,-1,180> } sphere { 0, 5 pigment { P_Chrome2 } finish { F_MetalD } translate <70,0,190>} // */ //* #declare Plane = union { plane{ y, 0 } height_field { function 200,200 { pigment { cylindrical poly_wave 3 rotate 90*x translate 1 scale 0.5 } } translate -<0.5,0,0.5> scale <40,10,40> } } difference { object { Plane } object { Plane translate -y } height_field { function 400,400 { pigment { cylindrical poly_wave 3 pigment_map { [0.1 rgb 0] [0.5 radial frequency 7 colour_map {[0 rgb 1][0.1 rgb 0][0.9 rgb 0][1 rgb 1] } ] [1 rgb 1] } scale 5 warp { turbulence 0.5 } scale 1/5 rotate 90*x translate 1 scale 0.5 } } translate -<0.5,0,0.5> scale -<60,10,60> translate 10*y } scale 2 #declare pigPov = pigment { object { text{ttf"povlogo""P"9 0} colour rgb 0, rgb 1 } translate -3*z rotate 90*x } pigment{ pigment_pattern { pigPov translate x warp {repeat 2*x} warp {repeat sin(radians(60))*2*z offset x} warp {repeat y} scale 2 } pigment_map { [0.5 pigment_pattern { checker rgb 0, rgb 1 translate -0.5 scale <7,100,7> } pigment_map { [0.5 cylindrical scale 20 colour_map {[0 rgb 0][0.5 rgb <.9,.9,1> ][1 rgb 0.7]} ] [0.5 cylindrical scale 20 colour_map {[0 rgb 1][0.5 rgb <.8,.8,.9>][1 rgb 0.7]} ] } ] [0.5 pigment_pattern { checker rgb 0, rgb 1 translate -0.5 scale <7,100,7> } pigment_map { [0.5 cylindrical scale 20 colour_map {[0 rgb 0][0.45 rgb x][0.9 rgb 0.7]} ] [0.5 cylindrical scale 20 colour_map {[0 rgb 1][0.45 rgb x][0.9 rgb 0.7]} ] } ] } translate <5,0,20>-<-20,0,80> warp { black_hole <5,0,20>-<-20,0,80>, 20 strength 2 falloff 4 } } finish{diffuse 1 ambient 0} translate -6*y translate <-20,0,80> } // */