• Remix
  • Share
  • New Entry

  • Tim

  • /
  • Viritrilbia

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