Text this: The mathematics of ship slamming