section volume by interception between cylinder and sphere?
1 view (last 30 days)
Show older comments
z1=linspace(-1,1,40);
theta=linspace(0,2*pi,40);
[z1,theta]=meshgrid(z1,theta);
r=1;
x1=r*cos(theta);
y1=r*sin(theta);
[x2,y2,z2]=sphere(40);
s1=surf(x1, y1+1, z1, 'FaceColor', [0.5 1.0 0.5]);
s1.FaceAlpha = 0.5;
s2=surface(x2, y2-1/2, z2, 'FaceColor', [1.0 0.5 0.0]);
s2.FaceAlpha = 0.95;
colormap([.0 1.0 .0]);
grid on
box on
axis equal on
view([45, 30])
xlabel('eje x')
ylabel('eje y')
zlabel('eje z')
Answers (0)
See Also
Categories
Find more on Surface and Mesh Plots 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!