pytrebuchet.plotting package
Plotting utilities for trebuchet simulations.
- pytrebuchet.plotting.animate_launch(simulation: Simulation, skip: int = 5, delay: float = 25, *, show: bool = True) FuncAnimation
Animate the trebuchet launch and projectile motion using matplotlib.
- Parameters:
simulation – Simulation instance with completed run
skip – Number of frames to skip for faster animation
delay – Delay between frames in milliseconds
show – Whether to display the animation immediately
- Returns:
None
- pytrebuchet.plotting.plot_initial_position(trebuchet: Trebuchet, *, show: bool = True) tuple[Figure, Axes]
Plot the initial position of the trebuchet and the projectile.
- Parameters:
trebuchet – Trebuchet instance
show – If True, display the plot immediately. Else, just return the figure and axes objects.
- Returns:
None