• Remix
  • Share
  • New Entry

on 30 Oct 2021
  • 4
  • 56
  • 0
  • 0
  • 280
% Trying to make a random 3D surface for a planet
% Starscape
r=@()rand(1,1e3);
scatter(r(),r(),r()*30,'.w');
set(gca,Po=[0
0
1
1],Color='k')
axes(colorm=hot);
N=315;
a=-pi:.02:pi;
g=abs(ifft2(randn(N)./abs(a+i*a').^1.8));
[x,y,z]=sph2cart(a,a',rescale(g,0,1.2));
hold
Current plot held
[t,u,v]=sphere(N);
surf(x,y,z);
axis equal off
surf(t,u,v,ones(N).*cat(3,0,1,1));
shading flat
light
Image
Remix Tree