• Remix
  • Share
  • New Entry

on 17 Oct 2021
  • 43
  • 87
  • 0
  • 0
  • 256
figure('Color','w')
l=5e3;
a=zeros(l,3);
for i=2:l
b=.01*(rand(1,3)-.5);
[~,w]=min(sum((a-b).^2,2));
n=a(w,:);
m=b-n; % new point - closest
v=1e-4*m/norm(m);
c=n+v;
a(i,:)=c;
plot3([n(1) c(1)],[n(2) c(2)],[n(3) c(3)],'m','Linew',1)
hold on
end
set(gca,'XTick',[],'YTick',[],'ZTick',[])
box on
axis equal
Image
Remix Tree