//Description: // A view inside a menger sponge // 180 degree view // seemingly infinite reflection //Author: Ben Scheele //Date: 8-15-2003 #declare rad = 1; // switch for radiosity global_settings { #if(rad = true) radiosity { pretrace_start 0.08 pretrace_end .01 count 150 nearest_count 5 error_bound 1.5 recursion_limit 1 low_error_factor 0.65 gray_threshold 0.0 minimum_reuse 0.015 brightness .5 adc_bailout 0.01/2 } ambient_light off #end max_trace_level 15 } camera { ultra_wide_angle location -15*z up y right x look_at 0 angle 180 } light_source{ <50,300,-100> rgb .8 } light_source{ <-50,-300,100> rgb .5 } sphere{ 0, 1 hollow scale 5000 texture{ pigment{ wrinkles scale <10,2,10>*100 turbulence .5 warp{ turbulence 1.0 octaves 1.5 lambda 10.5 omega .5 } color_map{ [0.00 rgb <0.3,0.30,0.8> ] [0.80 rgb <1.2,1.1,1.0>] [0.85 rgb <1.3,1.2,1.0> ] } } } } #declare mv = //vectors for location of each point array[20] { <1,1,1>, // top corners <1,1,-1>, <-1,1,1>, <-1,1,-1>, <0,1,1>, // top edges <0,1,-1>, <1,1,0>, <-1,1,0>, <1,0,1>, // middle <1,0,-1>, <-1,0,1>, <-1,0,-1>, <1,-1,1>, // bottom corners <1,-1,-1>, <-1,-1,1>, <-1,-1,-1>, <0,-1,1>, // bottom edges <0,-1,-1>, <1,-1,0>, <-1,-1,0> } #declare Unit = //sphere { 0, 1 } box{ -1, 1 } #declare n = 0; #while (n < 3) // number of recursion levels #macro point(a,b,c) object{ Unit translate 2* } #end #declare Unit = union{ #declare ct = 0; #while( ct < 20 ) // counting through the array, object{ point(mv[ct].x,mv[ct].y,mv[ct].z) } //translating the 20 objects #declare ct = ct + 1; #end scale 1/3 } #declare n = n + 1; #end object { Unit pigment{ rgb <.3,.4,.5> } finish{ diffuse .91 metallic .7 specular .5 roughness .1 conserve_energy reflection{ .7 1 fresnel on } } scale 15 }