Created
February 11, 2019 16:12
-
-
Save VentGrey/b88dec8d05259e50005a38066ca9b927 to your computer and use it in GitHub Desktop.
Una función simple para el fractal de mandelbrot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int mand(complex<double> z0, int max) | |
{ | |
complex<double> Z = z0; | |
for (int i = 0; i < max; i++) { | |
if (abs(Z) > 2.0) { | |
return i; | |
} else { | |
Z = Z * Z + z0; | |
} | |
} | |
return max; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment