Skip to content

Instantly share code, notes, and snippets.

@VentGrey
Created February 11, 2019 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VentGrey/b88dec8d05259e50005a38066ca9b927 to your computer and use it in GitHub Desktop.
Save VentGrey/b88dec8d05259e50005a38066ca9b927 to your computer and use it in GitHub Desktop.
Una función simple para el fractal de mandelbrot
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