- /
-
Rotating Newton's Fractal (3rd power)
on 29 Nov 2023
- 8
- 87
- 1
- 1
- 164
drawframe(1);
Write your drawframe function below
function drawframe(f)
a=exp(1i*pi*2/47*(f-1));
X=meshgrid(linspace(-2,2,301));
Z=X+1i*X';
for i=1:20
Z = Z-a*(Z.^3-1)./(3*Z.^2);
end
imagesc(X(1,:),X(1,:),angle(Z));
colormap(hsv*0.83);
axis equal off;
end