Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Python_超人
宇宙模拟器
提交
33f7d6af
宇宙模拟器
项目概览
Python_超人
/
宇宙模拟器
通知
19
Star
2
Fork
0
代码
文件
提交
分支
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看板
提交
33f7d6af
编写于
11月 06, 2023
作者:
三月三net
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Python超人-宇宙模拟器
上级
4c67a8b1
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
44 addition
and
10 deletion
+44
-10
docs/halley_comet/哈雷彗星的轨道.png
docs/halley_comet/哈雷彗星的轨道.png
+0
-0
docs/halley_comet/哈雷彗星轨道2.jpg
docs/halley_comet/哈雷彗星轨道2.jpg
+0
-0
sim_scenes/solar_system/halley_comet_sim.py
sim_scenes/solar_system/halley_comet_sim.py
+40
-6
sim_scenes/solar_system/halley_comet_sim_02.py
sim_scenes/solar_system/halley_comet_sim_02.py
+2
-2
sim_scenes/solar_system/halley_comet_sim_03.py
sim_scenes/solar_system/halley_comet_sim_03.py
+2
-2
未找到文件。
docs/halley_comet/哈雷彗星的轨道.png
0 → 100644
浏览文件 @
33f7d6af
104.7 KB
docs/halley_comet/哈雷彗星轨道2.jpg
0 → 100644
浏览文件 @
33f7d6af
67.5 KB
sim_scenes/solar_system/halley_comet_sim.py
浏览文件 @
33f7d6af
...
...
@@ -235,19 +235,22 @@ class HalleyCometSim:
if
not
hasattr
(
self
,
"comet_peri"
):
self
.
comet_peri
=
d_sun
self
.
comet_peri_dt
=
dt
.
strftime
(
"%Y-%m-%d"
)
elif
d_sun
<
self
.
comet_peri
:
self
.
comet_peri
=
d_sun
self
.
comet_peri_dt
=
dt
.
strftime
(
"%Y-%m-%d"
)
# 哈雷彗星离太阳最远的点称为 "aphelion of Halley's Comet"(远日点)
if
not
hasattr
(
self
,
"comet_aphel"
):
self
.
comet_aphel
=
d_sun
self
.
comet_aphel_dt
=
dt
.
strftime
(
"%Y-%m-%d"
)
elif
d_sun
>
self
.
comet_aphel
:
self
.
comet_aphel
=
d_sun
self
.
comet_aphel_dt
=
dt
.
strftime
(
"%Y-%m-%d"
)
panel_text
=
"哈雷彗星:
\n
距离太阳:%.3f AU"
%
(
d_sun
/
AU
)
panel_text
+=
"
\n
离日最远:%.3f AU
"
%
(
self
.
comet_aphel
/
AU
)
panel_text
+=
"
\n
离日最近:%.3f AU
"
%
(
self
.
comet_peri
/
AU
)
panel_text
+=
"
\n
离日最远:%.3f AU
(%s)"
%
(
self
.
comet_aphel
/
AU
,
self
.
comet_aphel_dt
)
panel_text
+=
"
\n
离日最近:%.3f AU
(%s)"
%
(
self
.
comet_peri
/
AU
,
self
.
comet_peri_dt
)
panel_text
+=
"
\n
距离地球:%.3f AU"
%
(
d_earth
/
AU
)
velocity
,
_
=
get_value_direction_vectors
(
self
.
halley_comet
.
velocity
)
panel_text
+=
"
\n
当前速度:%.3f km/s"
%
velocity
...
...
@@ -286,11 +289,42 @@ if __name__ == '__main__':
# [3.34, 0, 10.712] 2061-5
# [3.34, 0, 10.715] 2061-6-24
# [3.34, 0, 10.718] 2061-8
# init_velocity=[3.34, 0, 10.718],
# init_position=[0, 0.5 * AU, -10 * AU]
# init_velocity=[-3.34, 3, 10.718],
# init_position=[0, -2 * AU, -10 * AU]) \
# 远日点: 35.1 AU(2023年12月9日)
# 近日点: 0.586 AU 上次通过近日点:1986年2月9日 下次通过近日点:2061年7月28日
# 2019年5月6日 34.772
params
=
HalleyCometParams
(
start_time
=
'198
3-03-20
00:00:00'
,
init_velocity
=
[
3.34
,
0
,
10.718
],
init_position
=
[
0
,
0.
5
*
AU
,
-
10
*
AU
]
start_time
=
'198
2-09-24
00:00:00'
,
init_velocity
=
[
-
2.836
,
4.705
,
8.85
],
init_position
=
[
0
,
-
5
*
AU
,
-
10
*
AU
]
)
# start_time='1982-09-24 00:00:00',
# init_velocity=[-2.836, 4.705, 8.85],
# init_position=[0, -5 * AU, -10 * AU]
# 34.801 AU(2019-06-10)
# 35.086 AU(2023-09-01)
# 0.586 AU(1986-02-09)
# start_time='1982-09-24 00:00:00',
# init_velocity=[-2.837, 4.71, 8.852],
# init_position=[0, -5 * AU, -10 * AU]
# 34.840AU34.840 AU(2019-05-10)
# 35.149 AU(2023-10-08)
# 0.586 AU(1986-02-09)
# 35.198 AU(2023-11-07)
# 0.588 AU(1986-02-09)
# start_time='1982-09-24 00:00:00',
# init_velocity=[-2.841, 4.7, 8.86],
# init_position=[0, -5 * AU, -10 * AU]
sim
=
HalleyCometSim
(
params
)
sim
.
build
()
...
...
sim_scenes/solar_system/halley_comet_sim_02.py
浏览文件 @
33f7d6af
...
...
@@ -93,8 +93,8 @@ class HalleyCometSim:
self
.
halley_comet
=
HalleComet
(
# size_scale=4e7,
size_scale
=
1e8
,
init_velocity
=
[
3.34
,
0
,
10.718
],
init_position
=
[
0
,
0.
5
*
AU
,
-
10
*
AU
])
\
init_velocity
=
[
-
2.836
,
4.705
,
8.85
],
init_position
=
[
0
,
-
5
*
AU
,
-
10
*
AU
])
\
.
set_light_disable
(
True
)
self
.
bodies
.
append
(
self
.
halley_comet
)
...
...
sim_scenes/solar_system/halley_comet_sim_03.py
浏览文件 @
33f7d6af
...
...
@@ -68,8 +68,8 @@ class HalleyCometSim:
# 每76.1年环绕太阳一周的周期彗星
self
.
halley_comet
=
HalleComet
(
# size_scale=4e7,
size_scale
=
1e8
,
init_velocity
=
[
3.34
,
0
,
10.718
],
init_position
=
[
0
,
0.5
*
AU
,
-
10
*
AU
])
\
init_velocity
=
[
-
3.34
,
3
,
10.718
],
init_position
=
[
0
,
-
2
*
AU
,
-
10
*
AU
])
\
.
set_light_disable
(
True
)
self
.
bodies
.
append
(
self
.
halley_comet
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录