• Remix
  • Share
  • New Entry

on 20 Oct 2022
  • 21
  • 122
  • 0
  • 1
  • 267
rotate(0,0,90,10)
hold all
x=[0,-2,0,2,0];
y=[0,2,8,2,0];
c = [1 0.8 0.3];
fill(x, y, c)
set(gcf,'color','k')
axis off
function rotate(x1,y1,t,d)
x2=x1+sind(t-90)*d;
y2=y1+cosd(t+90)*d;
if d~=0
line([x1 x2],[y1 y2],'color', [0.7 0 1]);
rotate(x2,y2,t+20,d-1);
rotate(x2,y2,t-20,d-1);
end
end
Remix Tree