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

Python超人-宇宙模拟器

上级 f0ff42c0
......@@ -42,7 +42,7 @@ def create_halley_comet(init_velocity, init_position):
def create_orbit_line(center_body, body, start_time):
orbital_days = int(math.ceil(body.orbital_days * 1.02))
orbital_days = int(math.ceil(body.orbital_days))
points = get_reality_orbit_points(type(body).__name__.lower(), start_time=start_time, days=orbital_days,
segments=100)
# print(points)
......
......@@ -29,10 +29,11 @@ class OrbitLine(Entity):
x, y, z = self.position[0], self.position[1], self.position[2]
for i, point in enumerate(self.points):
pos_x, pos_y, pos_z = point[0], point[1], point[2]
if i == 0:
next_pos = last_point
continue
elif i == len(self.points) - 1:
# if i == 0:
# next_pos = last_point
# continue
# el
if i == len(self.points) - 1:
next_pos = first_point
# continue
else:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册