フィルターのクリア

Reduce the length of the vector

4 ビュー (過去 30 日間)
Mirzobek Malikov
Mirzobek Malikov 2022 年 8 月 30 日
コメント済み: Mirzobek Malikov 2022 年 8 月 30 日
I have two points B1(2.91, 8.05, 43.85), A1(23.97, 4.65, 25) and center(4.15, 1.11, 25). I draw a circle using these three points. Then from these points I have two vectors to get a normal vector from the center. From my data, the normal vector length is too long. I have normalized the normal vector but in the plot its angle was different, when i checked the dot( N-O1, A1-O1) or dot( N-O1, B1-O1) were nonzero.
Is there any function or an approach to reduce the length of it by saving it to be a normal vector.
The normal vector gained by using cross(B1-O1, A1-O1) command.

採用された回答

Matt J
Matt J 2022 年 8 月 30 日
編集済み: Matt J 2022 年 8 月 30 日
when i checked the dot( N-O1, A1-O1) or dot( N-O1, B1-O1) were nonzero.
You should be checking dot( N, A1-O1)
B1=[2.91, 8.05, 43.85];
A1=[23.97, 4.65, 25];
O1=[4.15, 1.11, 25];
N=normalize( cross(B1-O1, A1-O1) ,'n');
norm(N)
ans = 1
dot(N,A1-O1)
ans = 4.4409e-16
dot(N,B1-O1)
ans = -4.9960e-16
  4 件のコメント
Matt J
Matt J 2022 年 8 月 30 日
編集済み: Matt J 2022 年 8 月 30 日
Sorry, I don't follow. By nature, normal vectors have direction. They do not have "position".
Mirzobek Malikov
Mirzobek Malikov 2022 年 8 月 30 日
it's ok. i found the solution to for changing direction of the normal vector. Just multiply N with minus. dot(-N, A1-O1) give zero value.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by