#version 3.7; #declare Camera_Scale = 1529500/40; #declare HPlanet_Height_Ratio = 0.005; #declare HPlanet_Water_Ratio = 1/3; #declare HPlanet_Ice_Ratio = 2/3; #declare HPlanet_Planet_Radius = 1; #declare HPlanet_Tilt_Angle = 30; #declare HPlanet_Rotate_Angle = clock * 360; #declare HPlanet_View_Angle = 30; #declare HPlanet_Seed_Value = seed(808232374); #declare HPlanet_Show_Mode = 2; #declare sun_diameter = 16100; #declare ring_radius = 1529500; #declare ring_width = 16052; #declare rim_wall_height = 16; #declare shadow_square_radius = 209300; #declare shadow_square_width = 16100; #declare shadow_square_length = 40250; #declare sun_radius = sun_diameter/2; #include "CIE.inc" // http://www.ignorancia.org/en/index.php?page=Lightsys #include "lightsys.inc" // http://www.ignorancia.org/en/index.php?page=Lightsys #include "math.inc" #include "transforms.inc" #declare light_lumens = 2; // float #declare light_temp = Daylight(6000); // float #declare light_color = Light_Color(light_temp,light_lumens); // vector // MACROS #macro randsign() #if (rand(HPlanet_Seed_Value) > 0.5) 1 #else -1 #end #end #declare Camera_Vertical = 0; //45; #declare Camera_Horizontal = 30; //asind(tand(30)); #declare Camera_Aspect = image_height/image_width; #declare Camera_Distance = 200; #declare Camera_Translate = <0,0,0>; #declare Camera_Up = +y * 2 * Camera_Aspect; #declare Camera_Right = +x * 2; #declare Camera_Location = -z * Camera_Distance; #declare Camera_Direction = +z * Camera_Distance; #declare Camera_LookAt = Camera_Location + Camera_Direction; #declare Camera_Rotate = ; #declare Camera_Transform = transform { rotate Camera_Rotate scale Camera_Scale translate Camera_Translate } camera { perspective up Camera_Up right Camera_Right location Camera_Location direction Camera_Direction transform {Camera_Transform} } #declare Camera_Location = vtransform(Camera_Location,Camera_Transform); #declare Camera_LookAt = vtransform(Camera_LookAt,Camera_Transform); global_settings { // radiosity // { // always_sample off // brightness 0.3 // } ambient_light 0.1 charset utf8 assumed_gamma 1.0 } //background {color rgb 1/4} light_source { 0 light_color } // COLOR MAPS #declare HPlanet_Vegetation_color_map = color_map { //rgb <253,234,157,>/255 //blond [ 00/12 rgb <060,056,029,>/255] //olive [ 03/12 rgb <060,056,029,>/255] //olive [ 04/12 rgb <040,066,018,>/255] //dark green [ 5.5/12 rgb <067,084,029,>/255] //green [ 06/12 rgb <071,059,037,>/255] //brown [6.75/12 rgb <180,148,103,>/255] //blond [8.25/12 rgb <180,148,103,>/255] //blond [ 09/12 rgb <071,059,037,>/255] //brown [ 9.5/12 rgb <067,084,029,>/255] //green [ 12/12 rgb <040,066,018,>/255] //dark green } #declare HPlanet_Altitiude_color_map = color_map { [0 rgb <000,000,050,>/255] //blue [HPlanet_Water_Ratio * 97.5/100 rgb <000,000,050,>/255] //blue [HPlanet_Water_Ratio * 1/1 rgb <034,180,180,>/255] //teal [HPlanet_Water_Ratio + (1 - HPlanet_Water_Ratio) * 0/6 rgb <067,084,029,>/255] //light green [HPlanet_Water_Ratio + (1 - HPlanet_Water_Ratio) * 2/6 rgb <040,066,018,>/255] //dark green [HPlanet_Water_Ratio + (1 - HPlanet_Water_Ratio) * 3/6 rgb <084,076,037,>/255] //dark tan [HPlanet_Water_Ratio + (1 - HPlanet_Water_Ratio) * 4/6 rgb <132,114,076,>/255] //light tan [HPlanet_Water_Ratio + (1 - HPlanet_Water_Ratio) * 4/6 rgb <255,255,255,>/255] //white [HPlanet_Water_Ratio + (1 - HPlanet_Water_Ratio) * 6/6 rgb <255,255,255,>/255] //white } #declare HPlanet_BozoCloud_color_map = color_map { [0.0 color rgb <0.95, 0.95, 0.95>*0.5] [0.1 color rgb <0.85, 0.85, 0.85>*1.5] [0.5 color rgbt <1, 1, 1, 1> ] [1.0 color rgbt <1, 1, 1, 1> ] } // PRIMITIVE PIGMENTS #local HPlanet_Crackle_pigment = function { pigment { crackle form <1,0,0> color_map { [0 rgb 0] [1 rgb 1] } } } #local HPlanet_Granite_pigment = function { pigment { granite color_map { [0 rgb 0] [1 rgb 1] } scale 10 scale .5 warp { turbulence .75 lambda 3 } scale .5 } } #local HPlanet_EdgeHeight_pigment = function { pigment { gradient y color_map { [0/8 rgb 2/2] [1/8 rgb 1/2] [2/8 rgb 1/2] [4/8 rgb 0/2] [6/8 rgb 1/2] [7/8 rgb 1/2] [8/8 rgb 2/2] } scale 2 } } #local HPlanet_BozoCloud_pigment = function { pigment { bozo turbulence 0.65 octaves 6 omega 0.7 lambda 2 color_map { [0 rgb 0] [1 rgb 1] } } } // FINAL PIGMENTS #local HPlanet_GraniteCrackle_pigment = pigment { function {(HPlanet_Crackle_pigment(x,y,z).x * 3 + HPlanet_Granite_pigment(x,y,z).x * 1 + HPlanet_EdgeHeight_pigment(x,y,z).x * 5)/8 * -1} color_map { HPlanet_Altitiude_color_map } #local HPlanet_WarpCount = 0; #local HPlanet_WarpTotal = 100; #while (HPlanet_WarpCount < HPlanet_WarpTotal) #local cylradius = 10; #local cyltheta = rand(HPlanet_Seed_Value) * 2 * pi; #local cylheight = floor(rand(HPlanet_Seed_Value) + 1/2) * 2 - 1; #local cylheight = rand(HPlanet_Seed_Value) * 2 - 1; #local holeradius = rand(HPlanet_Seed_Value) * 2; warp { black_hole , holeradius falloff 3/6 strength 2/6 inverse } #local HPlanet_WarpCount = HPlanet_WarpCount + 1; #end } #local HPlanet_CloudEdge_pigment = pigment { function {(HPlanet_BozoCloud_pigment(x,y,z).x * 2 + HPlanet_EdgeHeight_pigment(x,y,z).x * 1)/3 * -1} color_map { HPlanet_BozoCloud_color_map } #local HPlanet_WarpCount = 0; #local HPlanet_WarpTotal = 100; #while (HPlanet_WarpCount < HPlanet_WarpTotal) #local cylradius = 10; #local cyltheta = rand(HPlanet_Seed_Value) * 2 * pi; #local cylheight = floor(rand(HPlanet_Seed_Value) + 1/2) * 2 - 1; #local cylheight = rand(HPlanet_Seed_Value) * 2 - 1; #local holeradius = rand(HPlanet_Seed_Value) * 2; warp { black_hole , holeradius falloff 3/6 strength 2/6 inverse } #local HPlanet_WarpCount = HPlanet_WarpCount + 1; #end } // OBJECTS // surface difference { cylinder {<0,1.00,0>, <0,-1.00,0>, 10.01} cylinder {<0,2.00,0>, <0,-2.00,0>, 10.00} pigment { HPlanet_GraniteCrackle_pigment } scale ring_radius/10 } // rim difference { cylinder {<0,1.001,0>, <0,-1.001,0>, 10.02} cylinder {<0,1.00,0>, <0,-1.00,0>, 10.01} cylinder {<0,2.00,0>, <0,-2.00,0>, 9.90} pigment { color rgb 1 } scale ring_radius/10 } /* // clouds difference { cylinder {<0,1.00,0>, <0,-1.00,0>, 9.99} cylinder {<0,2.00,0>, <0,-2.00,0>, 9.91} hollow material { texture { pigment {HPlanet_CloudEdge_pigment} finish {ambient 0 diffuse 1} } interior { media { scattering { 1, <.1, .3, 1>/10/ring_radius extinction 0 } density { cylindrical density_map { [00/10 rgb 1] [10/10 rgb 0] } scale 10 } } } } scale ring_radius/10 } */ // SUN & HELIOSPHERE sphere { 0, sun_radius pigment {rgbt 1} hollow interior { media { emission 1/sun_radius * 10 density { spherical density_map { [ 0/10 rgb 0] [10/10 rgb light_color] } scale sun_radius #local HPlanet_WarpCount = 0; #local HPlanet_WarpTotal = 100; #while (HPlanet_WarpCount < HPlanet_WarpTotal) #local sphradius = sun_diameter/2; #local sphtheta = rand(HPlanet_Seed_Value) * pi * 2; #local sphphi = rand(HPlanet_Seed_Value) * pi; #local holeradius = rand(HPlanet_Seed_Value) * sun_radius / 10; warp { black_hole , holeradius falloff 3/6 strength 2/6 inverse } #local HPlanet_WarpCount = HPlanet_WarpCount + 1; #end } } } } /* sphere { 0, ring_radius pigment {rgbt 1} hollow interior { media { scattering {1, 1/ring_radius} density { function{ 1/(x*x + y*y + z*z) } density_map { [ 0/10 rgb 0] [10/10 rgb light_color] } scale ring_radius } } } } */ // SHIELDS #declare ShieldPiece = intersection { difference { cylinder {<0,1.0,0>, <0,-1.0,0>, 5.01} cylinder {<0,2.0,0>, <0,-2.0,0>, 4.99} } plane {-z, 0 rotate y * 15} plane {+z, 0 rotate y * -15} } /* union { object {ShieldPiece rotate y * 0} object {ShieldPiece rotate y * 60} object {ShieldPiece rotate y * 120} object {ShieldPiece rotate y * 180} object {ShieldPiece rotate y * 240} object {ShieldPiece rotate y * 300} torus { 5, 0.01 translate +y } torus { 5, 0.01 translate -y } pigment {color rgb 0} } */