- /
-
Comet
on 31 Oct 2021
- 5
- 131
- 0
- 0
- 247
% Trying to make a random 3D surface for a planet
% Starscape
r=@()rand(1,3e3);
scatter(r()*100-50,r()*100-50,r()*35,'.w');
set(gca,Po=[0
0
1
1],Color='k')
hold
N=15;
[t,u,v]=sphere(N);
for n = 1:30
surf(t*n+n-10,u/n,v/n,ones(N).*cat(3,1,1,1),FaceA=0.3);
end
set(gcf,Color='k')
axis equal off
shading flat
view([45,45])
camzoom(6)