I am making a physics simulator and this problem is tricky. You have two freely moving objects with known masses and velocities in a frictionless environment. The first object is a ball and the second is a pipe. They are moving toward each other. I need to know what formulas are used to simulate the changes in their vectors. I attached an image for this problem.