• Remix
  • Share
  • New Entry

on 17 Oct 2021
  • 5
  • 31
  • 1
  • 0
  • 279
figure(Color='k')
m=@(a,c)max(min(a,c),-c);
s=@vecnorm;
n=@(p)p./s(p);
P=randn(4,5e2);
A=copper(400);
for k=1:400
Q=P;
D=reshape(P,4,1,[])-P;
U=sum(m(D./s(D).^3,9),3)-9;
P=n(P+n(U).*m(s(U),1e2)/1e4);
hold on; % move this behind scatter3
h=scatter3(P(1,:),P(2,:),P(3,:),m(s(P-Q).^-3/6e6,85),A(k,:),'f');
alpha(h,.6);
end
axis off equal
Remix Tree