- /
-
Beating Heart
on 22 Oct 2024
- 10
- 77
- 1
- 0
- 327
Cite your audio source here (if applicable):
drawframe(1);
Write your drawframe function below
function drawframe(f)
t = linspace(0, 2 * pi, 100);
cla;
figure;
hold on;
for i = 1:f
scale = max(0.1, 1 - (i - 1) * 0.08);
x = scale * 16 * (sin(t)).^3;
y = scale * (13 * cos(t) - 5 * cos(2 * t) - 2 * cos(3 * t) - cos(4 * t));
plot(x, y, 'r-', 'LineWidth', 2);
end
axis equal;
axis([-20 20 -20 20]);
set(gca, 'Color', [0.9 0.9 0.9]);
title(['Frame: ', num2str(f)]);
hold off;
end
drawframe(15);
Movie
Audio
This submission does not have audio.