global_settings { assumed_gamma 1 } default { pigment { rgb 0 } } background { rgb 1 } #declare Length = 9; #macro Dust(obj, Level) #declare new_obj = union { object { obj scale <1/3,1,1> } object { obj scale <1/3,1,1> translate x*(Length*2/3) } } #if(Level!=1) Dust(new_obj,Level-1) #else object { new_obj } #end #end //#include "sponge.inc" //#declare base_object = //mesh { Box(0,0,0,Length,0,Length) } #declare base_object = box { 0, } #declare Recursion_Level=3; #debug concat(str(pow(2,Recursion_Level),1,0),"\n") object { Dust(base_object, Recursion_Level) } camera { location look_at } light_source { rgb 1 }