Image 如何创建斜圆柱体

Image 如何创建斜圆柱体,image,3d,structure,skew,Image,3d,Structure,Skew,如何创建与x轴(或其他轴)相交45度的斜圆柱体 这是我的代码,但它只是一行图片 哪里出错 创建 a半径=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 cy

如何创建与x轴(或其他轴)相交45度的斜圆柱体 这是我的代码,但它只是一行图片 哪里出错 创建
a半径=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)
THSU