# -*- coding:utf-8 -*- # title :船底座V382 # description :船底座V382 # author :Python超人 # date :2023-02-11 # link :https://gitcode.net/pythoncr/ # python_version :3.8 # ============================================================================== from bodies import FixedStar, Sun from common.consts import MO class CarinaeV382(FixedStar): """ TODO: 船底座V382(CarinaeV382) 质量:为14.3太阳质量 大小:为350太阳半径 颜色:为0xFF, 0xBF, 0x00 密度:为0.008 g/cm³ ------------------------ == 太阳参数 == 自转周期: 24.47 地球日,自转角速度约为 0.6130 度/小时 = 360/(24.47*24) 天体质量: 1.9891×10³⁰ kg 平均密度: 1.408×10³ kg/m³ """ def __init__(self, name="船底座V382", mass=14.3 * MO, init_position=[0, 0, 0], init_velocity=[0, 0, 0], color=(0xFF, 0xBF, 0x00), texture="fixed_star.png", size_scale=1.0, distance_scale=1.0, rotation_speed=0.1, ignore_mass=False): params = { "name": name, "mass": mass, "init_position": init_position, "init_velocity": init_velocity, "density": 1.408e3, "color": color, "texture": texture, "size_scale": size_scale, "distance_scale": distance_scale, "rotation_speed": rotation_speed, "ignore_mass": ignore_mass } super().__init__(**params) if __name__ == '__main__': fixed_star = CarinaeV382() sun = Sun() print(fixed_star) print("质量倍数", fixed_star.mass / sun.mass) print("半径倍数", fixed_star.raduis / sun.raduis)