electrosim.rendering.trails#
Functions
|
Draw a simple polyline through a sequence of world positions. |
|
Render faded line segments approximating recent particle trajectories. |
- draw_trails(screen, particles, pixels_per_meter)[source]#
Render faded line segments approximating recent particle trajectories.
- Parameters:
screen (Surface)
particles (Iterable[Particle])
pixels_per_meter (float)
- Return type:
None
- draw_polyline_world(screen, points_world, color_rgb, width_px, pixels_per_meter)[source]#
Draw a simple polyline through a sequence of world positions.
- Parameters:
screen (pygame.Surface) – Target surface.
points_world (Iterable[tuple[float, float]]) – Sequence of (x, y) in meters.
color_rgb (tuple[int,int,int]) – Polyline color.
width_px (int) – Line width in pixels.
pixels_per_meter (float) – Pixels-per-meter scale.
- Return type:
None