Finding a 3D parallel vector

7 ビュー (過去 30 日間)
Alonso Figueroa
Alonso Figueroa 2018 年 7 月 24 日
コメント済み: Alonso Figueroa 2018 年 7 月 25 日
Hello,
I am looking for a unit vector that starts at a point (l,m,n) and it's, at the same time, parallel to the line that goes from (a,b,c) to (d,e,f). Can anyone help me with this problem?
Thank you, AF.

採用された回答

James Tursa
James Tursa 2018 年 7 月 24 日
編集済み: James Tursa 2018 年 7 月 24 日
A unit vector parallel to the points from (a,b,c) to (d,e,f) is just this:
v1 = [a,b,c];
v2 = [d,e,f];
u = v2 - v1;
u = u/norm(u);
A point on a parallel line that goes through (l,m,n) is then just this:
p = [l,m,n];
x = any scalar value
point_on_line = p + x * u;
  1 件のコメント
Alonso Figueroa
Alonso Figueroa 2018 年 7 月 25 日
Great, thank you James!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLinearization についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by