Cart catches ball

This applet models a cart rolling from rest down a frictionless inclined plane; just as the cart begins its motion, a ball is projected upward perpendicular to the inclined plane (the angle of which is adjustable with a slider), with some initial velocity (slider). The ball proceeds in a vacuum, following its trajectory as the cart accelerates down the ramp. As strange as it may seem, with these idealized assumptions the ball will be "caught" by the cart, that is, they arrive at a point (indicated by the cross) at the same instant of time. The model is developed in the rotated coordinate system; in that system gravity is oriented such that there are components of gravitational acceleration in both the x and y directions. In the arrangement used here, the rotation angle is negative (the coordinate system is tilted downward from the horizontal). The parametric equations of motion are then rotated back to the usual horizontal/vertical system for plotting, using a rotation matrix, with the negative angle. The parametric equations in the un-rotated system are shown on the graphic. The time is controlled by a slider, and this slider is animated. Press the button at lower left to run the animation. When adjusting the angle of the inclined plane, adjust the initial velocity of the ball so that the cross falls on the plane.