필터 지우기
필터 지우기

Finding a 3D parallel vector

조회 수: 17 (최근 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 CenterFile Exchange에서 Graphics Object Programming에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by