- /
-
Diwali Illumination: Festival of Lights in India Today
on 12 Nov 2023
- 6
- 30
- 1
- 2
- 456
drawframe(1);
Write your drawframe function below
function drawframe(f)
figure;
axes('Color', [0.2, 0.2, 0.2]);
hold on
colormap winter
camva(1.3)
view(-80, 4)
bar3(randg(1, 60));
axis equal
zlim([0, 13])
n = 84; % number of stars
plot3(n * ones(1, n), 25:.3:50, 10 * rand(1, n), 'wp')
k = 48;
% Stars
% Fireworks
c = 'cwrgm'; % colors
for i = 30:2:f % x position in sky
r = rand;
for j = .1:.2:r + .6 % radii
[x, y] = pol2cart(0:.7:2 * pi, j);
plot3(n * ones(1, 9), x + i, y + 6 * r + 4 - j / 3, [c(rem(i, 5) + 1), '.'])
end
text(28, 28, 13, 'Happy Diwali!', 'Color', 'yellow', 'FontSize', 20, 'HorizontalAlignment', 'center');
end
end