From ab4e037d04e0616e88adaacf2136e21c08d0e394 Mon Sep 17 00:00:00 2001 From: march3 Date: Tue, 21 Mar 2023 16:01:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=AA=E9=98=B3=E7=B3=BB=E4=B8=89=E4=BD=93?= =?UTF-8?q?=E6=A8=A1=E6=8B=9F=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bodies/body.py | 4 +- bodies/fixed_stars/alcyone.py | 6 ++- bodies/fixed_stars/antares.py | 13 ++++-- bodies/fixed_stars/arcturus.py | 58 +++++++++++++++++++++++ bodies/fixed_stars/betelgeuse.py | 7 ++- bodies/fixed_stars/canis_majoris_vy.py | 19 ++++++++ bodies/fixed_stars/carinae_v382.py | 8 +++- bodies/fixed_stars/eta_carinae.py | 7 ++- bodies/fixed_stars/pollux.py | 64 ++++++++++++++++++++++++++ bodies/fixed_stars/pollux_b.py | 64 ++++++++++++++++++++++++++ bodies/fixed_stars/procyon.py | 8 ++-- bodies/fixed_stars/rigel.py | 4 +- bodies/fixed_stars/sirius.py | 9 ++-- bodies/fixed_stars/stephenson_2_18.py | 6 +-- 14 files changed, 252 insertions(+), 25 deletions(-) create mode 100644 bodies/fixed_stars/arcturus.py create mode 100644 bodies/fixed_stars/pollux.py create mode 100644 bodies/fixed_stars/pollux_b.py diff --git a/bodies/body.py b/bodies/body.py index 7ee4055..9cb2848 100644 --- a/bodies/body.py +++ b/bodies/body.py @@ -294,8 +294,8 @@ class Body(metaclass=ABCMeta): return self.raduis * 2 def __repr__(self): - return '<%s> m=%.3e(kg), r=%.3e(km), p=[%.3e,%.3e,%.3e](km), v=%s(km/s)' % \ - (self.name, self.mass, self.raduis, + return '<%s> m=%.3e(kg), r/d=%.3e/%.3e(km), v=%.3e(km³), d=%.3e(kg/m³), p=[%.3e,%.3e,%.3e](km), v=%s(km/s)' % \ + (self.name, self.mass, self.raduis, self.diameter, self.volume, self.density, self.position[0], self.position[1], self.position[2], self.velocity) def ignore_gravity(self, body): diff --git a/bodies/fixed_stars/alcyone.py b/bodies/fixed_stars/alcyone.py index 2d31078..345c942 100644 --- a/bodies/fixed_stars/alcyone.py +++ b/bodies/fixed_stars/alcyone.py @@ -12,11 +12,13 @@ from common.consts import MO class Alcyone(FixedStar): """ - TODO: 参宿七 (Alcyone) + TODO: 昴宿六 (Alcyone) 质量:5太阳质量 密度:不详 颜色值:#EFF6FF 直径:6.12倍太阳直径 + + 中文名昴宿六外文名Alcyone表面温度13000K;总光度太阳的2,400倍半 径太阳的10倍质 量太阳的7倍视星等2.87自转周期3天光谱型B7III绝对星等-2.76 ------------------------ == 太阳参数 == 自转周期: 24.47 地球日,自转角速度约为 0.6130 度/小时 = 360/(24.47*24) @@ -24,7 +26,7 @@ class Alcyone(FixedStar): 平均密度: 1.408×10³ kg/m³ """ - def __init__(self, name="参宿七", mass=5 * MO, + def __init__(self, name="昴宿六", mass=5 * MO, init_position=[0, 0, 0], init_velocity=[0, 0, 0], color=(0xEF, 0xF6, 0xFF), diff --git a/bodies/fixed_stars/antares.py b/bodies/fixed_stars/antares.py index 459f5f2..6e8a689 100644 --- a/bodies/fixed_stars/antares.py +++ b/bodies/fixed_stars/antares.py @@ -12,11 +12,18 @@ from common.consts import MO class Antares(FixedStar): """ - TODO: 心大星(Antares) + TODO: 心宿二,英文名为Antares + 质 量A:12 ± 0.2 M⊙ B:7.2 M⊙ + 半 径A:680–800 R☉;B:5.2 R☉ + A:红超巨星 B:蓝矮星 质量:为18.6太阳质量 大小:为883太阳半径 颜色:为0xFF, 0x44, 0x00 密度:为0.0037 g/cm³。 + + + 中文名心宿二外文名Antares别 名Alpha Scorpii分 类A:红超巨星 B:蓝矮星质 量A:12 ± 0.2 M⊙ B:7.2 M⊙表面温度A:3570 K B:18500 K视星等A:0.6 ~ 1.6 B:5.5绝对星等-5.28 等 [9] 赤 经16时29分24.46秒赤 纬-26°25′55.21″距地距离550 ly(170 pc)U-B 色指数A:M1.5Iab-Ib B:B2.5VB-V 色指数+1.83光 度A:75,900 L☉ (44,700 – 128,900 L☉);B:2754 L☉ [9] 变星类型Lc半 径A:680–800 R☉;B:5.2 R☉ [9] 拼 音xīn xiù èr + ------------------------ == 太阳参数 == 自转周期: 24.47 地球日,自转角速度约为 0.6130 度/小时 = 360/(24.47*24) @@ -24,7 +31,7 @@ class Antares(FixedStar): 平均密度: 1.408×10³ kg/m³ """ - def __init__(self, name="心大星", mass=18.6 * MO, + def __init__(self, name="心宿二", mass=18.6 * MO, init_position=[0, 0, 0], init_velocity=[0, 0, 0], color=(0xFF, 0x44, 0x00), @@ -35,7 +42,7 @@ class Antares(FixedStar): "mass": mass, "init_position": init_position, "init_velocity": init_velocity, - "density": 1.408e3, + "density": 0.0037e3, "color": color, "texture": texture, "size_scale": size_scale, diff --git a/bodies/fixed_stars/arcturus.py b/bodies/fixed_stars/arcturus.py new file mode 100644 index 0000000..f21b00b --- /dev/null +++ b/bodies/fixed_stars/arcturus.py @@ -0,0 +1,58 @@ +# -*- coding:utf-8 -*- +# title :大角星 +# description :大角星 +# 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 Arcturus(FixedStar): + """ + TODO: 大角星 (Arcturus) + 质量:20太阳质量 + 密度:1.16×10⁻⁴ g/cm³ + 颜色值:#FF9100 + 直径:1,180倍太阳直径 + + + 中文名大角星外文名Arcturus别 名牧夫座α,牧夫座16 [2] 、α Boötis、天栋分 类恒星(橙巨星)质 量约 1.08 M⊙ [4] 表面温度约 4286 K [4] 视星等-0.05 等 [3] 绝对星等-0.38 等赤 经14时15分39.7秒赤 纬+19°10′56″距地距离36.7 光年半 径25.4±0.2 R☉ [4] 光 度170 L☉ [5] 光谱类型K0III [2] + + ------------------------ + == 太阳参数 == + 自转周期: 24.47 地球日,自转角速度约为 0.6130 度/小时 = 360/(24.47*24) + 天体质量: 1.9891×10³⁰ kg + 平均密度: 1.408×10³ kg/m³ + """ + + def __init__(self, name="大角星", mass=20 * MO, + init_position=[0, 0, 0], + init_velocity=[0, 0, 0], + color=(0xFF, 0xF0, 0xE4), + 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 = Arcturus() + 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 e78ec76..840bdb7 100644 --- a/bodies/fixed_stars/betelgeuse.py +++ b/bodies/fixed_stars/betelgeuse.py @@ -12,11 +12,14 @@ from common.consts import MO class Betelgeuse(FixedStar): """ - TODO: 大角星 (Betelgeuse) + TODO: 参宿四 (Betelgeuse) 质量:20太阳质量 密度:1.16×10⁻⁴ g/cm³ 颜色值:#FF9100 直径:1,180倍太阳直径 + + 中文名参宿四外文名Betelgeuse别 名α Orionis分 类红超巨星质 量11.6,11.6 + 5.0 或 11.6 - 3.9 M⊙直 径887 ± 203 或955 ± 217 D⊙表面温度3590 K视星等+0.50(0.0 ~ +1.3)绝对星等-5.85赤 经5时55分10.30秒赤 纬+7°24′25.43″距地距离640 光年光谱型M1-M2Ia-abU-B 色指数+2.06B-V 色指数+1.85光 度90000 ~ 1.5 × 10^5 L⊙变星类型SRc + ------------------------ == 太阳参数 == 自转周期: 24.47 地球日,自转角速度约为 0.6130 度/小时 = 360/(24.47*24) @@ -24,7 +27,7 @@ class Betelgeuse(FixedStar): 平均密度: 1.408×10³ kg/m³ """ - def __init__(self, name="大角星", mass=20 * MO, + def __init__(self, name="参宿四", mass=20 * MO, init_position=[0, 0, 0], init_velocity=[0, 0, 0], color=(0xFF, 0xF0, 0xE4), diff --git a/bodies/fixed_stars/canis_majoris_vy.py b/bodies/fixed_stars/canis_majoris_vy.py index c0e0bcd..f9246b1 100644 --- a/bodies/fixed_stars/canis_majoris_vy.py +++ b/bodies/fixed_stars/canis_majoris_vy.py @@ -17,6 +17,25 @@ class CanisMajorisVY(FixedStar): 大小:1420 太阳半径 颜色:0xFF, 0x8D, 0x29 密度:0.0004 g/cm³ + + 平均密度5.33✕10-3 至 8.38✕10-3 g/m³ 0.00533 + 恒星质量17±8 M☉ [1] + 半 径2,069 R☉ [1] [12-13] + + 中文名大犬座VY外文名VY Canis Majoris别 名VY CMa分 + 类红特超巨星发现者杰罗姆·拉朗德发现时间1801年3月7日平均密度5.33✕10-3 至 8.38✕10-3 g/m³ + 表面温度3490 K(±90)视星等6.5 至 9.6 等赤 经07时22分58.33秒赤 纬-25°46′03.24″ + 距地距离3820 光年(+260 −230)光谱型M3-M4.5(M2.5-M5e Ia) [1-3] + 视星等(U)12.01 [4] 视星等(B)10.19 [4] 视星等(V)7.95 [4] 视星等(J)1.98 [4] + 视星等(H)0.44 [4] 视星等(K)8.1 [5] U-B色指数+2.32 [6] B-V色指数+2.057 [7] V-R色指数+2.20 [6] + 变星类型SRc或Lc [8-9] 径向速度41 km/s [10] 自 + 行赤经:9.84 mas/yr 赤纬:0.75 mas/yr [7] 视 差0.83±0.08 mas [11] + 距 离1,170(+80或-70)pc,3,820(+260或-230)ly [1] 绝对热星等-9.4 + + + 热光度270,000±40,000,178,000(+40,900或-29,900)L☉ [12-14] + 表面重力-0.6±0.4 cgs [1] 有效温度3,940±90 K [1] 金属丰度[Fe/H]-0.3 dex [15] 自转速度300 km/s [11] + 年 龄8.2 Myr [11] ------------------------ == 太阳参数 == 自转周期: 24.47 地球日,自转角速度约为 0.6130 度/小时 = 360/(24.47*24) diff --git a/bodies/fixed_stars/carinae_v382.py b/bodies/fixed_stars/carinae_v382.py index 5a5fb65..a6d5fda 100644 --- a/bodies/fixed_stars/carinae_v382.py +++ b/bodies/fixed_stars/carinae_v382.py @@ -13,10 +13,14 @@ from common.consts import MO class CarinaeV382(FixedStar): """ TODO: 船底座V382(CarinaeV382) - 质量:为14.3太阳质量 - 大小:为350太阳半径 + 质量:为14.3太阳质量 质 量20 M⊙ [2] + 大小:为350太阳半径 半 径700 ± 250 R☉ 颜色:为0xFF, 0xBF, 0x00 密度:为0.008 g/cm³ + + 中文名船底座V382外文名V382 Carinae别 + 名船底座x、海石增四分 类黄特超巨星质 量20 M⊙ [2] + 表面温度5200 K [2] 视星等3.93 等绝对星等-9 等 [1] 赤 经11时08分35.39秒 [3] 赤 纬-58°58′30.14″ [3] 距地距离约 8900 光年 [1] 半 径700 ± 250 R☉ [4] 光 度316,000 L☉ [1] ------------------------ == 太阳参数 == 自转周期: 24.47 地球日,自转角速度约为 0.6130 度/小时 = 360/(24.47*24) diff --git a/bodies/fixed_stars/eta_carinae.py b/bodies/fixed_stars/eta_carinae.py index 5a1e6d5..ab887d3 100644 --- a/bodies/fixed_stars/eta_carinae.py +++ b/bodies/fixed_stars/eta_carinae.py @@ -12,11 +12,14 @@ from common.consts import MO class EtaCarinae(FixedStar): """ - TODO: 心宿二(Eta Carinae) + TODO: 海山二/船底座(Eta Carinae) 质量:100 太阳质量 大小:500 太阳半径 颜色:0xFF, 0xD7, 0x00 密度:0.002 g/cm³ + + 中文名海山二/船底座 η 星外文名Eta Carinae别 名Eta Car / η Carinae / η Car分 类A:高光度蓝变星 B:主序星发现者爱德蒙·哈雷发现时间1677年质 量100 M⊙(B:50-80M)直 径386809200 km(B:33 393 600Km)表面温度A:9400 ~ 35200 K B:37200 K视星等约 4.3 等(-0.8至7.9)绝对星等-8.6 等赤 经10时45分03.59秒赤 纬-59°41′04.26″距地距离7500 ly(2300 pc)半长轴15.4 AU离心率0.9公转周期2,022.7 ± 1.3 days(5.54 yr)轨道倾角130 ~ 145°光谱型A:LBV B:OU-B 色指数-0.45B-V 色指数+0.61光 度A:5 × 10^6 L☉ B:10^6 L☉ + ------------------------ == 太阳参数 == 自转周期: 24.47 地球日,自转角速度约为 0.6130 度/小时 = 360/(24.47*24) @@ -24,7 +27,7 @@ class EtaCarinae(FixedStar): 平均密度: 1.408×10³ kg/m³ """ - def __init__(self, name="心宿二", mass=100 * MO, + def __init__(self, name="海山二", mass=100 * MO, init_position=[0, 0, 0], init_velocity=[0, 0, 0], color=(0xFF, 0xD7, 0x00), diff --git a/bodies/fixed_stars/pollux.py b/bodies/fixed_stars/pollux.py new file mode 100644 index 0000000..a7eacf1 --- /dev/null +++ b/bodies/fixed_stars/pollux.py @@ -0,0 +1,64 @@ +# -*- coding:utf-8 -*- +# title :北河三 +# description :北河三 +# 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 Pollux(FixedStar): + """ + TODO: 北河三 (Pollux) + 质量:1.5太阳质量 + 密度:1.8 g/cm³ + 颜色值:#F5E8D5 + 直径:1.84倍太阳直径 + + 中文名北河三外文名Pollux别 名双子座β星分 类恒星,橙巨星质 量1.86 M⊙表面温度4770 K视星等1.14 等绝对星等1.08 等自转周期558天赤 经7时45分18.94秒赤 纬+28°01′34.31″距地距离33.78 光年B-V色指数1U-B色指数0.86光 度39L⊙位 置双子座 + + +一、北河三比太阳大多少,77.4个太阳 +北河三,亮度为太阳的43倍,是目前发现的全天第17亮星(夜晚最亮的是大犬座的天狼星,典型的蓝矮星)。因为北河三非常亮,所以经常有人把它与太阳相比较,至于北河三比太阳大多少?据小编查询,北河三质量是太阳的1.86倍,半径是太阳的8.8倍,体积是太阳的77.4倍。 + +二、北河三有多大,红巨星中较小 +太阳是恒星,北河三为红巨星,所以北河三比太阳大很多。不过在红巨星中,北河三又成了较小的存在,多数亮巨星超巨星都比他大。比如星心宿二是颗红超巨星,直径达到太阳的700倍;参宿七是颗蓝超巨星,直径约为太阳77倍。类似的恒星还很多,北河三并不算大。 + + ------------------------ + == 太阳参数 == + 自转周期: 24.47 地球日,自转角速度约为 0.6130 度/小时 = 360/(24.47*24) + 天体质量: 1.9891×10³⁰ kg + 平均密度: 1.408×10³ kg/m³ + """ + + def __init__(self, name="北河三", mass=1.5 * MO, + init_position=[0, 0, 0], + init_velocity=[0, 0, 0], + color=(0xF5, 0xE8, 0xD5), + 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": 0.5e3, + "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 = Pollux() + 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/pollux_b.py b/bodies/fixed_stars/pollux_b.py new file mode 100644 index 0000000..fbfb858 --- /dev/null +++ b/bodies/fixed_stars/pollux_b.py @@ -0,0 +1,64 @@ +# -*- coding:utf-8 -*- +# title :北河三 +# description :北河三 +# 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 PolluxB(FixedStar): + """ + TODO: 北河三b (Pollux b) + 质量:1.5太阳质量 + 密度:1.8 g/cm³ + 颜色值:#F5E8D5 + 直径:1.84倍太阳直径 + + 中文名北河三b外文名Pollux b +β Gem b别 名HD 62509 b、Thestias分 类系外行星发现者亚提·瀚兹(等人)发现时间2006年质 量2.3 MJ(至少)距地距离33.78 光年 [2] 半长轴1.64 AU离心率0.02公转周期589.64 ± 0.81 天 + +一、北河三比太阳大多少,77.4个太阳 +北河三,亮度为太阳的43倍,是目前发现的全天第17亮星(夜晚最亮的是大犬座的天狼星,典型的蓝矮星)。因为北河三非常亮,所以经常有人把它与太阳相比较,至于北河三比太阳大多少?据小编查询,北河三质量是太阳的1.86倍,半径是太阳的8.8倍,体积是太阳的77.4倍。 + +二、北河三有多大,红巨星中较小 +太阳是恒星,北河三为红巨星,所以北河三比太阳大很多。不过在红巨星中,北河三又成了较小的存在,多数亮巨星超巨星都比他大。比如星心宿二是颗红超巨星,直径达到太阳的700倍;参宿七是颗蓝超巨星,直径约为太阳77倍。类似的恒星还很多,北河三并不算大。 + + ------------------------ + == 太阳参数 == + 自转周期: 24.47 地球日,自转角速度约为 0.6130 度/小时 = 360/(24.47*24) + 天体质量: 1.9891×10³⁰ kg + 平均密度: 1.408×10³ kg/m³ + """ + + def __init__(self, name="北河三b", mass=1.5 * MO, + init_position=[0, 0, 0], + init_velocity=[0, 0, 0], + color=(0xF5, 0xE8, 0xD5), + 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": 0.5e3, + "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 = PolluxB() + 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 28a5dff..0c1ae21 100644 --- a/bodies/fixed_stars/procyon.py +++ b/bodies/fixed_stars/procyon.py @@ -12,11 +12,13 @@ from common.consts import MO class Procyon(FixedStar): """ - TODO: 北河三 (Procyon) + TODO: 南河三(Procyon) 质量:1.5太阳质量 密度:1.8 g/cm³ 颜色值:#F5E8D5 直径:1.84倍太阳直径 + + 中文名南河三外文名Procyon别 名小犬座α分 类恒星发现者未知发现时间史前视星等约0.34绝对星等约2.67赤 经7时39分18.1秒赤 纬+5°13′29″距地距离约 11.46 光年半长轴1.18"离心率0.36轨道倾角31.9 度年 龄约1.7×1000000000年星表编号HIP 37279光谱类型F5 IV-V星 座小犬座星 官南河(井宿,朱雀) ------------------------ == 太阳参数 == 自转周期: 24.47 地球日,自转角速度约为 0.6130 度/小时 = 360/(24.47*24) @@ -24,7 +26,7 @@ class Procyon(FixedStar): 平均密度: 1.408×10³ kg/m³ """ - def __init__(self, name="北河三", mass=1.5 * MO, + def __init__(self, name="南河三", mass=1.5 * MO, init_position=[0, 0, 0], init_velocity=[0, 0, 0], color=(0xF5, 0xE8, 0xD5), @@ -35,7 +37,7 @@ class Procyon(FixedStar): "mass": mass, "init_position": init_position, "init_velocity": init_velocity, - "density": 1.408e3, + "density": 0.5e3, "color": color, "texture": texture, "size_scale": size_scale, diff --git a/bodies/fixed_stars/rigel.py b/bodies/fixed_stars/rigel.py index a78d988..11b57d8 100644 --- a/bodies/fixed_stars/rigel.py +++ b/bodies/fixed_stars/rigel.py @@ -16,7 +16,7 @@ class Rigel(FixedStar): 质量:为21太阳质量 大小:为78.9太阳半径 颜色:为0xFF, 0xEE, 0xC8 - 密度:为0.18 g/cm³ + 密度:为0.18 g/cm³ # TODO: 0.060199?? 直径:1.07184✕108 km ------------------------ == 太阳参数 == @@ -25,7 +25,7 @@ class Rigel(FixedStar): 平均密度: 1.408×10³ kg/m³ """ - def __init__(self, name="参宿七星", mass=21 * MO, + def __init__(self, name="参宿七", mass=21 * MO, init_position=[0, 0, 0], init_velocity=[0, 0, 0], color=(0x90, 0x90, 0xFF), diff --git a/bodies/fixed_stars/sirius.py b/bodies/fixed_stars/sirius.py index e4eabbf..a6714ca 100644 --- a/bodies/fixed_stars/sirius.py +++ b/bodies/fixed_stars/sirius.py @@ -13,8 +13,8 @@ from common.consts import MO class Sirius(FixedStar): """ 天狼星 (Sirius) - 质量:2.02太阳质量 - 密度:2.6 g/cm³ + 质量:2.02太阳质量 TODO: ??? + 密度:2.6 g/cm³ TODO: ??? 颜色值:#FFF0E4 直径:1.71倍太阳直径 ------------------------ @@ -24,7 +24,7 @@ class Sirius(FixedStar): 平均密度: 1.408×10³ kg/m³ """ - def __init__(self, name="天狼星", mass=2.02 * MO, + def __init__(self, name="天狼星", mass=2.06 * MO, init_position=[0, 0, 0], init_velocity=[0, 0, 0], color=(0xFF, 0xF0, 0xE4), @@ -35,7 +35,7 @@ class Sirius(FixedStar): "mass": mass, "init_position": init_position, "init_velocity": init_velocity, - "density": 2.6e3, + "density": 0.58e3, "color": color, "texture": texture, "size_scale": size_scale, @@ -50,5 +50,6 @@ if __name__ == '__main__': fixed_star = Sirius() sun = Sun() print(fixed_star) + print(sun) 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 540cd14..dbf4ca1 100644 --- a/bodies/fixed_stars/stephenson_2_18.py +++ b/bodies/fixed_stars/stephenson_2_18.py @@ -13,10 +13,10 @@ from common.consts import MO class Stephenson_2_18(FixedStar): """ 史蒂文森2-18 (Stephenson 2-18) - 质量:40.0 太阳质量 + 质量:40.0 太阳质量 ? TODO: 14.28e5 * MO ?? 大小:2150 太阳半径 颜色:0xFF, 0xFF, 0xFF - 密度:0.0002 g/cm³ >> 所以 1g/cm³等于 1e3 kg/m³。 + 密度:0.0002 g/cm³ >> TODO:??? 半径:2158R☉ ------------------------ == 太阳参数 == @@ -25,7 +25,7 @@ class Stephenson_2_18(FixedStar): 平均密度: 1.408×10³ kg/m³ """ - def __init__(self, name="史蒂文森2-18", mass=40 * MO, + def __init__(self, name="史蒂文森2-18", mass=14.28e5 * MO, init_position=[0, 0, 0], init_velocity=[0, 0, 0], color=((0xFF, 60, 0)), -- GitLab