• Remix
  • Share
  • New Entry

on 5 Oct 2021
  • 8
  • 53
  • 0
  • 0
  • 280
n=160;
A=zeros(n,n,n);
x=1:1:n;
y=x;
z=x;
f=@(n)round(rand*(n));
[X,Y,Z]=meshgrid(x,y,z);
for i=1:7*n
a=f(n);
b=f(n);
c=f(n);
R=f(n/10);
D=sqrt((X-a).^2+(Y-b).^2+(Z-c).^2);
R=1+R;
A(D<R)=R;
end
D=sqrt((X-80).^2+(Y-80).^2+(Z-80).^2);
R=75
R = 75
A(D>R)=0;
isosurface(A);
colormap('bone')
axis equal off
light('col',[0.7 0.7 0])
Remix Tree