// Test for fast clouds // Gilles Tran 8/4/2002 (www.oyonale.com // Feel free to use, modify etc. // Auth: Giles tran and Jeffery S. Nighbert // The original idea and textures by Giles Tran , cloud variables and random box by JS Nighbert // #version 3.5; #include "colors.inc" // random number generation macros // #include "rand.inc" #ifndef (fcloud_count) #declare fcloud_count = 10; #end //cloud count #ifndef (fcloud_min_xtnt) #declare fcloud_min_xtnt = <-10,0,-10>; #end //min vect of box #ifndef (fcloud_max_xtnt) #declare fcloud_max_xtnt = < 10,10,10>; #end //max vect of box #ifndef (fcloud_scale_min) #declare fcloud_scale_min = 1; #end //lower cloud scale #ifndef (fcloud_scale_max) #declare fcloud_scale_max = 4; #end //upper cloud scale #ifndef (fcloud_turb) #declare fcloud_turb = .2; #end //cloud turbulence #ifndef (fcloud_lambda) #declare fcloud_lambda = .5; #end //see help on lamda in pov help #ifndef (fcloud_omega) #declare fcloud_omega = .25;#end // see help on omega in pov help #ifndef(fcloud_octaves) #declare fcloud_octaves = 2;#end // see help on octaves in pov help #ifndef (fcloud_highlight_angle) #declare fcloud_highlight_angle = -20; #end //lower is smoother #ifndef (fcloud_rotate) #declare fcloud_rotate = 0;#end //individual cloud rotation #ifndef (fcloud_color) #declare fcloud_color = <1,1,1>;#end // changes ambient color #ifndef (fcloud_shadows) #declare fcloud_shadows = false; #end // pov bool vals are legal - if you want shadows #declare SkyBlue=rgb <135,142,238>/255; #macro colCloud(Color,P,S,T) rgbf #end #declare colCloud1=colCloud(SkyBlue,0.3,0.6,0.8); // shadow #declare colCloud2=colCloud(SkyBlue,0.3,0.8,0.5); #declare colCloud3=colCloud(SkyBlue,0.2,1,0.3); #declare colCloud4=colCloud(SkyBlue,0.1,1.2,0.1); // white #declare colBack=Clear; // the clouds pigment // because it's based on the cylindrical pattern, translating the pattern //along the z axis changes the shape of the cloud #macro mPigCloud(S1,S2) // S1 and S2 are the cloud length and height #local Turb=0.35+rand(rd)*fcloud_turb; #local Lambda=3+rand(rd)*fcloud_lambda; //cloud smoothness pigment{ pigment_pattern{ cylindrical scale warp{turbulence Turb lambda Lambda octaves fcloud_octaves omega fcloud_omega} rotate -x*90 } pigment_map{ [0.4 color colBack] [0.5 pigment_pattern{ function{min(1,max(0,y))} warp{turbulence Turb lambda Lambda octaves fcloud_octaves omega fcloud_omega} rotate -z*fcloud_highlight_angle // tilts the higlights to the right } pigment_map{ [0 pigment_pattern{ cylindrical scale warp{turbulence Turb lambda Lambda octaves fcloud_octaves omega fcloud_omega} rotate x*-90 } pigment_map{ [0 color Clear] [0.7 colCloud1] [1 color colCloud2] } ] [0.7 colCloud4] } ] } } finish{ambient fcloud_color diffuse 1 brilliance 100} #end #declare i=0; #declare rd=seed(1); #declare Nuage0=union{ // image but no shadows triangle{0,y,x+y} triangle{0,x,x+y} hollow translate -x*0.5-y*.5 scale 5 no_shadow } #declare Nuage1=union{ // no image for shadows triangle{0,y,x+y} triangle{0,x,x+y} hollow translate -x*0.5-y*.5 scale 5 no_image } #debug concat(str(i,0,0),"\n") #declare j=0; #declare Nuage=union{ #while (j