如何创建一个横跨x轴(OR OTHERS)45度的斜实心圆柱体
这是我的代码,但它只是一行图
它在哪里出错
创建
半径= 0.5
H = 3
交叉x轴45度
R =0.2 ; % Radius of the cylindrical shell
H =3 ; % Height of the Cylinder
M = 1000 ;N = 1000 ;
x=[];y=[];z=[];dz=0;
% Discretizing the Height and Angle of the cylinder
nH = linspace(0,H,M) ;
nT = linspace(0,2*pi,N) ;
[H, T] = meshgrid(nH,nT) ;
%% cylinder at (0,0)
X1 = R*cos(T);
Y1 = R*sin(T);
Z1 = --2.36*sind(R)
surf(X1,Y1,Z1)
你好