Mandelbrot mit JSXGraph

Aus Wiki1

(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
Zeile 45: Zeile 45:
   function mandelbrotIter(cx, cy, maxIter) {
   function mandelbrotIter(cx, cy, maxIter) {
     let x = 0, y = 0, iter = 0;
     let x = 0, y = 0, iter = 0;
-
     while (Math.pow(x,sliderPotx.Value()) + Math.pow(y,sliderPoty.Value()) <= 4 && iter < maxIter) {
+
     while (x*x + y*y <= 4 && iter < maxIter) {
-
       const xtemp = Math.pow(x,sliderPotx.Value()) - Math.pow(y,sliderPoty.Value()) + cx;
+
       const xtemp = x*x - y*y + cx;
-
      y = 2*x*y + cy;
+
      y = Math.pow(x,sliderPotx.Value())*x*y + cy;
       x = xtemp;
       x = xtemp;
       iter++;
       iter++;

Version vom 12:36, 26. Sep. 2025

Mit den Schiebereglern können Iterations-Tiefe und Zoom gesteuert werden. Mit der Maus+linke Maustaste kann der Bildausschnitt verschoben werden.

Persönliche Werkzeuge