Extend line in 3D space

1 view (last 30 days)
isfzade
isfzade on 2 Jul 2017
Edited: isfzade on 2 Jul 2017
Origin is at [xc,yc,zc] (known)
Point is at [xo,yo,zo] (known)
Original line is from [xc,yc,zc] to [xo,yo,zo]
Need to extend the line and new line will be from [xc,yc,zc] to [xp,yp,zp].
Magnitude distance, d, from [xo,yo,zo] to [xp,yp,zp] is also known. (ie. d=5 units)
How to find [xp,yp,zp] ?
  1 Comment
John D'Errico
John D'Errico on 2 Jul 2017
Edited: John D'Errico on 2 Jul 2017
Um, so what have you tried? IF nothing, then why not?
Can you create a vector of unit length that points in the direction of this line? How can you create a vector, given two points in space?
Hint #1: If you divide a vector by the norm of that vector, then the result has unit length, i.e., length will be 1.
Hint:2: If you have a vector that has unit length, and you want it to have length 5, you can multiply it by 5.

Sign in to comment.

Answers (0)

Categories

Find more on Computational Geometry in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!