1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!


  1. Sep 28, 2006 #1
    I have a simple question.

    Assume we have 2 points in 3D space with known coordinates:
    #1 (x1,y1,z1)
    #2 (x2,y2,z2)
    How to find coordinates of point #3 (x,y,z) belongs to the same line with known distance D from point#1?
    Equation for transformation will be helpful...

    Thanks in advance.
  2. jcsd
  3. Sep 28, 2006 #2
    A line in 3d space can be written as two functions that goes through the origin has two equations:

    y = mx


    z/(y^2 + x^2)^1/2 = +- C

    Where C is a constant.

    Finally the distance between two points in 3d space is given by

    (x^2 + y^2 + z^2)^1/2

    Work around that...
    Last edited: Sep 28, 2006
  4. Sep 29, 2006 #3


    User Avatar
    Science Advisor

    For example, find the points on the line through (1, 0, 1) and (2, 2, 2) that are a distance d from (1, 0, 1). The vector from (1, 0, 1) to (2, 2, 2) is (2-1)i+ (2-0)j+ (2-1)k= i+ 2j+ k so parametric equations of the line are x= t+ 1, y= 2t, z= t+ 1. The distance from any point (x, y, z) to (1, 0, 1) is [itex]\sqrt{(x-1)^2+ y^2+ (z-1)^2}[/itex]. Replace x, y, z with their expressions in terms of the parameter t, set equal to d and solve for t:
    [tex]\sqrt{(t+1-1)^2+ (2t)^2+ (t+1-1)^2}= \sqrt{4t^2}= 2|t|= d[/itex]
    There are two solutions because there are two such points, one on either side of (1, 0, 1).
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook