From 62ca2e935057f00262d7eafa2c56b8c9e97963bc Mon Sep 17 00:00:00 2001 From: march3 Date: Sun, 30 Jun 2024 09:35:26 +0800 Subject: [PATCH] =?UTF-8?q?Python=E8=B6=85=E4=BA=BA-=E5=AE=87=E5=AE=99?= =?UTF-8?q?=E6=A8=A1=E6=8B=9F=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../center_point_moving_sun_to_earth.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/sim_scenes/featured/center_point_moving_sun_to_earth.py b/sim_scenes/featured/center_point_moving_sun_to_earth.py index 995da3d..81de2b3 100644 --- a/sim_scenes/featured/center_point_moving_sun_to_earth.py +++ b/sim_scenes/featured/center_point_moving_sun_to_earth.py @@ -35,7 +35,8 @@ class CenterPointMovingSimLive(EarthSeasonsSimBase): delay_run=False, look_at_earth=False, earth_cn_size_factor=1.01, - earth_clouds_size_factor=1.015) + earth_clouds_size_factor=1.015, + show_name=False) self.start_time = '2023-12-20 00:00:00' self.sun.size_scale = 5.5e1 self.earth.size_scale = 2e3 @@ -60,8 +61,9 @@ class CenterPointMovingSimLive(EarthSeasonsSimBase): self.last_year = None for body in self.bodies: + body.show_name = False if isinstance(body, Earth): - body.show_name = False + body.rotate_angle -= 22 body.rotation_speed *= 2.5 body.set_resolution(50) @@ -92,7 +94,7 @@ class CenterPointMovingSimLive(EarthSeasonsSimBase): segments=100) # print(points) orbit_line = create_orbit_by_points(center_body.position, points, line_color=body.trail_color, - alpha=alpha, thickness=4) + alpha=alpha, thickness=2) return orbit_line def create_orbit_lines(self): @@ -109,7 +111,7 @@ class CenterPointMovingSimLive(EarthSeasonsSimBase): else: alpha = 0.2 start_time = conv_to_astropy_time(self.start_time) - orbit_line = self.create_orbit_line(self.sun, body, start_time, alpha=0.8) + orbit_line = self.create_orbit_line(self.sun, body, start_time, alpha=0.4) if orbit_line is not None: self.orbit_lines.append(orbit_line) return self.orbit_lines @@ -182,14 +184,14 @@ class CenterPointMovingSimLive(EarthSeasonsSimBase): UrsinaConfig.trail_type = "curve_line" UrsinaConfig.trail_length = 180 # UrsinaConfig.trail_length = 1000 - UrsinaConfig.trail_thickness_factor = 4 + UrsinaConfig.trail_thickness_factor = 3 UrsinaConfig.trail_alpha = 0.8 UrsinaConfig.trail_factor = 4 for body in self.bodies: - body.planet.trail_scale = 0.5 + body.planet.trail_scale = 0.3 - self.moon.planet.trail_scale = 0.5 + self.moon.planet.trail_scale = 0.3 # WorldGrid().draw_axises(100) @@ -199,7 +201,7 @@ class CenterPointMovingSimLive(EarthSeasonsSimBase): destroy(self.earth_clouds.planet) destroy(self.earth_cn.planet) - self.earth.planet.name_text.enabled = False + # self.earth.planet.name_text.enabled = False self.moon.planet.rotation_y = 180 @@ -331,6 +333,7 @@ if __name__ == '__main__': 摄像机以太阳的视角看地球(四季和24节气) """ sim = CenterPointMovingSimLive() + UniverseSimScenes.set_window_size((1920, 1079), False) sim.run( dt=SECONDS_PER_DAY * 15, # dt=SECONDS_PER_DAY * 3, -- GitLab