- /
-
EU flag
on 23 Oct 2024
- 11
- 52
- 0
- 2
- 452
Cite your audio source here (if applicable): https://en.wikipedia.org/wiki/File:Anthem_of_Europe_(US_Navy_instrumental_short_version).ogg
drawframe(1);
Write your drawframe function below
function drawframe(f)
persistent g x y a
if f == 1
[x,y] = cylinder(1,12);
plot(x, y, 'py', 'markers', 25, 'markerf', 'y');
axis equal off;
set(gcf, 'Position', [0 0 560 420], 'color', 'b');
g = getframe(gcf).cdata;
g = g(end:-1:1,:,:);
close;
[s1,s2,~] = size(g);
[x,y] = meshgrid(1:s2, 1:s1);
a = 25 * (x/s1) .^ 0.5;
end
y2 = a .* sin((2*x + y + 200*pi*f/48) * 0.015);
z2 = y + 50 * sin(pi*f/96);
surf(x, y2, z2, g, 'edgec', 'n', 'AmbientStrength', 0.5);
camlight headlight;
axis equal off;
view([-40 20]);
end