- /
-
Winter is coming
on 19 Nov 2023
- 7
- 14
- 0
- 0
- 488
drawframe(1);
Write your drawframe function below
function drawframe(f)
[x, y] = meshgrid(-6:0.1:6, -6:0.1:6);
[x1, y1] = meshgrid(-5:0.2:5, -5:0.2:5);
explosion_cloud = peaks(x, y);
explosion_cloud1 = peaks(x1, y1);
lava_flow = -abs(x).*exp(-x.^2 - y.^2);
clouds = (7-(4*f/48)) * rand(size(explosion_cloud1));
figure;
surf(x, y, explosion_cloud, 'FaceColor', 'r', 'EdgeColor', 'none');
hold on
surf(x, y, lava_flow, 'FaceColor', 'y', 'EdgeColor', 'none');
surf(x1, y1, clouds, 'FaceColor', 'w', 'EdgeColor', 'none', 'FaceAlpha', 0.5);
view(30, 30);
axis([-6 6 -6 6 -2.5 10])
axis off
end