• Remix
  • Share
  • New Entry

on 23 Nov 2023
  • 6
  • 10
  • 4
  • 0
  • 541
drawframe(1);
Write your drawframe function below
clear
for f=1:48
drawframe(f)
end
function drawframe(f)
N = 80;
dAz = pi/48;
maxAz = 2*pi/N * 10;
w = 30 * 1.5;
edth = 2/4*pi;
offs = [0:dAz:maxAz*2 maxAz*2:-dAz:0];
off = offs(f);
if off <= maxAz
mag1 = off/maxAz;
mag2 = mag1;
else
mag1 = 1-max((off-maxAz*1.5),0)/maxAz;
mag2 = 1;
end
th0 = off;
for n=1:3
for l=1:N
th = th0 + l*2*pi/N;
r = 10*n;
x1 = r * cos(th);
y1 = r * sin(th);
x2 = r * cos(th+edth*mag1);
y2 = r * sin(th+edth*mag1);
plot3([x1 x2],[y1 y2],[0 1*mag2], ...
LineStyle = '-.', LineWidth=0.5, Color=[0 0.5 1 1-(n-1)/3]);
if (n==1 && l==1)
hold on
end
end
end
hold off
axis off
xlim([-w w])
ylim([-w w])
zlim([0 1])
end
Animation
Remix Tree
Load full remix tree