def draw_solarsystem(self, dt, draw_orbits=True, orbit_stroke=0.7, planet_scaler=2, planet_min=5, planet_max=15): """ Draws the solar system for a given time""" if draw_orbits: for planet in solarsystem.planets: orbit = solarsystem.get_orbit( planet.eph, dt, dt + datetime.timedelta(days=planet.year)) self.draw_line(orbit, orbit_stroke, (0.373, 0.435, 0.569), 0.5) # Draw the Planets for planet in solarsystem.planets: position = solarsystem.position(planet.eph, dt) size = planet.radius * planet_scaler if size < planet_min: size = planet_min if size > planet_max: size = planet_max self.draw_object(position, size, planet.color_rgb, 1) # The Sun self.draw_object((0, 0, 0), planet_max + 2, (0.918, 1, 0.180), 1)
def draw_solarsystem(self, dt, draw_orbits=True, orbit_stroke=0.7, planet_scaler=2, planet_min=5, planet_max=15): if draw_orbits: for planet in solarsystem.planets: orbit = solarsystem.get_orbit(planet.eph, dt, dt + datetime.timedelta(days = planet.year)) self.draw_orbit(orbit, stroke=orbit_stroke) for planet in solarsystem.planets: position = solarsystem.position(planet.eph, dt) size = planet.radius*planet_scaler if size < planet_min: size = planet_min if size > planet_max: size = planet_max self.draw_object(position, size, planet.color, 1) self.draw_object((0,0,0), planet_max+2, "#eaff2e", 1)
def draw_solarsystem(self, dt, draw_orbits=True, orbit_stroke=0.7, planet_scaler=2, planet_min=5, planet_max=15): """ Draws the solar system for a given time""" if draw_orbits: for planet in solarsystem.planets: orbit = solarsystem.get_orbit(planet.eph, dt, dt + datetime.timedelta(days = planet.year)) self.draw_line(orbit, orbit_stroke, (0.373,0.435,0.569), 0.5) # Draw the Planets for planet in solarsystem.planets: position = solarsystem.position(planet.eph, dt) size = planet.radius*planet_scaler if size < planet_min: size = planet_min if size > planet_max: size = planet_max self.draw_object(position, size, planet.color_rgb, 1) # The Sun self.draw_object((0,0,0), planet_max+2, (0.918, 1, 0.180), 1)
def draw_solarsystem(self, dt, draw_orbits=True, orbit_stroke=0.7, planet_scaler=2, planet_min=5, planet_max=15): if draw_orbits: for planet in solarsystem.planets: orbit = solarsystem.get_orbit( planet.eph, dt, dt + datetime.timedelta(days=planet.year)) self.draw_orbit(orbit, stroke=orbit_stroke) for planet in solarsystem.planets: position = solarsystem.position(planet.eph, dt) size = planet.radius * planet_scaler if size < planet_min: size = planet_min if size > planet_max: size = planet_max self.draw_object(position, size, planet.color, 1) self.draw_object((0, 0, 0), planet_max + 2, "#eaff2e", 1)