geodesic distances on a curved surface

10 ビュー (過去 30 日間)
Gefen Livne
Gefen Livne 2021 年 5 月 30 日
コメント済み: darova 2021 年 5 月 31 日
Hi,
I have a curved surface and I want to calculate the geodesic distances from its boundaries.
the surface and boundary matrices are attached
appreciate your help.
Thanks,
Gefen

採用された回答

darova
darova 2021 年 5 月 30 日
Here is an example
[x,y,z] = peaks(20); % surface
% curve coordinates
x1 = linspace(-3,2,20);
y1 = linspace(-1,1,20);
z1 = interp2(x,y,z,x1,y1);
surf(x,y,z,'edgecolor',[1 1 1]*0.8)
line(x1,y1,z1,'color','red','linewidth',2)
% calculate curve length
L = sum(sqrt(diff(x1).^2+diff(y1).^2+diff(z1).^2))
L = 11.7772
  2 件のコメント
Gefen Livne
Gefen Livne 2021 年 5 月 31 日
Hi,
Thank you for your help. I need to calculate the entire geodesic distances matrix from the object's boundary and not from the matrix boundaries.
something similar to the matrix Im attaching below- the 2D projected distances from the boundary
appriciate your help,
Gefen
darova
darova 2021 年 5 月 31 日
See this
[x,y] = meshgrid(-5:5);
D = hypot(x,y);
surf(x,y,-D)

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGeometric Geodesy についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by