• Remix
  • Share
  • New Entry

on 6 Oct 2021
  • 2
  • 32
  • 1
  • 0
  • 279
% Figure and axes
figure('color','b');
axes('Color','b','Visible','off');
hold on
% Parameters
p = 20;
k = (1+sqrt(5))/2;
a = linspace(0,pi/2,p);
% Initial position
X = 0;
Y = 0;
for n = 1:20
% Previous position
X0 = X(end);
Y0 = Y(end);
% Updated angles
a = a+pi/2;
% Updated positions
X = -k^n*sin(a);
Y = +k^n*cos(a);
X = X+X0-X(1);
Y = Y+Y0-Y(1);
% Plots
plot(X,Y,'y');
plot(X([1 p p 1 1]),Y([1 1 p p 1]),'y');
end
axis equal
Remix Tree