How can I draw a 3D-cylinder pile up by 2D-circles???

조회 수: 12 (최근 30일)
Amy
Amy 2013년 12월 14일
댓글: Justin Chan 2019년 3월 21일
How can I draw a 3D-cylinder pile up by 2D-circles??? or maybe slice a cylinder into pieces? please help ^^

답변 (1개)

sixwwwwww
sixwwwwww 2013년 12월 14일
편집: sixwwwwww 2013년 12월 14일
you can make a cylinder from piles as follow using cylinder in MATLAB:
NumberOfPiles = 5; % Number of piles in cylinder
Radius = 1; % Radius of cylinder
NumberOfPoints = 100; % Number of points to control smoothness of sylinder curve, more points better smoothness
for i = 1:NumberOfPiles
[x, y, z] = cylinder(Radius, NumberOfPoints);
surf(x, y, z + i), hold on
end
See following link for more information about cylinder: http://www.mathworks.com/help/matlab/ref/cylinder.html
I hope it helps. Good luck!
  댓글 수: 1
Justin Chan
Justin Chan 2019년 3월 21일
Hi, what if i have a surface plot constructed by 5 circle 2D plots at the same Y position but different X position in 2D space, how can i find the Volume within the surface?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by