MATLAB: How to make irregular 3d shape with spherical coordinates

meshsurfsurface

Hi, I have some different values of 'r' in spherical coordinates and want to plot 3d irregular surface. e.g, I have phi = [0,2pi] and theta = [0,pi/2], so for each phi and theta, I have different r value. I just want to plot the surface, with no color, and only showing the variation in r by 3d surface.

Best Answer

Attaching a sample code. I have converted the spherical coordinates to Cartesian, keeping radius variable as a vector. Further I have used surf function for the 3d plot.
Related Question