• Remix
  • Share
  • New Entry

on 14 Oct 2024
  • 15
  • 165
  • 1
  • 0
  • 1005
Cite your audio source here (if applicable):
I composed 30 sound loops for use in the Mini Hack.
If you like them, please feel free to use them for free.
drawframe(1);
Write your drawframe function below
function drawframe(f)
persistent fp ths
if f == 1
d = 2;
dth = pi/96;
ths = -pi:dth:pi-dth;
a1 = 60; a2 = 20; a3 = 25;
b1 = 60; b2 = 30; b3 = 30;
wx1 = 1; wx2 = 4; wx3 = 10;
wy1 = 1; wy2 = 3; wy3 = 9;
fp = gobjects(1,length(ths)+1);
hold on
for k = 1:length(ths)
th = ths(k);
u = a1 * sin(wx1 * th) + a2 * sin(wx2 * th) + a3 * sin(wx3 * th);
v = b1 * sin(wy1 * th + pi/2) + b2 * sin(wy2 * th + pi/2) + b3 * sin(wy3 * th + pi/2);
fp([k end]) = feather(u,-v);
fp(k).XData(end+1) = fp(k).XData(end-2);
fp(k).YData(end+1) = fp(k).YData(end-2);
fp(k).LineWidth = 1.5;
fp(k).Color = [fp(k).Color 0];
end
hold off
ax = gca;
xlim(ax, [-150 150])
ylim(ax, [-150 150])
axis(ax,'off')
axis equal
drawnow
end
hold on
N2 = 5;
j = f * 2 - 1;
maxN = N2 * 2;
for k=0:maxN
idx = mod(j+k, length(ths));
idx = max(idx,1);
alpha = max((k-1)/maxN,0);
if (j+k)>length(ths); alpha = 0; end
fp(idx).Color = [fp(idx).Color alpha];
end
for k = 0:1
x = fp(j+k).XData(2); y = fp(j+k).YData(2);
s = scatter(x,y,100,"filled");
distfromzero = norm([x, y]);
s.AlphaData = distfromzero;
s.MarkerFaceAlpha = 'flat';
end
hold off
end
Movie
Audio
Remix Tree