- /
-
Design 2
on 15 Oct 2021
- 2
- 2
- 4
- 0
- 272
x(1)=rand;
y(1)=rand;
z(1)=rand;
for j=1:40000
B=.99*[(-1)^ceil(4*rand()),(-1)^ceil(4*rand()),(-1)^ceil(4*rand())];
a=sqrt((x(j)-B(1))^2+(y(j)-B(2))^2+(z(j)-B(3))^2)^2;
x(j+1) = B(1) + (x(j)-B(1))/a;
y(j+1) = B(2) + (y(j)-B(2))/a;
z(j+1) = B(3) + (z(j)-B(3))/a;
end
plot3(x,y,z,'.')
axis off