diff --git a/bodies/fixed_stars/alcyone.py b/bodies/fixed_stars/alcyone.py index d75c2f147fc230f070492e435188fdb27ad06c24..2d31078584125e37ab9cf6f6c3da6c823b3c1a45 100644 --- a/bodies/fixed_stars/alcyone.py +++ b/bodies/fixed_stars/alcyone.py @@ -6,7 +6,7 @@ # link :https://gitcode.net/pythoncr/ # python_version :3.8 # ============================================================================== -from bodies import FixedStar +from bodies import FixedStar, Sun from common.consts import MO @@ -47,4 +47,8 @@ class Alcyone(FixedStar): if __name__ == '__main__': - print(Alcyone()) + fixed_star = Alcyone() + sun = Sun() + print(fixed_star) + print("质量倍数", fixed_star.mass / sun.mass) + print("半径倍数", fixed_star.raduis / sun.raduis) \ No newline at end of file diff --git a/bodies/fixed_stars/antares.py b/bodies/fixed_stars/antares.py index b65a04f3937655bb5629caa12203c5edfca53041..459f5f29db45e2e9799d78d91544269d480b7117 100644 --- a/bodies/fixed_stars/antares.py +++ b/bodies/fixed_stars/antares.py @@ -6,7 +6,7 @@ # link :https://gitcode.net/pythoncr/ # python_version :3.8 # ============================================================================== -from bodies import FixedStar +from bodies import FixedStar, Sun from common.consts import MO @@ -47,4 +47,8 @@ class Antares(FixedStar): if __name__ == '__main__': - print(Antares()) + fixed_star = Antares() + sun = Sun() + print(fixed_star) + print("质量倍数", fixed_star.mass / sun.mass) + print("半径倍数", fixed_star.raduis / sun.raduis) \ No newline at end of file diff --git a/bodies/fixed_stars/betelgeuse.py b/bodies/fixed_stars/betelgeuse.py index 152ec31c315e758f7debab171935fd650cf4e5c0..e78ec76afd3fefc6468cc155160023fdab273ba8 100644 --- a/bodies/fixed_stars/betelgeuse.py +++ b/bodies/fixed_stars/betelgeuse.py @@ -6,7 +6,7 @@ # link :https://gitcode.net/pythoncr/ # python_version :3.8 # ============================================================================== -from bodies import FixedStar +from bodies import FixedStar, Sun from common.consts import MO @@ -47,4 +47,8 @@ class Betelgeuse(FixedStar): if __name__ == '__main__': - print(Betelgeuse()) + fixed_star = Betelgeuse() + sun = Sun() + print(fixed_star) + print("质量倍数", fixed_star.mass / sun.mass) + print("半径倍数", fixed_star.raduis / sun.raduis) \ No newline at end of file diff --git a/bodies/fixed_stars/canis_majoris_vy.py b/bodies/fixed_stars/canis_majoris_vy.py index a6dd622ddd05ca9ea65c1192153517ee898366a5..c0e0bcd3c3ce939cb5b0ccb17a8e4418128c4ce0 100644 --- a/bodies/fixed_stars/canis_majoris_vy.py +++ b/bodies/fixed_stars/canis_majoris_vy.py @@ -6,7 +6,7 @@ # link :https://gitcode.net/pythoncr/ # python_version :3.8 # ============================================================================== -from bodies import FixedStar +from bodies import FixedStar, Sun from common.consts import MO @@ -47,4 +47,8 @@ class CanisMajorisVY(FixedStar): if __name__ == '__main__': - print(CanisMajorisVY()) + fixed_star = CanisMajorisVY() + sun = Sun() + print(fixed_star) + print("质量倍数", fixed_star.mass / sun.mass) + print("半径倍数", fixed_star.raduis / sun.raduis) \ No newline at end of file diff --git a/bodies/fixed_stars/carinae_v382.py b/bodies/fixed_stars/carinae_v382.py index 063ba1bb7d7643a42a903c0b0f48a70977aa6859..5a5fb6567d597596e5c076da7dba6d620b454796 100644 --- a/bodies/fixed_stars/carinae_v382.py +++ b/bodies/fixed_stars/carinae_v382.py @@ -6,7 +6,7 @@ # link :https://gitcode.net/pythoncr/ # python_version :3.8 # ============================================================================== -from bodies import FixedStar +from bodies import FixedStar, Sun from common.consts import MO @@ -47,4 +47,8 @@ class CarinaeV382(FixedStar): if __name__ == '__main__': - print(CarinaeV382()) + fixed_star = CarinaeV382() + sun = Sun() + print(fixed_star) + print("质量倍数", fixed_star.mass / sun.mass) + print("半径倍数", fixed_star.raduis / sun.raduis) \ No newline at end of file diff --git a/bodies/fixed_stars/eta_carinae.py b/bodies/fixed_stars/eta_carinae.py index 060c819f2e55df9786056f41eee5227aa0b82117..5a1e6d553de3296609e5766404daf3bc955ce643 100644 --- a/bodies/fixed_stars/eta_carinae.py +++ b/bodies/fixed_stars/eta_carinae.py @@ -6,7 +6,7 @@ # link :https://gitcode.net/pythoncr/ # python_version :3.8 # ============================================================================== -from bodies import FixedStar +from bodies import FixedStar, Sun from common.consts import MO @@ -47,4 +47,8 @@ class EtaCarinae(FixedStar): if __name__ == '__main__': - print(EtaCarinae()) + fixed_star = EtaCarinae() + sun = Sun() + print(fixed_star) + print("质量倍数", fixed_star.mass / sun.mass) + print("半径倍数", fixed_star.raduis / sun.raduis) \ No newline at end of file diff --git a/bodies/fixed_stars/procyon.py b/bodies/fixed_stars/procyon.py index 8f27cc30d8aada130acfd199842ebd83e9718da1..28a5dff6e98981747d570178ec605f77b6284d7d 100644 --- a/bodies/fixed_stars/procyon.py +++ b/bodies/fixed_stars/procyon.py @@ -6,7 +6,7 @@ # link :https://gitcode.net/pythoncr/ # python_version :3.8 # ============================================================================== -from bodies import FixedStar +from bodies import FixedStar, Sun from common.consts import MO @@ -47,4 +47,8 @@ class Procyon(FixedStar): if __name__ == '__main__': - print(Procyon()) + fixed_star = Procyon() + sun = Sun() + print(fixed_star) + print("质量倍数", fixed_star.mass / sun.mass) + print("半径倍数", fixed_star.raduis / sun.raduis) \ No newline at end of file diff --git a/bodies/fixed_stars/rigel.py b/bodies/fixed_stars/rigel.py index 1b6f448436e28e67974dad5abb771823722e652a..a78d988c7d02d8c77bc602d6f05b07126a1944d0 100644 --- a/bodies/fixed_stars/rigel.py +++ b/bodies/fixed_stars/rigel.py @@ -6,13 +6,13 @@ # link :https://gitcode.net/pythoncr/ # python_version :3.8 # ============================================================================== -from bodies import FixedStar +from bodies import FixedStar, Sun from common.consts import MO class Rigel(FixedStar): """ - TODO: 参宿七(Rigel) + 参宿七(Rigel) 质量:为21太阳质量 大小:为78.9太阳半径 颜色:为0xFF, 0xEE, 0xC8 @@ -25,10 +25,10 @@ class Rigel(FixedStar): 平均密度: 1.408×10³ kg/m³ """ - def __init__(self, name="猎户座一等星", mass=17 * MO, + def __init__(self, name="参宿七星", mass=21 * MO, init_position=[0, 0, 0], init_velocity=[0, 0, 0], - color=(0xFF, 0xEE, 0xC8), + color=(0x90, 0x90, 0xFF), texture="fixed_star.png", size_scale=1.0, distance_scale=1.0, rotation_speed=0.1, ignore_mass=False): params = { @@ -36,7 +36,7 @@ class Rigel(FixedStar): "mass": mass, "init_position": init_position, "init_velocity": init_velocity, - "density": 1.408e3, + "density": 0.060199, "color": color, "texture": texture, "size_scale": size_scale, @@ -48,4 +48,8 @@ class Rigel(FixedStar): if __name__ == '__main__': - print(Rigel()) + fixed_star = Rigel() + sun = Sun() + print(fixed_star) + print("质量倍数", fixed_star.mass / sun.mass) + print("半径倍数", fixed_star.raduis / sun.raduis) diff --git a/bodies/fixed_stars/sirius.py b/bodies/fixed_stars/sirius.py index aeb474a08f05d935626fb00632e2b2b402dcfb27..e4eabbf0131b46bad47c66849abdfe760db15196 100644 --- a/bodies/fixed_stars/sirius.py +++ b/bodies/fixed_stars/sirius.py @@ -6,7 +6,7 @@ # link :https://gitcode.net/pythoncr/ # python_version :3.8 # ============================================================================== -from bodies import FixedStar +from bodies import FixedStar, Sun from common.consts import MO @@ -35,7 +35,7 @@ class Sirius(FixedStar): "mass": mass, "init_position": init_position, "init_velocity": init_velocity, - "density": 1.408e3, + "density": 2.6e3, "color": color, "texture": texture, "size_scale": size_scale, @@ -47,4 +47,8 @@ class Sirius(FixedStar): if __name__ == '__main__': - print(Sirius()) + fixed_star = Sirius() + sun = Sun() + print(fixed_star) + print("质量倍数", fixed_star.mass / sun.mass) + print("半径倍数", fixed_star.raduis / sun.raduis) diff --git a/bodies/fixed_stars/stephenson_2_18.py b/bodies/fixed_stars/stephenson_2_18.py index 8d64873a8dce64c37c86bd66cc06717e6e4eeb27..540cd14eb7859d6474c111ed0ae494de730dcc23 100644 --- a/bodies/fixed_stars/stephenson_2_18.py +++ b/bodies/fixed_stars/stephenson_2_18.py @@ -6,13 +6,13 @@ # link :https://gitcode.net/pythoncr/ # python_version :3.8 # ============================================================================== -from bodies import FixedStar +from bodies import FixedStar, Sun from common.consts import MO class Stephenson_2_18(FixedStar): """ - TODO: 史蒂文森2-18 (Stephenson 2-18) + 史蒂文森2-18 (Stephenson 2-18) 质量:40.0 太阳质量 大小:2150 太阳半径 颜色:0xFF, 0xFF, 0xFF @@ -28,7 +28,7 @@ class Stephenson_2_18(FixedStar): def __init__(self, name="史蒂文森2-18", mass=40 * MO, init_position=[0, 0, 0], init_velocity=[0, 0, 0], - color=((0xFF, 98, 25)), + color=((0xFF, 60, 0)), texture="fixed_star.png", size_scale=1.0, distance_scale=1.0, rotation_speed=0.1, ignore_mass=False): params = { @@ -48,4 +48,8 @@ class Stephenson_2_18(FixedStar): if __name__ == '__main__': - print(Stephenson_2_18()) + fixed_star = Stephenson_2_18() + sun = Sun() + print(fixed_star) + print("质量倍数", fixed_star.mass / sun.mass) + print("半径倍数", fixed_star.raduis / sun.raduis) \ No newline at end of file diff --git a/bodies/fixed_stars/wr21a.py b/bodies/fixed_stars/wr21a.py index 0b88635b8707dc6ae5f71ba553f0c73f97334d8f..a053ba6febae33df3d2ca90932a57d78aa12db88 100644 --- a/bodies/fixed_stars/wr21a.py +++ b/bodies/fixed_stars/wr21a.py @@ -6,7 +6,7 @@ # link :https://gitcode.net/pythoncr/ # python_version :3.8 # ============================================================================== -from bodies import FixedStar +from bodies import FixedStar, Sun from common.consts import MO @@ -47,4 +47,8 @@ class WR21a(FixedStar): if __name__ == '__main__': - print(WR21a()) + fixed_star = WR21a() + sun = Sun() + print(fixed_star) + print("质量倍数", fixed_star.mass / sun.mass) + print("半径倍数", fixed_star.raduis / sun.raduis) \ No newline at end of file