# Minimum distance between a disk in 3d space and a point above the disk

## Main Question or Discussion Point

Hi all,
How can I calculate the minimum distance between the perimeter of a disk in 3d space and a point above the disk? (the point can be inside or outside the area above the disk)

I've been trying to work this out for a while, but i'm getting no where.

For example, a point at (1,1,1) and a disk with center (0,0,0) and radius 0.5. The distance between the centers is:

$$\sqrt{(1-0)^{2}+(1-0)^{2}+(1-0)^{2}} = \sqrt{3} \approx 1.73$$

But how can I work out the shortest distance from the point to a point on the perimeter of the disk?

Thanks!

http://imageshack.us/a/img838/5558/aujg.jpg [Broken]

Last edited by a moderator:

jedishrfu
Mentor

Rcenter + Rmin + Rradius = 0 and so Rmin = - (Rcenter + Rradius)

• 1 person
Thanks! That seems obvious now you've mentioned it aha. I was trying to do it using trigonometry.

Although shouldn't it be...

so in the example i gave

Rmin = (0.5,0,0) - (1,1,1)

Rmin = (-0.5,-1,-1)

so it has length 1.5

Last edited:
Also, I've just realised this only works when Rradius lies on the x axis. How would you find the vector Rradius (the vector between the disk center and min point on the perimeter) if it does not lie on the x axis?

I think i've figured this out, it would help if someone could verify if i'm doing this correctly though.

There is a particle at [5,5,5] above a disk with center [0,0,0] and radius 3. The disk is not tilted: It lies on the x,y plane.

To calculate the vector between the disk center, and the point on the perimeter of the disk that is closest to the particle:

1) calculate unit vector from center to particle

unitvec=[5,5,5]/|[5,5,5] = [0.5774, 0.5774, 0.5774]

2) set the z element to 0, and multiply by the radius

vec1=3*[0.5774, 0.5774, 0] = [1.7321,1.7321,0]

To calculate the vector between the particle and the point on the perimeter of the disk that is closest to the particle:

1) subtract the vectors

[5,5,5]-[1.7321,1.7321,0] = [3.2679, 3.2679, 5.0000]

The magnitude of this is the minimum distance. This is 6.8087

Am I making any mistakes here?

D H
Staff Emeritus
Your step 2 is erroneous. Your vector [1.7321,1.7321,0] does not represent a point on the perimeter of the disk.

Yeah I think the problem here is step two where you set the z coordinate to zero and assume that unitvec is still a unit vector. [0.5774, 0.5774, 0.5774] is a unit vector in 3d space, but [0.5774, 0.5774, 0] is not a unit vector on the x,y plane on which the disk lies. You can see for yourself if you evaluate (0.5774)^2+(0.5774)^2.

D H
Staff Emeritus
As I understand the problem, you need to find the distance between some point in 3D space and the perimeter of a disk (i.e., a circle). You do not have to find the point on circle that is closest to the point in question to solve this problem.

Break the problem into parts. Start with the 2D version of the problem, finding the distance between a point [x,y] and a circle of radius r centered at the origin. Hint: You do not need to solve for the coordinates of the point on the circle that is closest to the point [x,y] to determine the distance between this point and the circle.

the problem here is step two where you set the z coordinate to zero and assume that unitvec is still a unit vector.
You're right. I think this will be fixed if I project the particle position vector (the vector pointing from the disk center to the particle) onto the x,y plane by setting the z element to 0, and then normalising it, instead of normalising it and then projecting it onto the x,y plane.

so this will give a vector that points towards the position on the x,y plane that the particle is above, and it will have a magnitude of 1. So multiplying this by the radius will give the vector that points to the min point on the perimeter of the disk.

D H
Staff Emeritus
You do not need to solve for that point. The problem is much easier to solve by not finding the location of that point.

I need to find the closest distance to the particle. This is so that I can later work the solid angle subtended by the disk. Once I have worked out this distance I can use a similar method to work out the maximum distance, and then using these I can work out the solid angle subtended by the disk.

Hint: You do not need to solve for the coordinates of the point on the circle that is closest to the point [x,y] to determine the distance between this point and the circle.

I cannot think of a way of finding the distance between a point and a circle without first finding the coordinates of the closest point on the circle.

Unless I work out a general equation for the distance between coordinates on a circle and a point, and then find where the derivative of this equation equals zero to find the minimum.

However this method seems more difficult.

D H
Staff Emeritus
Think of the point [x,y] as being one point on a circle of some radius R with origin at the center.

What is the distance between two concentric circles, one of radius R and the other of radius r?

Think of the point [x,y] as being one point on a circle of some radius R with origin at the center.

What is the distance between two concentric circles, one of radius R and the other of radius r?
That distance will be R - r.

so if [x,y] is a point on the circle with radius R, and [a,b] is the location of the particle, then r will equal (a^2+b^2)^0.5

so the minimum distance between the circle and particle will be R-r

I can't work out how to use this method so that it will work in 3 dimensions though

D H
Staff Emeritus
That distance will be R - r.
Almost correct. What if R<r?

I can't work out how to use this method so that it will work in 3 dimensions though
Look at your own diagram. You have a triangle in it. One vertex is on the circle, another your point [x,y,z], the third is on the plane. One side is labeled Rmin, the side opposite the point [x,y,z] is a solid yellow-green line, and the third side is a dashed yellow-green line. The length of this third side is easy. You just figured how how compute the length of the side marked with a solid yellow-green line. All that is left is to compute the length of the side labeled Rmin.

What kind of triangle is this? (In other words, what is the angle between those two yellow-green sides?)

Almost correct. What if R<r?
Oh yeah, ((R-r)^2)^0.5 then.

Look at your own diagram. You have a triangle in it. One vertex is on the circle, another your point [x,y,z], the third is on the plane. One side is labeled Rmin, the side opposite the point [x,y,z] is a solid yellow-green line, and the third side is a dashed yellow-green line. The length of this third side is easy. You just figured how how compute the length of the side marked with a solid yellow-green line. All that is left is to compute the length of the side labeled Rmin.

What kind of triangle is this? (In other words, what is the angle between those two yellow-green sides?)
Ah okay, so I can just use pythagoras. Let me try my example again to see if I've got it.

There is a particle at [5,5,5] above a disk with center [0,0,0] and radius 3

R = 3

r = ( (5^2)+(5^2) +(0^2) )^0.5 = 7.071

distance between concentric circles = ((3-7.071)^2)^0.5 = 4.071

height (the dashed line) = 5

so Rmin = ( (4.071^2) + (5^2) )^0.5 = 6.448

Is this correct? I hope it is because this method seems much easier, thanks!

D H
Staff Emeritus
• 