00:01
In this question we're asked to find an equation for the sphere with diameter pq, where p is this point and q is this point.
00:09
So let's just recall that the equation for the sphere will be x minus x of the center point squared plus y minus y center point squared plus z minus z center point squared equals r squared, where so the point x, c, y, c, z, c, is.
00:31
The center of the sphere and r is a radius.
00:36
Right, so we need to calculate two things.
00:38
The first thing is the center which we need to use p and q for and the second thing is the radius.
00:44
So let's start with the center, right? so the center c will be the point.
00:50
If p and q form a diameter, it means that they pass through the center and the average between p and q will be our center point.
01:00
So this is the code, the point.
01:01
Point with coordinates being the average of each of the coordinates of p and q between p and q.
01:07
So this will be first coordinate 1 plus 1 over 2, second coordinate 1 plus 5 over 2, third coordinate minus 7 plus 1 over 2, which is 1 plus 1 is 2 over 2 is 1, 1 plus 5 is 6 over 2 is 3, minus 7 plus 1 is minus 6 over 2, minus 3.
01:30
So this is the center.
01:31
And the radius will, of course, be half of the distance.
01:35
If p and q is a diameter, the radius is half a diameter.
01:39
So it will be 1 over 2 the distance between p and q.
01:45
Right? we want r squared.
01:47
So let's just square everything...