#include "colors.inc" // +--------------------------------------------------------------------------+ // | This is the HLS to RGB macro (pasted out of macros2.inc) | // +--------------------------------------------------------------------------+ #macro RGB(hls) #local hue=hls.x/60; #local lig=hls.y; #local sat=hls.z; #local MixColor=<1,0,6-hue>; #if (hue<5) #local MixColor=; #end #if (hue<4) #local MixColor=<0,4-hue,1>; #end #if (hue<3) #local MixColor=<0,1,hue-2>; #end #if (hue<2) #local MixColor=<2-hue,1,0>; #end #if (hue<1) #local MixColor=<1,hue,0>; #end #if (lig<.5) #local MixColor=MixColor*(lig*2)+<0,0,0>*(1-lig*2); #end #if (lig>.5) #local MixColor=MixColor*(2-lig*2)+<1,1,1>*(lig*2-1); #end #local MixColor=MixColor*sat+lig*<1,1,1>*(1-sat); MixColor #end #version Unofficial MegaPOV 0.5; global_settings { max_trace_level 4 } camera { location 0 look_at z fisheye angle 360 } light_source { 0 color White } // +--------------------------------------------------------------------------+ // | These are the seed values and the number of objects for each object type | // +--------------------------------------------------------------------------+ #declare Data = array[8][2]{{68,180},{76,220},{68,150},{46,100},{91,50}, {12,100},{97,250},{68,200}} // +--------------------------------------------------------------------------+ // | These are the characters used in the text bubble | // +--------------------------------------------------------------------------+ #declare Chars = "abcdefghujklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ12345678 90!@#$%^&*()/\\\"\'[]{};:<>,.?-=+~`|_" // +--------------------------------------------------------------------------+ // | These are the fonts, you will likely need to find some of your own | // +--------------------------------------------------------------------------+ #declare Fonts = array[3]{"c:\windows\fonts\msgeotr2.ttf", "c:\windows\fonts\symbol.ttf","c:\windows\fonts\times.ttf"} #declare Rnd = seed(Data[clock][0]); #declare ctr = 0; #while (ctr < Data[clock][1]) // This is the ambient lighting ammount #declare Amb = rand(Rnd); // +-----------------------------------------------------------------------+ // | Clock = 0: Box | // +-----------------------------------------------------------------------+ #if (clock = 0) box { , translate rand(Rnd)*z rotate *360 pigment { color RGB() transmit rand(Rnd) } finish { diffuse 1-Amb ambient Amb reflection rand(Rnd)*.8 conserve_energy } interior { ior 1.25 } } #end // +-----------------------------------------------------------------------+ // | Clock = 1: Cone | // +-----------------------------------------------------------------------+ #if (clock = 1) cone { 0,0 rand(Rnd)*x+x,rand(Rnd)*.5 rotate *360 translate (2.1+rand(Rnd)*.5)*z rotate *360 pigment { color RGB() transmit rand(Rnd)*.4+.4 } finish { diffuse 1-Amb ambient Amb reflection rand(Rnd)*.5 conserve_energy } interior { ior 2.0 } } #end // +-----------------------------------------------------------------------+ // | Clock = 2: Sphere | // +-----------------------------------------------------------------------+ #if (clock = 2) sphere { 0,rand(Rnd)+.2 translate (2+rand(Rnd))*z rotate *360 pigment { color RGB() transmit rand(Rnd) } finish { diffuse 1-Amb ambient Amb reflection rand(Rnd)*.75+.0 conserve_energy } interior { ior 1.1 } } #end // +-----------------------------------------------------------------------+ // | Clock = 3: Torus | // +-----------------------------------------------------------------------+ #if (clock = 3) torus { rand(Rnd)+1,rand(Rnd) rotate *360 translate (rand(Rnd)+3)*z rotate *360 #declare Clr = RGB(); pigment { color Clr transmit rand(Rnd) } finish { diffuse 1-Amb ambient Amb reflection rand(Rnd)*.5*(Clr*.6+.4) conserve_energy } interior { ior 1.5 } } #end // +-----------------------------------------------------------------------+ // | Clock = 4: Plane | // +-----------------------------------------------------------------------+ #if (clock = 4) plane { -.5, rand(Rnd)+1 hollow pigment { color RGB() transmit rand(Rnd) } finish { diffuse 1-Amb ambient Amb reflection rand(Rnd)*1 conserve_energy } } #end // +-----------------------------------------------------------------------+ // | Clock = 5: Cylinder | // +-----------------------------------------------------------------------+ #if (clock = 5) cylinder { -, , rand(Rnd)*.8+.2 translate (rand(Rnd)+sqrt(3)+.2)*z rotate *360 pigment { color RGB() transmit rand(Rnd) } finish { diffuse 1-Amb ambient Amb reflection rand(Rnd)*.4+.6 conserve_energy specular .8 roughness .008 } interior { ior 1.05 } } #end // +-----------------------------------------------------------------------+ // | Clock = 6: Text Object | // +-----------------------------------------------------------------------+ #if (clock = 6) text { ttf Fonts[int(rand(Rnd)*2.999999)] substr(Chars,int(rand(Rnd)*95.999999),1) rand(Rnd)*.8+.2 0 rotate *360 translate (rand(Rnd)*2+sqrt(3))*z rotate *360 pigment { color RGB() } finish { diffuse 1-Amb ambient Amb reflection rand(Rnd)*.2 conserve_energy specular 1 roughness .004 metallic } } #end // +-----------------------------------------------------------------------+ // | Clock = 7: Superellipsoid | // +-----------------------------------------------------------------------+ #if (clock = 7) superellipsoid { scale rand(Rnd)*.5+.7 rotate *360 translate (rand(Rnd)*4+2.5)*z rotate *360 pigment { color RGB() } finish { diffuse .7 ambient .3 specular .3 roughness .01 } #declare Norm = int(rand(Rnd)*2.999999); #if (Norm = 0) normal { wrinkles .6 scale .1 } #end #if (Norm = 1) normal { average normal_map { [1 crackle .9 scale .15 slope_map {[0.0,<-.5,1>] [0.2,<.5,.4>][0.5 <.4,-.1>][1.0 <.4,0>]}] [0.5 bumps .4 scale .005] [0.5 bumps .4 scale .015] } } #end #if (Norm = 2) normal { dents .6 scale .05 } #end } #end #declare ctr = ctr + 1; #end