Resultant vector from three different location and normal vector of a plane
조회 수: 13 (최근 30일)
이전 댓글 표시
Hey, I have three vector in the xyz space.
How to compute the Resultant vector from these three vectors, they are
0.000326 -0.00018 -0.00017
0.000365 -0.00016 -0.00017
-0.00015 -0.00018 -0.00039
and their start coordinates are
2.53493 2.47587 2.47282
2.54089 2.48301 2.47585
2.4791 2.47583 2.46097
these start coordinates can form a plane, how to calculate the normal vector of this plane?
댓글 수: 0
채택된 답변
Torsten
2022년 9월 30일
v1 = [0.000326 -0.00018 -0.00017 ];
v2 = [0.000365 -0.00016 -0.00017 ];
v3 = [-0.00015 -0.00018 -0.00039 ];
% compute resultant
R = v1 + v2 + v3
P1 = [2.53493 2.47587 2.47282 ];
P2 = [2.54089 2.48301 2.47585 ];
P3 = [2.4791 2.47583 2.46097 ];
% compute normal
N = cross(P2-P1,P3-P1)/norm(cross(P2-P1,P3-P1))
댓글 수: 1
William Rose
2022년 9월 30일
In case it is onf interest to you (and I think it is of interest, based on your other posts):
The resultant vector is not aligned with the normal.
v1 = [0.000326 -0.00018 -0.00017 ];
v2 = [0.000365 -0.00016 -0.00017 ];
v3 = [-0.00015 -0.00018 -0.00039 ];
R = v1 + v2 + v3; % resultant
P1 = [2.53493 2.47587 2.47282 ];
P2 = [2.54089 2.48301 2.47585 ];
P3 = [2.47910 2.47583 2.46097 ];
N = cross(P2-P1,P3-P1)/norm(cross(P2-P1,P3-P1)); % unit normal
The angle between them (in degrees) is
a=acos(dot(R,N)/(norm( R)*norm(N)))*180/pi
An angle a=180-130.6 is equally valid, since the direction of N depends on the side order chosen when computing the cross product, and that choice seems arbitrary.
If you are computing Work = force * displacement = pressure * area * displacement, as you said in a separate thread, you should use the dot product (inner product):
Pr=1; %pressure
A=0.5*norm(cross(P2-P1,P3-P1)); %area
W=Pr*A*dot(N,R) %work (up to a sign)
where Pr=pressure, A=area, N=unit normal, R=displacement. Pr and A are scalars, N and R are vectors. You will determine the sign for W based on your understanding of the physics.
추가 답변 (0개)
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!