Finding a 3D parallel vector
8 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
采纳的回答
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;
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linearization 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!