Surface point of collision of two spheres?

In summary, the conversation discusses the need to calculate the point of collision between two spheres of any size and mass in any orientation in space. The method of calculating collision detection and finding a point on a sphere are mentioned, and it is suggested to use the polar coordinates of the vector between the two spheres to determine the angles needed for calculation.
  • #1
rachmann
1
0
Hi!

I need to calculate the point (or average point) of actual collision between any two spheres of any size and mass in any orientation in space.

I understand that I can zero things out a bit by assuming that one sphere is centered at (0,0,0).


OK, I know how to calculate collision detection, I've seen many examples:

calculate distance from centres and subtract sum of radiuses (radii?? lol)

public static bool Collision(Sphere A, Sphere B)
{
bool results = false;
Vector3 centerA = new Vector3(A.x, A.y, A.z);
Vector3 centerB = new Vector3(B.x, B.y, B.z);

if (centerA.Distance(centerB) < (A.radius + B.radius))
{
results = true;
}
return results;
}



and I know how to caculate point on sphere:

public static Vector3 GetPointOnSphere(Vector3 sphereOrigin, double radius, double theta, double psi)
{
Vector3 results = new Vector3();

if ((psi >= 0 && psi <= (2 * Math.PI)) && (theta >= 0 && theta <= Math.PI))
{
// x = x0 + r * Sin theta * cos psi
// y = y0 + r * sin theta * sin psi
// z = z0 + r * cos theta
results.X = sphereOrigin.X + radius * Math.Sin(theta) * Math.Cos(psi);
results.Y = sphereOrigin.Y + radius * Math.Sin(theta) * Math.Sin(psi);
results.X = sphereOrigin.X + radius * Math.Cos(theta);
}
return results;
}

so, I guess I want to find psi and theta from the theoretical new line that stretches between the centres of both spheres. If sphere 2 is at 0,0,0, then what are the 2 angles that describes the direction to the centre of sphere 1?

Help!

(ps - yes I use Richard Potter's Vector3 class from CodeProject.com - thanks!)
 
Physics news on Phys.org
  • #2
The angles you'll need are the polar coordinates of the vector from sphere 1 to sphere 2. You can get them by taking the arctangent of the ratio of the components of the vector. For example, if the vector is (x,y,z) then the angles would be theta = arctan(z/y) and psi = arctan(x/y).
 

1. What is the surface point of collision of two spheres?

The surface point of collision of two spheres refers to the exact location where the two spheres make contact with each other. It is the point where the surfaces of the two spheres meet.

2. How is the surface point of collision of two spheres calculated?

The surface point of collision of two spheres can be calculated using mathematical equations that take into account the radius of the spheres, their position, and their velocity. These equations use principles of physics, such as conservation of energy and momentum, to determine the exact point of collision.

3. What factors affect the surface point of collision of two spheres?

The surface point of collision of two spheres can be affected by various factors, such as the size and shape of the spheres, their speed and direction of movement, and the angle at which they collide. Other factors, such as air resistance and friction, can also play a role in determining the surface point of collision.

4. Can the surface point of collision of two spheres be predicted?

Yes, the surface point of collision of two spheres can be predicted using mathematical models and simulations. By inputting the relevant variables and parameters, scientists can accurately calculate the point of collision and its corresponding outcome.

5. Why is the surface point of collision of two spheres important to study?

The surface point of collision of two spheres is important to study because it helps us understand the dynamics of collisions and interactions between objects. This knowledge is crucial in various fields, such as physics, engineering, and materials science, and can also be applied in practical applications, such as designing safer sports equipment or predicting the effects of collisions in car accidents.

Similar threads

  • Programming and Computer Science
Replies
3
Views
856
Replies
2
Views
3K
  • Introductory Physics Homework Help
Replies
6
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
2K
  • Introductory Physics Homework Help
Replies
11
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
2K
  • Calculus and Beyond Homework Help
Replies
4
Views
2K
  • Advanced Physics Homework Help
Replies
1
Views
3K
  • Advanced Physics Homework Help
Replies
3
Views
4K
Back
Top