This code creates a random loop around (x,y) = (0,0).
Inspired by: 3Blue1Brown (YouTube)
points = 7;
smoothness = .01;
[dist theta] = randloop(points,smoothness)
% plot(theta.*cos(dist),theta.*sin(dist)) % for cartesian plot
Jesse Crotts (2021). randloop (https://www.mathworks.com/matlabcentral/fileexchange/65630-randloop), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!