Plotting Cylinder Surface Using fill3
古いコメントを表示
I am attempting to plot a cylinder (or any abitrary) surface using the fill3 or patch function.
MATLAB, however, does not produce the cylinder surface using the minmal working example below, unless the angle theta is restricted to less than pi.
Any help explaining this issue and finding a solution is greatly appreciated!
figure()
theta = 0:0.5:2*pi;
xs = [cos(theta) flip(cos(theta))];
ys = [sin(theta) flip(sin(theta))];
fill3(xs, ys, [zeros(size(theta)) ones(size(theta))], 'k', 'FaceAlpha', 0.2)
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




