• Remix
  • Share
  • New Entry

on 8 Oct 2022
  • 3
  • 8
  • 0
  • 0
  • 280
% Set up axes
c=[.8
.7;
0];
axes(Color=c,CameraP=[0,2,-7],CameraT=[0,1,8],Pr='p')
hold
Current plot held
% Rocky surface
% This is an inverted super-gaussian + noise
% www.mathworks.com/matlabcentral/answers/575647#answer_475645
x=meshgrid(-9:.7:9);
s=-2*exp(-(x.^2/9).^3)+2.1;
surf(x,s.*rand(26),x',FaceC=c,EdgeC='c')
% Set equal aspect ratio
axis equal
% Sun
t=0:.1:7;
fill3(2*cos(t),2*sin(t)+1,0*t+4,'b')
% Horiz sun lines
plot3([-2,2],[1;1]*(-1:.1:3),[9,9],Col=c);
% Add lighting
light(Po=[0,9,30],Col='m')
camlight
Remix Tree