• Remix
  • Share
  • New Entry

on 22 Oct 2024
  • 14
  • 85
  • 0
  • 0
  • 399
Cite your audio source here (if applicable):
drawframe(1);
Write your drawframe function below
function drawframe(f)
n = 800;
max_iter = 400;
% Set the zooming area for Seahorse Valley
x_center = -1.5;
y_center = 0;
zoom_factor = 1 / (2^(f/4));
xlim = [x_center - zoom_factor, x_center + zoom_factor];
ylim = [y_center - zoom_factor, y_center + zoom_factor];
% Create grid of complex numbers
x = linspace(xlim(1), xlim(2), n);
y = linspace(ylim(1), ylim(2), n);
[X, Y] = meshgrid(x, y);
Z = X + 1i * Y;
M = zeros(size(Z));
C = Z;
for k = 1:max_iter
Z = Z.^2 + C;
M(abs(Z) > 2 & M == 0) = k; % Assign iteration count to diverging points
end
% Display the fractal image
imagesc(x, y, M)
colormap(hot) % Choose a colormap
end
Movie
Audio

This submission does not have audio.

Remix Tree