#version 3.8 //------------------------------------------------------------------------------ // INCLUDES #include "math.inc" #include "transforms.inc" //------------------------------------------------------------------------------ // GLOBAL PARAMETERS //------------------------------------------------------------------------------ // CAMERA #declare Orrery_Camera_Horizontal = -90; // asind(tand(30)); #declare Orrery_Camera_Vertical = 0; // 45; #declare Orrery_Camera_Aspect = image_height/image_width; #declare Orrery_Camera_Distance = 4; // was 32 #declare Orrery_Camera_Rotate = ; #declare Orrery_Camera_Scale = 2; #declare Orrery_Camera_Translate = <0,0,0>; #declare Orrery_Camera_Up = +z * 2 * Orrery_Camera_Aspect; #declare Orrery_Camera_Right = +x * 2; #declare Orrery_Camera_Location = -y * Orrery_Camera_Distance; #declare Orrery_Camera_Direction = +y * Orrery_Camera_Distance; #declare Orrery_Camera_Transform = transform { rotate Orrery_Camera_Rotate scale Orrery_Camera_Scale translate Orrery_Camera_Translate } camera { location Orrery_Camera_Location direction Orrery_Camera_Direction up Orrery_Camera_Up right Orrery_Camera_Right transform {Orrery_Camera_Transform} } //------------------------------------------------------------------------------ // MISC. GRAPHICAL SETTINGS global_settings { radiosity { always_sample off brightness 0.3 } ambient_light 0.01 charset utf8 assumed_gamma 1 } background {color srgb 3/4} //------------------------------------------------------------------------------ // TEST AREA #local obliquity = 23.43928; // deg, obliquity of Earth pole axis #local d = 2458383.500000; // Julian day, A.D. 2018 Sep 22, 00:00:00.0 #local T = d / 36525; // Julian century #local alpha_0 = 0.00 - 0.641 * T; // deg, right ascension #local delta_0 = 90.00 - 0.557 * T; // deg, declination #local W = 190.147 + 360.9856235 * d; // deg, prime meridian orientation #debug "\n" #debug concat("90+alpha_0 = ", str(90+alpha_0,0,-1), "\n") #debug concat("90-delta_0 = ", str(90-delta_0,0,-1), "\n") #debug concat("W = ", str(W,0,-1), "\n") #debug concat("mod(W,360) = ", str(mod(W,360),0,-1), "\n") #debug "\n" #declare sphere_coo = <0,0,1>; #declare sphere_coo = vrotate(sphere_coo, z * (W)); #declare sphere_coo = vrotate(sphere_coo, x * (90-delta_0)); #declare sphere_coo = vrotate(sphere_coo, z * (90+alpha_0)); #declare sphere_coo = vrotate(sphere_coo, x * (-obliquity)); #declare sphere_trans = transform { rotate z * W rotate x * (90-delta_0) rotate z * (90+alpha_0) rotate x * -obliquity } #declare fudge_trans = transform { // rotate y * -85 } // transformed objects union { sphere { 0, 1 pigment { image_map { jpeg "2k_earth_daymap.jpg" map_type 1 } scale <-1,1,1> rotate +x * 90 // rotate +z * 180 } } cylinder { -z * 1.1, +z * 1.1, 0.01 pigment {color srgb y+z} finish {ambient 0 diffuse 1 emission 1/2} } transform {sphere_trans} transform {fudge_trans} } // calculated positions sphere { +sphere_coo, 0.02 pigment {color srgb x+y} finish {ambient 0 diffuse 1 emission 1/2} transform {fudge_trans} } sphere { -sphere_coo, 0.02 pigment {color srgb x+y} finish {ambient 0 diffuse 1 emission 1/2} transform {fudge_trans} } // frame markers cylinder { 0, x * 3, 0.01 pigment {color srgb x} finish {ambient 0 diffuse 1 emission 1/2} } cylinder { 0, y * 3, 0.01 pigment {color srgb y} finish {ambient 0 diffuse 1 emission 1/2} } cylinder { 0, z * 3, 0.01 pigment {color srgb z} finish {ambient 0 diffuse 1 emission 1/2} } //------------------------------------------------------------------------------ // LIGHTS light_source { <+1,+1,+1,> * 100 color rgb 1 parallel point_at 0 // shadowless } light_source { <+1,+1,+1,> * 100 color rgb 1 rotate +z * 270 parallel point_at 0 shadowless }