提交 8b5358af 编写于 作者: M march3

三体运行模拟器

上级 bac2ca3a
# -*- coding:utf-8 -*-
# title :
# description :
# title :Mayavi天体运行模拟器
# description :Mayavi天体运行模拟器
# author :Python超人
# date :2023-02-11
# link :https://gitcode.net/pythoncr/
......@@ -16,6 +16,7 @@ class MayaviSimulator(Simulator):
"""
Mayavi天体运行模拟器
"""
def __init__(self, bodies_sys: System):
super().__init__(bodies_sys, MayaviView)
......@@ -27,3 +28,18 @@ class MayaviSimulator(Simulator):
# Updating scene...
f.scene.render()
yield
if __name__ == '__main__':
from scenes.func import mayavi_run
from bodies import Sun, Earth
from common.consts import SECONDS_PER_WEEK
"""
太阳、地球
"""
bodies = [
Sun(size_scale=1.2e2), # 太阳放大 120 倍
Earth(size_scale=4e3, distance_scale=1), # 地球放大 4000 倍,距离保持不变
]
mayavi_run(bodies, SECONDS_PER_WEEK)
# -*- coding:utf-8 -*-
# title :
# description :
# title :matplotlib天体运行模拟器
# description :matplotlib天体运行模拟器
# author :Python超人
# date :2023-02-11
# link :https://gitcode.net/pythoncr/
......
# -*- coding:utf-8 -*-
# title :
# description :
# title :天体运行模拟器
# description :天体运行模拟器
# author :Python超人
# date :2023-02-11
# link :https://gitcode.net/pythoncr/
......
# -*- coding:utf-8 -*-
# title :
# description :
# title :天体视图
# description :天体视图(天体效果展示用)
# author :Python超人
# date :2023-02-11
# link :https://gitcode.net/pythoncr/
......
# -*- coding:utf-8 -*-
# title :
# description :
# title :Mayavi天体视图
# description :Mayavi天体视图(天体效果展示用,需要安装 mayavi)
# author :Python超人
# date :2023-02-11
# link :https://gitcode.net/pythoncr/
......
# -*- coding:utf-8 -*-
# title :
# description :
# title :matplotlib天体视图
# description :matplotlib天体视图(天体效果展示用)
# author :Python超人
# date :2023-02-11
# link :https://gitcode.net/pythoncr/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册