Plotting a 3D millstone with surfaces
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Markus Reichel
am 22 Jun. 2022
Kommentiert: Star Strider
am 22 Jun. 2022
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 Kommentare
Akzeptierte Antwort
Star Strider
am 22 Jun. 2022
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.
.
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Surface and Mesh Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
