Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Python_超人
太阳系三体模拟器
提交
8f611211
太阳系三体模拟器
项目概览
Python_超人
/
太阳系三体模拟器
通知
1074
Star
131
Fork
128
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
太阳系三体模拟器
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
8f611211
编写于
3月 21, 2023
作者:
三月三net
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
太阳系三体模拟器
上级
b1f759e2
变更
11
显示空白变更内容
内联
并排
Showing
11 changed file
with
73 addition
and
29 deletion
+73
-29
bodies/fixed_stars/alcyone.py
bodies/fixed_stars/alcyone.py
+6
-2
bodies/fixed_stars/antares.py
bodies/fixed_stars/antares.py
+6
-2
bodies/fixed_stars/betelgeuse.py
bodies/fixed_stars/betelgeuse.py
+6
-2
bodies/fixed_stars/canis_majoris_vy.py
bodies/fixed_stars/canis_majoris_vy.py
+6
-2
bodies/fixed_stars/carinae_v382.py
bodies/fixed_stars/carinae_v382.py
+6
-2
bodies/fixed_stars/eta_carinae.py
bodies/fixed_stars/eta_carinae.py
+6
-2
bodies/fixed_stars/procyon.py
bodies/fixed_stars/procyon.py
+6
-2
bodies/fixed_stars/rigel.py
bodies/fixed_stars/rigel.py
+10
-6
bodies/fixed_stars/sirius.py
bodies/fixed_stars/sirius.py
+7
-3
bodies/fixed_stars/stephenson_2_18.py
bodies/fixed_stars/stephenson_2_18.py
+8
-4
bodies/fixed_stars/wr21a.py
bodies/fixed_stars/wr21a.py
+6
-2
未找到文件。
bodies/fixed_stars/alcyone.py
浏览文件 @
8f611211
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
# link :https://gitcode.net/pythoncr/
# link :https://gitcode.net/pythoncr/
# python_version :3.8
# python_version :3.8
# ==============================================================================
# ==============================================================================
from
bodies
import
FixedStar
from
bodies
import
FixedStar
,
Sun
from
common.consts
import
MO
from
common.consts
import
MO
...
@@ -47,4 +47,8 @@ class Alcyone(FixedStar):
...
@@ -47,4 +47,8 @@ class Alcyone(FixedStar):
if
__name__
==
'__main__'
:
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
bodies/fixed_stars/antares.py
浏览文件 @
8f611211
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
# link :https://gitcode.net/pythoncr/
# link :https://gitcode.net/pythoncr/
# python_version :3.8
# python_version :3.8
# ==============================================================================
# ==============================================================================
from
bodies
import
FixedStar
from
bodies
import
FixedStar
,
Sun
from
common.consts
import
MO
from
common.consts
import
MO
...
@@ -47,4 +47,8 @@ class Antares(FixedStar):
...
@@ -47,4 +47,8 @@ class Antares(FixedStar):
if
__name__
==
'__main__'
:
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
bodies/fixed_stars/betelgeuse.py
浏览文件 @
8f611211
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
# link :https://gitcode.net/pythoncr/
# link :https://gitcode.net/pythoncr/
# python_version :3.8
# python_version :3.8
# ==============================================================================
# ==============================================================================
from
bodies
import
FixedStar
from
bodies
import
FixedStar
,
Sun
from
common.consts
import
MO
from
common.consts
import
MO
...
@@ -47,4 +47,8 @@ class Betelgeuse(FixedStar):
...
@@ -47,4 +47,8 @@ class Betelgeuse(FixedStar):
if
__name__
==
'__main__'
:
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
bodies/fixed_stars/canis_majoris_vy.py
浏览文件 @
8f611211
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
# link :https://gitcode.net/pythoncr/
# link :https://gitcode.net/pythoncr/
# python_version :3.8
# python_version :3.8
# ==============================================================================
# ==============================================================================
from
bodies
import
FixedStar
from
bodies
import
FixedStar
,
Sun
from
common.consts
import
MO
from
common.consts
import
MO
...
@@ -47,4 +47,8 @@ class CanisMajorisVY(FixedStar):
...
@@ -47,4 +47,8 @@ class CanisMajorisVY(FixedStar):
if
__name__
==
'__main__'
:
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
bodies/fixed_stars/carinae_v382.py
浏览文件 @
8f611211
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
# link :https://gitcode.net/pythoncr/
# link :https://gitcode.net/pythoncr/
# python_version :3.8
# python_version :3.8
# ==============================================================================
# ==============================================================================
from
bodies
import
FixedStar
from
bodies
import
FixedStar
,
Sun
from
common.consts
import
MO
from
common.consts
import
MO
...
@@ -47,4 +47,8 @@ class CarinaeV382(FixedStar):
...
@@ -47,4 +47,8 @@ class CarinaeV382(FixedStar):
if
__name__
==
'__main__'
:
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
bodies/fixed_stars/eta_carinae.py
浏览文件 @
8f611211
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
# link :https://gitcode.net/pythoncr/
# link :https://gitcode.net/pythoncr/
# python_version :3.8
# python_version :3.8
# ==============================================================================
# ==============================================================================
from
bodies
import
FixedStar
from
bodies
import
FixedStar
,
Sun
from
common.consts
import
MO
from
common.consts
import
MO
...
@@ -47,4 +47,8 @@ class EtaCarinae(FixedStar):
...
@@ -47,4 +47,8 @@ class EtaCarinae(FixedStar):
if
__name__
==
'__main__'
:
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
bodies/fixed_stars/procyon.py
浏览文件 @
8f611211
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
# link :https://gitcode.net/pythoncr/
# link :https://gitcode.net/pythoncr/
# python_version :3.8
# python_version :3.8
# ==============================================================================
# ==============================================================================
from
bodies
import
FixedStar
from
bodies
import
FixedStar
,
Sun
from
common.consts
import
MO
from
common.consts
import
MO
...
@@ -47,4 +47,8 @@ class Procyon(FixedStar):
...
@@ -47,4 +47,8 @@ class Procyon(FixedStar):
if
__name__
==
'__main__'
:
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
bodies/fixed_stars/rigel.py
浏览文件 @
8f611211
...
@@ -6,13 +6,13 @@
...
@@ -6,13 +6,13 @@
# link :https://gitcode.net/pythoncr/
# link :https://gitcode.net/pythoncr/
# python_version :3.8
# python_version :3.8
# ==============================================================================
# ==============================================================================
from
bodies
import
FixedStar
from
bodies
import
FixedStar
,
Sun
from
common.consts
import
MO
from
common.consts
import
MO
class
Rigel
(
FixedStar
):
class
Rigel
(
FixedStar
):
"""
"""
TODO:
参宿七(Rigel)
参宿七(Rigel)
质量:为21太阳质量
质量:为21太阳质量
大小:为78.9太阳半径
大小:为78.9太阳半径
颜色:为0xFF, 0xEE, 0xC8
颜色:为0xFF, 0xEE, 0xC8
...
@@ -25,10 +25,10 @@ class Rigel(FixedStar):
...
@@ -25,10 +25,10 @@ class Rigel(FixedStar):
平均密度: 1.408×10³ kg/m³
平均密度: 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_position
=
[
0
,
0
,
0
],
init_velocity
=
[
0
,
0
,
0
],
init_velocity
=
[
0
,
0
,
0
],
color
=
(
0x
FF
,
0xEE
,
0xC8
),
color
=
(
0x
90
,
0x90
,
0xFF
),
texture
=
"fixed_star.png"
,
size_scale
=
1.0
,
distance_scale
=
1.0
,
texture
=
"fixed_star.png"
,
size_scale
=
1.0
,
distance_scale
=
1.0
,
rotation_speed
=
0.1
,
ignore_mass
=
False
):
rotation_speed
=
0.1
,
ignore_mass
=
False
):
params
=
{
params
=
{
...
@@ -36,7 +36,7 @@ class Rigel(FixedStar):
...
@@ -36,7 +36,7 @@ class Rigel(FixedStar):
"mass"
:
mass
,
"mass"
:
mass
,
"init_position"
:
init_position
,
"init_position"
:
init_position
,
"init_velocity"
:
init_velocity
,
"init_velocity"
:
init_velocity
,
"density"
:
1.408e3
,
"density"
:
0.060199
,
"color"
:
color
,
"color"
:
color
,
"texture"
:
texture
,
"texture"
:
texture
,
"size_scale"
:
size_scale
,
"size_scale"
:
size_scale
,
...
@@ -48,4 +48,8 @@ class Rigel(FixedStar):
...
@@ -48,4 +48,8 @@ class Rigel(FixedStar):
if
__name__
==
'__main__'
:
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
)
bodies/fixed_stars/sirius.py
浏览文件 @
8f611211
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
# link :https://gitcode.net/pythoncr/
# link :https://gitcode.net/pythoncr/
# python_version :3.8
# python_version :3.8
# ==============================================================================
# ==============================================================================
from
bodies
import
FixedStar
from
bodies
import
FixedStar
,
Sun
from
common.consts
import
MO
from
common.consts
import
MO
...
@@ -35,7 +35,7 @@ class Sirius(FixedStar):
...
@@ -35,7 +35,7 @@ class Sirius(FixedStar):
"mass"
:
mass
,
"mass"
:
mass
,
"init_position"
:
init_position
,
"init_position"
:
init_position
,
"init_velocity"
:
init_velocity
,
"init_velocity"
:
init_velocity
,
"density"
:
1.408
e3
,
"density"
:
2.6
e3
,
"color"
:
color
,
"color"
:
color
,
"texture"
:
texture
,
"texture"
:
texture
,
"size_scale"
:
size_scale
,
"size_scale"
:
size_scale
,
...
@@ -47,4 +47,8 @@ class Sirius(FixedStar):
...
@@ -47,4 +47,8 @@ class Sirius(FixedStar):
if
__name__
==
'__main__'
:
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
)
bodies/fixed_stars/stephenson_2_18.py
浏览文件 @
8f611211
...
@@ -6,13 +6,13 @@
...
@@ -6,13 +6,13 @@
# link :https://gitcode.net/pythoncr/
# link :https://gitcode.net/pythoncr/
# python_version :3.8
# python_version :3.8
# ==============================================================================
# ==============================================================================
from
bodies
import
FixedStar
from
bodies
import
FixedStar
,
Sun
from
common.consts
import
MO
from
common.consts
import
MO
class
Stephenson_2_18
(
FixedStar
):
class
Stephenson_2_18
(
FixedStar
):
"""
"""
TODO:
史蒂文森2-18 (Stephenson 2-18)
史蒂文森2-18 (Stephenson 2-18)
质量:40.0 太阳质量
质量:40.0 太阳质量
大小:2150 太阳半径
大小:2150 太阳半径
颜色:0xFF, 0xFF, 0xFF
颜色:0xFF, 0xFF, 0xFF
...
@@ -28,7 +28,7 @@ class Stephenson_2_18(FixedStar):
...
@@ -28,7 +28,7 @@ class Stephenson_2_18(FixedStar):
def
__init__
(
self
,
name
=
"史蒂文森2-18"
,
mass
=
40
*
MO
,
def
__init__
(
self
,
name
=
"史蒂文森2-18"
,
mass
=
40
*
MO
,
init_position
=
[
0
,
0
,
0
],
init_position
=
[
0
,
0
,
0
],
init_velocity
=
[
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
,
texture
=
"fixed_star.png"
,
size_scale
=
1.0
,
distance_scale
=
1.0
,
rotation_speed
=
0.1
,
ignore_mass
=
False
):
rotation_speed
=
0.1
,
ignore_mass
=
False
):
params
=
{
params
=
{
...
@@ -48,4 +48,8 @@ class Stephenson_2_18(FixedStar):
...
@@ -48,4 +48,8 @@ class Stephenson_2_18(FixedStar):
if
__name__
==
'__main__'
:
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
bodies/fixed_stars/wr21a.py
浏览文件 @
8f611211
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
# link :https://gitcode.net/pythoncr/
# link :https://gitcode.net/pythoncr/
# python_version :3.8
# python_version :3.8
# ==============================================================================
# ==============================================================================
from
bodies
import
FixedStar
from
bodies
import
FixedStar
,
Sun
from
common.consts
import
MO
from
common.consts
import
MO
...
@@ -47,4 +47,8 @@ class WR21a(FixedStar):
...
@@ -47,4 +47,8 @@ class WR21a(FixedStar):
if
__name__
==
'__main__'
:
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
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录