How to find the extremum search curve of a parametric surface?

5 views (last 30 days)
I have a parametric surface S(u,v). Can anybody help me solve the differential equation to find the extremum search curve like the pictures below?
These curves passe the local maxima and minima of the surface (z direction).
The extremum search curve is represented as:
Example:
syms u v;
x=u;
y=v;
z=sin(u).*cos(v)-1/8*u*v;
figure; fsurf(x,y,z,[0 2*pi 0 2*pi]);axis equal
or
Thank you so much!
  5 Comments
DAT THAN TRONG KHANH
DAT THAN TRONG KHANH on 8 Jul 2019
Thank you for your answer.
For finding the local extrema, I can use this code (Image Processing Toolbox)
clc
syms u v;
x=u;
y=v;
z=sin(u).*cos(v)-1/8*u*v;
%figure; fsurf(x,y,z,[0 2*pi 0 2*pi]);axis equal
deltaU=0.2; deltaV=0.2;
Ui=0:deltaU:2*pi;
Vi=0:deltaV:2*pi;
[ui, vi] = meshgrid(Ui,Vi);
SX = double(subs(x, {u v}, { ui vi }));
SY = double(subs(y, {u v}, { ui vi }));
SZ = double(subs(z, {u v}, { ui vi }));
figure; surf(SX, SY, SZ); % ith patch of a piecewise surface3
%axis equal
xlabel('x');ylabel('y');xlabel('z');
ix = find(imregionalmax(SZ));
iy = find(imregionalmax(-SZ));
hold on
plot3(SX(ix),SY(ix),SZ(ix),'r*','MarkerSize',24)
plot3(SX(iy),SY(iy),SZ(iy),'b*','MarkerSize',24)
But I want to find the extremum search curve as figure above.
DAT THAN TRONG KHANH
DAT THAN TRONG KHANH on 8 Jul 2019
There are 4 local maxima points and 3 local minima points.
untitled12.png
When I solve the differential equation, I just get 2 extremum search curves.
untitled14.png

Sign in to comment.

Accepted Answer

darova
darova on 8 Jul 2019
If you have specific point (local max or min) you can substitute (x0,y0) in your function
- first search curve (any x)
- second search curve (any y)
Untitled.png
  16 Comments
DAT THAN TRONG KHANH
DAT THAN TRONG KHANH on 12 Jul 2019
Edited: DAT THAN TRONG KHANH on 17 Jul 2019
Thank you for your answer,
I have a Bspline surface like that:
Can you help me to generate the parametric curve (the spiral curve above) that is mapped into the BSpline surface with the same method above?
Thank you so much!
darova
darova on 12 Jul 2019
You have to learn/understand how griddata works. You already have X,Y and Z data
Generate x,y and use griddata to calculate z
Use interparc if interpolation is needed
It is easy. Gool luck!

Sign in to comment.

More Answers (0)

Categories

Find more on Spline Postprocessing in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!