sun_earth.py 669 字节
Newer Older
M
march3 已提交
1
# -*- coding:utf-8 -*-
M
march3 已提交
2
# title           :
M
march3 已提交
3 4 5 6 7 8
# description     :
# author          :Python超人
# date            :2023-01-22
# notes           :
# python_version  :3.8
# ==============================================================================
M
march3 已提交
9 10 11
from bodies import Sun, Earth
from common.consts import SECONDS_PER_WEEK
from scenes.func import mayavi_run
M
march3 已提交
12

M
march3 已提交
13
if __name__ == '__main__':
M
march3 已提交
14 15 16
    """
    太阳、地球
    """
M
march3 已提交
17
    bodies = [
M
march3 已提交
18 19
        Sun(size_scale=1.2e2),                    # 太阳放大 120 倍
        Earth(size_scale=4e3, distance_scale=1),  # 地球放大 4000 倍,距离保持不变
M
march3 已提交
20
    ]
M
march3 已提交
21
    mayavi_run(bodies, SECONDS_PER_WEEK, view_azimuth=-45)