Example #1
0
 def __init__(
     self, name, texture, space, smulti, mother, mass, diameter, density, gravity, day, orbital_radius, year, temp
 ):
     Orb.__init__(
         self, name, texture, space, smulti, mass, diameter, density, gravity, day, orbital_radius, year, temp
     )
     self.mother = mother
Example #2
0
def build_solor_system(center_mass, num_bodies_arr):
    solor_system = []
    center_mass = Orb(0, 0, center_mass, arcade.color.YELLOW)
    solor_system.append([center_mass])

    for i in range(1, len(num_bodies_arr)):
        orbital_level = []
        for j in range(num_bodies_arr[i]):
            color = (random.randint(0, 255), random.randint(0, 255),
                     random.randint(0, 255))

            orbiting = solor_system[i - 1][random.randint(
                0,
                len(solor_system[i - 1]) - 1)]

            position = get_orbital_pos(orbiting, orbital_level)

            size = random.randint(int(orbiting.size / 20),
                                  int(orbiting.size / 5))
            orbital_level.append(
                Orb(position.x, position.y, size, color, [orbiting, G]))

        # print(orbital_level)
        solor_system.append(orbital_level)

    return_system = []
    for system in solor_system:
        return_system += system

    return return_system
Example #3
0
    def render(self, size_cap=0, dist_cap=0):
        # Set caps for the satellites
        self.size_cap = self.mother.mod_size() / 3
        self.dist_cap = self.mother.mod_size() * 1.2 + self.mod_size()

        Orb.render(self, size_cap, dist_cap)