mpl_view.py 808 字节
Newer Older
M
march3 已提交
1
# -*- coding:utf-8 -*-
M
march3 已提交
2 3
# title           :matplotlib天体视图
# description     :matplotlib天体视图(天体效果展示用)
M
march3 已提交
4
# author          :Python超人
M
march3 已提交
5 6
# date            :2023-02-11
# link            :https://gitcode.net/pythoncr/
M
march3 已提交
7 8 9 10 11 12
# python_version  :3.8
# ==============================================================================
import os
import matplotlib.pyplot as plt
from common.func import get_dominant_colors

M
march3 已提交
13
from simulators.views.body_view import BodyView
M
march3 已提交
14 15 16 17 18 19 20 21 22 23 24 25
import numpy as np


class MplView(BodyView):
    """
    matplotlib天体视图(天体效果展示用)
    """

    def update(self):
        pass

    def appear(self):
三月三net's avatar
三月三net 已提交
26 27 28
        if hasattr(self.body, "torus_stars"):
            # 暂不支持环状小行星群
            return
M
march3 已提交
29 30

    def disappear(self):
三月三net's avatar
三月三net 已提交
31
        pass