Plotting a 3D millstone with surfaces
4 次查看(过去 30 天)
显示 更早的评论
I need to plot a Millstone with given radius (outside and inside), aswell as a given thickness.
As seen below I can plot the circles but don´t know how to produce the surfaces.

any help would be much appreciated.
0 个评论
采纳的回答
Star Strider
2022-6-22
I am not certain what you want.
Try something like this —
[X1,Y1,Z1] = cylinder(0.2,50);
[X2,Y2,Z2] = cylinder(1.0,50);
Z1 = 0.25*Z1;
Z2 = 0.25*Z2;
C = [1 1 1]*0.5;
figure
hs1 = surf(X1, Y1, Z1, 'FaceColor',C, 'EdgeColor','none');
hold on
hs2 = surf(X2, Y2, Z2, 'FaceColor',C, 'EdgeColor','none');
hp1 = patch([X1(1,:) flip(X2(1,:))], [Y1(1,:) flip(Y2(1,:))], [Z1(1,:) flip(Z2(1,:))], C, 'EdgeColor','none');
hp2 = patch([X1(2,:) flip(X2(2,:))], [Y1(2,:) flip(Y2(2,:))], [Z1(2,:) flip(Z2(2,:))], C, 'EdgeColor','none');
hc1 = plot3(X1(1,:), Y1(1,:), Z1(1,:), '-', 'Color',[1 1 1]*0.3);
hc2 = plot3(X1(2,:), Y1(2,:), Z1(2,:), '-', 'Color',[1 1 1]*0.3);
hold off
material('dull')
lightangle(gca,-45,30)
lighting('gouraud')
axis('equal')
rotate([hs1,hs2,hp1,hp2,hc1,hc2], [0 1 0], 90)
Make appropriate changes to get the result you want. The ‘hc1’ and ‘hc2’ plot3 calls outline the centre void a bit more distinctly.
.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
