#version 3.7; #declare RWorld_Toggle_Camera_Mode = 6; // 1 unit = 1000 miles #declare RWorld_Ring_Radius = 95000; #declare RWorld_Sun_Diameter = 1000; #declare RWorld_Sun_Radius = RWorld_Sun_Diameter/2; #declare RWorld_Sun_Location = <0,0,0>; #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" //------2-------4-------6-------8-------10------12------14------16------18------20------22------ // CAMERA // Should really transform the scene by the inverse rather than transform the camera due to rounding issues. #switch (RWorld_Toggle_Camera_Mode) // cube map #case (6) #declare Camera_Up = +y; #declare Camera_Right = +x; #declare Camera_Direction = +z/2; #declare Camera_Location = ; #declare Camera_LookAt = Camera_Location + Camera_Direction; #declare Camera_Translate = <0,0,0>; #declare Camera_Scale = <1,1,1>; #ifndef (view_direction) #declare view_direction = frame_number; #end #switch (view_direction) #case (0) #declare Camera_Rotate = <0,000,0,>; #break #case (1) #declare Camera_Rotate = <0,090,0,>; #break #case (2) #declare Camera_Rotate = <0,180,0,>; #break #case (3) #declare Camera_Rotate = <0,270,0,>; #break #case (4) #declare Camera_Rotate = <270,0,0,>; #break #case (5) #declare Camera_Rotate = <090,0,0,>; #break #end #debug "\n" #debug concat("frame_number = ", str(frame_number, 0, -1), "\n") #debug concat("Camera_Rotate = <", vstr(3, Camera_Rotate, ",", 0, -1), ">\n") #debug "\n" #declare Camera_Transform = transform { rotate Camera_Rotate translate Camera_Location translate Camera_Translate scale Camera_Scale rotate +y * 360/20/2 } #declare Camera_Object = camera { up Camera_Up right Camera_Right location 0 direction Camera_Direction transform {Camera_Transform} } #declare Camera_Location = vtransform(Camera_Location,Camera_Transform); #declare Camera_LookAt = vtransform(Camera_LookAt,Camera_Transform); #break #end //------2-------4-------6-------8-------10------12------14------16------18------20------22------ // MISC GRAPHICAL SETTINGS global_settings { charset utf8 assumed_gamma 1 max_trace_level 8 // default is 5 } background {color srgb 0} sky_sphere { pigment { bozo color_map { [0.0 color srgb 3] [0.2 color srgb z] [1.0 color srgb z] } scale 0.001 } } //------2-------4-------6-------8-------10------12------14------16------18------20------22------ // choose which objects to render sphere { RWorld_Sun_Location RWorld_Sun_Radius pigment {color srgb 1} finish {emission 1} translate -Camera_Location } camera { Camera_Object translate -Camera_Location } #declare camera_off = true; #declare effect_scale = 1; //#declare effect_scale = 60 * 1609.34 * 1000; #declare camera_location = Camera_Location - Camera_Location; #declare camera_look_at = Camera_LookAt - Camera_Location; #declare effect_location = RWorld_Sun_Location - Camera_Location; #include "Lens_Mod.inc" // http://www.oocities.org/ccolefax/lenseffects.html