#local exagg_scale = 1000; // the factor to exaggerate the planets by #local exagg_incln = 1; // the factor to exaggerate the planets by #local exagg_eccty = 1; // the factor to exaggerate the planets by #local markr_thick = 1/200; #local AU = 149597870.7; // ---------------------------------------- global_settings { assumed_gamma 1.0 } default {finish {ambient 0 diffuse 1}} background {color rgb 1/2} // ---------------------------------------- #local temp_camera_1 = camera { orthographic location z*-12 direction z up y right x*image_width/image_height rotate x * 30 rotate y * 30 scale 2 } #local temp_light_1 = light_source { 0 color rgb 1 shadowless } #local temp_light_2 = light_source { x+y+z color rgb 1 parallel } // ---------------------------------------- union { // object {temp_light_1} object {temp_light_2} } camera {temp_camera_1} cylinder { -x*256,+x*256, markr_thick pigment {color rgb x} no_shadow } cylinder { -y*256,+y*256, markr_thick pigment {color rgb y} no_shadow } cylinder { -z*256,+z*256, markr_thick pigment {color rgb z} no_shadow } /* plane { y,0 pigment {color rgbt <1,0,1,1/2>} no_shadow } */ // ---------------------------------------- sphere { 0, 696000/AU pigment {color rgb <1,1,0>} finish {ambient 1} no_shadow } #include "fbruder_kepler.inc" #local Today = 2455376.500000000; #local NumPlanets = 4; #local PlanetName = array[NumPlanets]{ "Mercury", "Venus", "Earth", "Mars"} // string #local MeanRadius = array[NumPlanets]{ 2440.00/AU, 6051.80/AU, 6371.01/AU, 3389.90/AU} // AU #local SemiMajorAxis = array[NumPlanets]{3.870979296576140E-01,7.233286735377678E-01,9.992400161311368E-01,1.523739485637696E+00} // AU #local Eccentricity = array[NumPlanets]{2.056242542315567E-01,6.810973251609722E-03,1.745257128512940E-02,9.331215215138063E-02} // deg #local AscendingNode = array[NumPlanets]{4.831749863564502E+01,7.665036452914353E+01,1.251068496744354E+02,4.952430761299259E+01} // deg #local ArgOfPerihelion = array[NumPlanets]{2.915316085559863E+01,5.488620905888749E+01,3.381688838185740E+02,2.865885963233656E+02} // deg #local Inclination = array[NumPlanets]{7.004365876146918E+00,3.394489838966820E+00,2.652965379014084E-03,1.848898333793175E+00} // deg #local SiderealPeriod = array[NumPlanets]{8.796900173442556E+01,2.246991436826062E+02,3.648400455253299E+02,6.870121845099741E+02} // days #local PigmentColor = array[NumPlanets]{ <115,115,115>/255, <222,199,165>/255, <028,083,108>/255, <135,100,060>/255} // rgb color #local TimeOfPeriapsis = array[NumPlanets]{ 2455372.937552663963, 2455333.428305923007, 2455200.636899325531, 2455630.005895495880} // days #local RotationRate = array[NumPlanets]{ 58.6462, -243.0185, 23.93419/24, 24.622962/24} // days #local Obliqueness = array[NumPlanets]{ 2.11, 177.3, 23.45, 25.19} // deg // still need to know: // a) the starting angle of each planet WRT its rotational period // b) the starting angle of each planet WRT its obliqueness // c) the point in time to use as a reference point for a and b // c) the point in space to use as a reference point for a and b // Returns the position of a planet with given orbital elements at the current time (given by clock). // Parameters: // i - inclination // Omega - longitude of the ascending node, whereby the positive x direction is the vernal point // w - argument of perihelion // epsilon - eccentricity // a - semi-major axis // P - orbital period // tau - time of periapsis passage // tol - tolerance of accuracy. This is an accuracy in time. // The returned position lies on the orbit and is passed at a time T with // (clock - tol) < T < (clock + tol). // A reasonable value for tol is clock_delta/2. // The number of iterations for solving Kepler's Equation will be time-independant. So the motion // will always be smooth. union { #local Iter = 0; #while (Iter < NumPlanets) #local Radius = MeanRadius[Iter] * exagg_scale; #local Planet_Trans = m_KeplerPosition_trans ( Inclination[Iter] * exagg_incln, AscendingNode[Iter], ArgOfPerihelion[Iter], Eccentricity[Iter] * exagg_eccty, SemiMajorAxis[Iter], SiderealPeriod[Iter], TimeOfPeriapsis[Iter]-Today, 1/2, clock ); #local Marker_Pos1 = m_KeplerPosition ( Inclination[Iter] * exagg_incln, AscendingNode[Iter], ArgOfPerihelion[Iter], Eccentricity[Iter] * exagg_eccty, SemiMajorAxis[Iter], 1, 0, 1/2, 0 ); #local Marker_Pos2 = m_KeplerPosition ( Inclination[Iter] * exagg_incln, AscendingNode[Iter], ArgOfPerihelion[Iter], Eccentricity[Iter] * exagg_eccty, SemiMajorAxis[Iter], 1, 0, 1/2, 1/2 ); #local Marker_Pos3 = m_KeplerPosition ( Inclination[Iter] * exagg_incln, AscendingNode[Iter], ArgOfPerihelion[Iter], Eccentricity[Iter] * exagg_eccty, SemiMajorAxis[Iter], 1, 0, 1/2, 1/4 ); #local Marker_Pos4 = m_KeplerPosition ( Inclination[Iter] * exagg_incln, AscendingNode[Iter], ArgOfPerihelion[Iter], Eccentricity[Iter] * exagg_eccty, SemiMajorAxis[Iter], 1, 0, 1/2, 3/4 ); union { sphere { 0,1 pigment {color rgb PigmentColor[Iter]} } cylinder { y*-2,y*+2,1/4 pigment {color rgb 1/2} } scale Radius transform {Planet_Trans} // no_shadow } union { // cylinder {Marker_Pos1, Marker_Pos2, markr_thick} // cylinder {Marker_Pos3, Marker_Pos4, markr_thick} sphere_sweep { #local sweep_count = 0; #local sweep_total = 360; linear_spline sweep_total #while (sweep_count < sweep_total) m_KeplerPosition ( Inclination[Iter] * exagg_incln, AscendingNode[Iter], ArgOfPerihelion[Iter], Eccentricity[Iter] * exagg_eccty, SemiMajorAxis[Iter], 1, TimeOfPeriapsis[Iter]-Today, 1/2, sweep_count/sweep_total * 1 ), markr_thick #local sweep_count = sweep_count + 1; #end // no_shadow } pigment {color rgb 1} } #local Iter = Iter + 1; #end }