Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/examples/throwingaxe.ipynb
Views: 531
Throwing Axes
Modeling and Simulation in Python
Copyright 2021 Allen Downey
License: Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
My favorite event at Lumberjack Competitions is axe throwing. The axes used for this event typically weigh 1.5 to 2 kg, with handles roughly 0.7 m long. They are thrown overhead at a target typically 6 m away and 1.5 m off the ground. Normally, the axe makes one full rotation in the air to hit the target blade first, with the handle close to vertical.
Here's a version of make_system
that sets the initial conditions.
The state variables are x, y, theta, vx, vy, omega, where theta is the orientation (angle) of the axe in radians and omega is the angular velocity in radians per second.
I chose initial conditions based on videos of axe throwing.
As a simple starting place, I ignore drag, so vx
and omega
are constant, and ay
is just -g
.
As always, let's test the slope function with the initial conditions.
And then run the simulation.
Visualizing the results
The simplest way to visualize the results is to plot the state variables as a function of time.
We can plot the velocities the same way.
Another way to visualize the results is to plot y versus x. The result is the trajectory through the plane of motion.
Animation
Animating this system is a little more complicated, if we want to show the shape and orientation of the axe.
It is useful to construct a frame with along the handle of the axe and perpendicular.
Now we're ready to animate the results. The following figure shows the frame and the labeled points A, B, C, and D.
During the animation, the parts of the axe seem to slide around relative to each other. I think that's because the lines and circles get rounded off to the nearest pixel.
Here's the final state of the axe at the point of impact (assuming the target is 8 m away).
Exercises
Exercise: Find the starting conditions that make the final height of the COG as close as possible to 1.5 m. Ideally, the final angle should be a little past vertical.