geodesic distances on a curved surface
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Gefen Livne
el 30 de Mayo de 2021
Comentada: darova
el 31 de Mayo de 2021
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
0 comentarios
Respuesta aceptada
darova
el 30 de Mayo de 2021
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))
2 comentarios
darova
el 31 de Mayo de 2021
See this
[x,y] = meshgrid(-5:5);
D = hypot(x,y);
surf(x,y,-D)
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!