• Remix
  • Share
  • New Entry

on 17 Oct 2021
  • 10
  • 36
  • 0
  • 0
  • 278
m=@(a,c)max(min(a,c),-c);
s=@vecnorm;
n=@(p)p./s(p);
P=randn(4,5e2);
A=cool(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).^-2/5e3,3e5/k.^2),A(k,:),'f'); %
alpha(h,.5-(400-k)/800)
end
axis off equal
Remix Tree