Projectile with Linear Air Drag from a Moving Car
Problem
**Problem Statement** A car moves horizontally with a constant velocity of 20 m/s. From this moving car, a ball is thrown straight upward with an initial vertical velocity of 10 m/s relative to the car. The ball experiences two forces: gravity acting downward and air resistance proportional to its velocity. The drag force always acts opposite to the direction of motion. The ball has a mass of 0.2 kg, the linear drag coefficient is 0.1 kg/s, and gravitational acceleration is 9.8 m/s². At time t = 0, the ball is at position x = 0, y = 0 with initial velocities v_x = 20 m/s and v_y = 10 m/s. You must model the ball’s horizontal and vertical position and velocity over time using the given physical forces and determine whether the ball ever returns to the moving car. The car continues moving at constant velocity, so its position is x_c(t) = 20t. Your task is to compute the motion of the ball, find the time at which it lands (when y returns to 0), and check whether its horizontal position matches the car’s position at that moment. Use the equations of motion under linear drag: dv_x/dt = -(k/m) v_x dv_y/dt = -g -(k/m) v_y dx/dt = v_x dy/dt = v_y
Explanation
This visualization shows the 2D motion of a ball thrown upward from a car that moves at constant horizontal speed, under gravity and linear air drag. Both the car and the ball start aligned at (x=0, y=0). The car keeps moving at constant horizontal velocity, while the ball slows horizontally due to drag and vertically due to both drag and gravity. The aim is to see whether, and under what conditions, the ball returns to the car when it comes back down to the road (y = 0). The car is drawn as a neon rectangle on the ground, and the ball follows a glowing trajectory. You can adjust the car speed, the vertical launch speed, gravity, drag, and the ball mass, then replay the throw. When the ball crosses y=0 downward, the visualization marks the landing point and shows how far it is from the car’s position at that moment, helping you understand how linear drag alters the otherwise simple parabolic motion.