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?

채택된 답변

Torsten
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
R = 1×3
1.0e-03 * 0.5410 -0.5200 -0.7300
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))
N = 1×3
-0.2016 -0.2352 0.9508
  댓글 수: 1
William Rose
William Rose 2022년 9월 30일
That was a nice fast answer fron @Torsten.
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
a = 130.5708
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)
W = -1.4265e-07
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개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by