문제

enter image description here

I know this topic is known - Continuous Collision Detection

I have 2 Spheres that I have to find intersection between them as shown in the image.

the equations refer to the upper draw and I need to find the minimal t and then check something about the distance. I have no idea what these equations mean.

  1. what is each variable? I guess p10 and p20 are the first positions and v1 \ v2 are the direction vectors.

  2. no acceleration, no mass..

  3. the equations refer to 2 spheres that move. if ONLY ONE sphere moves, the equations solve it too because then, the velocity of 1 sphere will be zero.

  4. so how do I have to solve the equations? to find the minimal t that....?

thanks a lot!

도움이 되었습니까?

해결책

This is probably a question for StackExchange Mathematics. But here's my answer: The two equations tell you where the centers P_1 and P_2 of the circles or balls are at some point in time t are. Now you need to find a value for t for which the distance between P_1 and P_2 is the sum of the radii which I will call d (like distance). According the the theorem of Pythagoras the square of the distance of the two points is the sum of the squares of the coordinate differences. This square of the distance is a quadratic polynomial in t, i.e. a*t*t+b*t+c. Now you can find the value of t where the two balls or circles collide by setting this equal to d*d and solving for t. If there is no solution, then the balls/circles won't collide.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top