Esempio n. 1
0
 /// <summary> Public constructor builds a star system with a random star.</summary>
 public StarSystem()
 {
     Primary = new Star((int)(nextDouble() * 60)); // more variety
     //primary = new Star(random_number(0.6, 1.3)); // starform method
     Initialize();
     //initializeBode();
 }
Esempio n. 2
0
 /// <summary> Planetary system contructor.  Builds an accretion disc for the
 /// specified planet around the specified star.  This has not been
 /// exercised to any significant degree, because moon formation
 /// doesn't seem to follow Dole's model quite as well.
 /// </summary>
 /// <param name="s">Primary for this system.
 /// </param>
 /// <param name="p">Planet around which these moons will form.
 /// </param>
 public Protosystem(Star s, Planet p)
 {
     star = s;
     planet = p;
     body_inner_bound = planet.nearest_moon();
     body_outer_bound = planet.farthest_moon();
     disc = new DustDisc(0.0, star.stellar_dust_limit(), planet.nearest_moon(), planet.farthest_moon());
     disc.cloud_eccentricity = 0.2;
 }
Esempio n. 3
0
 /// <summary> Star system contructor.  Builds an accretion disc for the
 /// specified star.
 /// </summary>
 /// <param name="s">Primary for this system.
 /// </param>
 public Protosystem(Star s)
 {
     star = s;
     planet = null;
     //planet_head = null;
     body_inner_bound = star.nearest_planet();
     body_outer_bound = star.farthest_planet();
     disc = new DustDisc(0.0, star.stellar_dust_limit(), star.nearest_planet(), star.farthest_planet());
     disc.cloud_eccentricity = 0.2;
 }
Esempio n. 4
0
 public virtual double roche_limit(Star primary, Planet innermost_planet)
 {
     double d;
     d = primary.radius * Math.Pow(
                                     ((primary.MASS() * PhysicalConstants.SUN_MASS_IN_EARTH_MASSES / (4 / 3 * Math.PI * Math.Pow(primary.radius, 3))) /
                                     innermost_planet.density)
                                  , 1 / 3);
     return d;
 }