# More of a math question, don't know the term to google it

If you can think of what the term may be so that I can google for this myself that would be perfect. Lets say I have a collection (array) of x,y points, doesn’t really matter what they are, heres the most basic example:

5,5
10,10
0,1
-5,-5

Heres my question. say I plot a line from 5,5 to -5,-5: I would like to know which other points are within a distance of x. If x = 3, 0,1 would be returned but 10,10 is obviously not within a distance of 3.

Again sorry for this, I dont need someone to teach me, just looking for the term so that I can do that on my own

Also, would the term be the same for a 3d plane? x,y and z?

For those interested, I think this source may be able to help me out:

http://math.stackexchange.com/questions/128061/check-if-point-is-on-or-below-line-when-either-x-or-y-0

I think you want the distance between a point and a line segment. Here’s another possibly helpful link… http://geomalgorithms.com/a02-_lines.html

Ah thank you. I’ve got an idea on how to force this operation on both a 2d and 3d plane, but I wonder if theres a smooth way of doing this in a programming language. I am messing with this (slowly) and will put my results here as I come up with results.

EDIT: Scrolling down I actually see your page provides code examples, aswesome!