I need to plot this volume as a surface or patch. While I know how to plot a sphere or hemisphere (using sphere or ellipsoid), I can't figure out how to define the shape for other cases. I could use convhulln if not for the concave face at r=minimum range.
Can anyone offer any suggestions?
Thanks
Roger Stafford
How would I generate the meshes? Could you maybe give a simple example?
Thanks
r = 5;
[theta,phi] = meshgrid(linspace(0,.4*pi,32),linspace(-pi/2,pi/2,32));
x1 = r.*cos(theta).*cos(phi);
y1 = r.*sin(theta).*cos(phi);
z1 = r.*sin(phi);
theta = 0;
[r,phi] = meshgrid(linspace(0,5,32),linspace(-pi/2,pi/2,32));
x2 = r.*cos(theta).*cos(phi);
y2 = r.*sin(theta).*cos(phi);
z2 = r.*sin(phi);
theta = .4*pi;
[r,phi] = meshgrid(linspace(0,5,32),linspace(-pi/2,pi/2,32));
x3 = r.*cos(theta).*cos(phi);
y3 = r.*sin(theta).*cos(phi);
z3 = r.*sin(phi);
x = [x1;x2;x3];
y = [y1;y2;y3];
z = [z1;z2;z3];
surf(x,y,z)
axis square
Roger Stafford