# how to find point on the line with given distance and from given point

This topic is 3347 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi how to find point on the 3D line with given distance and from given point how to calculate the point on the 3D line from the given point,distance to looking point on line and the line equation please explain me the derivation

##### Share on other sites
Well to start you off, a specific distance from a given point will yield you a sphere with that distance as the radius. So the answer will be where the line intersects the sphere. I'm sure that there are plenty of resources online about intersecting a line and a sphere.

##### Share on other sites
First, find the distance between the point and the line. Paul Bourke has the derivation available here.

The point "C" on the line closest to the point "A" not on the line is the perpendicular corner of a right triangle. The distance you want is the hypotenuse of the right triangle. Use the pythagorean theorem to solve for the length of the other side. This length we call scalar "a" (not point "A"). The point "B" we are looking for is on the line, and completes the right triangle. There are actually two point "Bs", corresponding to "up" and "down" the line from C, in the direction of the line which we label with the normal vector "D". The values of "B" are therefore C+(a*D) and C-(a*D).

##### Share on other sites
This is not a web development question, so I'm moving it to game programming.

1. 1
2. 2
3. 3
Rutin
13
4. 4
5. 5

• 26
• 10
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633696
• Total Posts
3013390
×