assuming the path of the ball is linear, if the ball collides with the cube, I want to find which side the cube the ball collided with. this is a discreet problem, the ball's position and velocity are always known. the cube's size is bigger than the ball's size in the way that the ball's radius is negligible in this problem, and the time step is small enough so that the change in position of the ball in different time step is also small enough.
line equation using ball's current position and velocity
plane equation using 3 corners of a side of the cube
The Attempt at a Solution
I figured the collision took place once the ball just penetrates the cube, and the solution is to determine the line equation of the ball and the plane equation of the six sides of the box and determine which plane the line segment is intersecting.
the problem is I don't know how to calculate the equation of the line in 3D and equation of planes and then calculation for the intersections. I have forgotten much of the math needed to solve problems like this...