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

Python超人-宇宙模拟器

上级 9a236fee
...@@ -24,11 +24,11 @@ if __name__ == '__main__': ...@@ -24,11 +24,11 @@ if __name__ == '__main__':
# 观看月相变化的过程:分别是 新月、蛾眉月、上弦月、盈凸、满月、亏凸、下弦月、残月 # 观看月相变化的过程:分别是 新月、蛾眉月、上弦月、盈凸、满月、亏凸、下弦月、残月
# 参考:images/moon/月相变化过程.jpeg # 参考:images/moon/月相变化过程.jpeg
# TODO: 月球在摄像机的前方(从 “新月” 开始) # TODO: 月球在摄像机的前方(从 “新月” 开始)
# moon_pos, moon_vel = [0, 0, 384400], [-(EARTH_INIT_VELOCITY + 1.023), 0, 0] moon_pos, moon_vel = [0, 0, 384400], [-(EARTH_INIT_VELOCITY + 1.023), 0, 0]
# TODO: 月球在摄像机的右方(从 “下弦月” 开始),将会从右方出现 # TODO: 月球在摄像机的右方(从 “下弦月” 开始),将会从右方出现
# moon_pos, moon_vel = [384400, 0, 0], [-EARTH_INIT_VELOCITY, 0, 1.023] # moon_pos, moon_vel = [384400, 0, 0], [-EARTH_INIT_VELOCITY, 0, 1.023]
# TODO: 月球在摄像机的左方(从 “上弦月” 开始) # TODO: 月球在摄像机的左方(从 “上弦月” 开始)
moon_pos, moon_vel = [-384400, 0, 0], [EARTH_INIT_VELOCITY, 0, -1.023] # moon_pos, moon_vel = [-384400, 0, 0], [EARTH_INIT_VELOCITY, 0, -1.023]
bodies = [ bodies = [
sun, sun,
......
...@@ -51,3 +51,21 @@ class BodyTrail(Entity): ...@@ -51,3 +51,21 @@ class BodyTrail(Entity):
a_text.parent = self a_text.parent = self
a_arrow.enabled = False a_arrow.enabled = False
a_line.enabled = False a_line.enabled = False
# class BodyTrail(Entity):
# def __init__(self, **kwargs):
# from_pos = (0, 0, 0)
# to_pos = (1, 1, 1)
# super().__init__(
# # model='line',
# model=Mesh(vertices=(from_pos, to_pos), mode='line', thickness=3),
# ignore_paused=True,
# **kwargs
# )
#
# def update(self):
# self.look_at(self.parent)
# # line = Entity(parent=parent,
# # model=Mesh(vertices=(from_pos * len_scale, to_pos * len_scale), mode='line', thickness=thickness),
# # color=color, alpha=alpha)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册