提交 fd760ec1 编写于 作者: 三月三net's avatar 三月三net

Python超人-宇宙模拟器

上级 11051bfd
......@@ -5,11 +5,13 @@
# 介绍
《宇宙模拟器》是一个基于Python语言的开源项目,通过万有引力定理来模拟宇宙的运行轨迹。该项目包含了太阳系中各行星的轨迹和运行状态,可以进行任意角度观察和交互操作。同时,该项目还模拟了引力弹弓的实验、月球的月相变化过程和戴森球的模拟等等。此外,该项目还包含了三体模拟,帮助用户更好地理解三体问题。这个项目不仅可以让你更深入地了解宇宙,还可以为你提供一个学习Python3D编程的平台。
# 模拟器效果图
<img src="https://gitcode.net/pythoncr/three_body_sim/-/raw/master/images/solar_system_3.png" width="80.7%">
<img src="https://gitcode.net/pythoncr/universe_sim/-/raw/master/images/1.png" width="80.7%">
<img src="https://gitcode.net/pythoncr/universe_sim/-/raw/master/images/2.png" width="80.7%">
<img src="https://gitcode.net/pythoncr/universe_sim/-/raw/master/images/3.png" width="80.7%">
<img src="https://gitcode.net/pythoncr/universe_sim/-/raw/master/images/4.png" width="80.7%">
# 抖音课堂:
<img src="https://gitcode.net/pythoncr/three_body_sim/-/raw/master/images/douyin_x.jpg" width="40%">
<img src="https://gitcode.net/pythoncr/universe_sim/-/raw/master/images/douyin_x.jpg" width="40%">
# 课程下载
https://gitcode.net/pythoncr/universe_sim
......
......@@ -20,7 +20,7 @@ if __name__ == '__main__':
# 以下展示的效果为太阳系真实的距离
# 由于宇宙空间尺度非常大,如果按照实际的天体大小,则无法看到天体,因此需要对天体的尺寸进行放大
sun = Sun(name="太阳", size_scale=0.8e2) # 太阳放大 80 倍,距离保持不变
# sun.init_velocity = [0, 0, 2] # 太阳带着其他行星一起跑
sun.init_velocity = [0, 0, 2] # 太阳带着其他行星一起跑
bodies = [
sun,
Mercury(name="水星", size_scale=4e3), # 水星放大 4000 倍,距离保持不变
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册