• New Entry

Universe

Murty PLN on 21 Oct 2021
  • 39
  • 26
  • 0
  • 0
  • 276
t=180;
r=1;
d=.1;
g=zeros([],1);
x=g;
y=g;
j=1;
x(j) = r*sin(t) ;
y(j) = r*cos(t) ;
g(j)=randi(50,1) ;
for i = 2:500000
dt=d/r;
dr=d^2/(2*pi*r);
t=t+dt;
r=r-dr;
if r>d
j=j+1 ;
g(j) = randi(10,1) ;
x(j) = r*sin(t);
y(j) = r*cos(t) ;
end
end
figure('color','k')
scatter(x,y,50,g,'filled','o')
colormap(jet)
axis equal off
Remix Tree