Plot cylinder symmetry axis
Mostra commenti meno recenti
I am using the function cylinder to generate a cylinder model. I would like to show the cylinder axis in my plot.
There is a function to rapidly plot the axis or i have to necessary build it and than plot ?
1 Commento
Raj Gopal Mishra
il 26 Lug 2020
We can Also plot it with simple Circle patch repeating it for number of times till we get height.
theta=linspace(0,pi,100);
r=1.5; % radius
h=10; %height
x=r*cos(theta);
y=r*sin(theta);
z=zeros(size(x));
while z(1,1)<h,
patch([x -x], [y -y], [z z], 'r')
hold on
z=z+0.1;
end
hold off
view(3)
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Point Cloud Processing in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!