How can I generate a rotationally invariant surface from a profile?

1 view (last 30 days)
I have a vector, e.g. V = [1 2 3 4 3 2 1], that represents a profile through the center of a rotationally invariant surface. I'm trying to generate a matrix representing the surface.
Alternatively, if there's a spherical cap but all I have is a profile from one edge, through the center, how can I generate the spherical cap from the profile?
Thanks in advance for any help!

Accepted Answer

Matt J
Matt J on 20 Apr 2015
Edited: Matt J on 20 Apr 2015
Something like this, maybe
radius=length(V)-1;
[X,Y]=ndgrid(linspace(0,radius,100););
R=sqrt(X.^2+Y.^2);
surfaceSamples=interp1(0:radius,V,R(:));
surfaceSamples=reshape(surfaceSamples,size(X));
surf(X,Y,surfaceSamples);
  3 Comments
Matt J
Matt J on 20 Apr 2015
This line controls the region sampled. Going from -radius to radius should include all quadrants.
[X,Y]=ndgrid(linspace(-radius,radius,100););

Sign in to comment.

More Answers (0)

Categories

Find more on Interpolation in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!