N = 50;
thetavec = linspace(0,pi,N);
phivec = linspace(0,2*pi,2*N);
[th, ph] = meshgrid(thetavec,phivec);
R = ones(size(th)); % should be your R(theta,phi) surface in general
R = rand(size(th))*0.1 + 1; % should be your R(theta,phi) surface in general
R = ones(size(th)) .* (sin(th*3)+1); % should be your R(theta,phi) surface in general
x = R.*sin(th).*cos(ph);
y = R.*sin(th).*sin(ph);
z = R.*cos(th);
figure;
surf(x,y,z);
%axis vis3da
'Coding > Python Matlab' 카테고리의 다른 글
파이썬 UTF-8 (0) | 2021.07.15 |
---|---|
Python copy depth (0) | 2021.07.09 |
python dxf, pdf, http server test (0) | 2021.07.09 |
Python debugging - PDB (0) | 2021.03.05 |
Conda (0) | 2021.03.04 |