March 2017
Intermediate to advanced
480 pages
11h 3m
English
To check if two spheres overlap, we check if the distance between them is less than the sum of their radii. We can avoid an expensive square root operation by checking the square distance between the spheres against the squared sum of their radii:

Checking if two 3D spheres intersect is very similar to checking if two 2D circles intersect. We are going to implement a new function to check if two spheres intersect. This is the simplest 3D intersection function we are going to write.
Follow the given steps to implement sphere-to-sphere intersection testing:
SphereSphere function in Geometry3D.hRead now
Unlock full access