You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dt = .01;
[x, y, z] = deal( 0 );
[X,Y,Z] = sphere(30);
surf(X,Y,Z,'edgecolor',[1 1 1]*0.8,'Facecolor','none')
hold on
k = 0;
while norm([x y z])^2 < 1 && k < 1000
t = 180*(rand-1);
p = 180*(rand-1);
% spherical system of coordinates
x = x + dt*cosd(t)*cosd(p);
y = y + dt*cosd(t)*sind(p);
z = z + dt*sind(p);
k = k + 1;
pause(0.1)
plot3(x,y,z,'.b')
end
hold off
It is supposed to be random walk in 3d.
results in: https://chart-studio.plotly.com/~danton267/1370/#/
The text was updated successfully, but these errors were encountered: