Mandelbrot mit JSXGraph
Aus Wiki1
(Unterschied zwischen Versionen)
| 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 | + | while (x*x + y*y <= 4 && iter < maxIter) { |
| - | const xtemp = Math.pow(x,sliderPotx.Value()) | + | const xtemp = x*x - y*y + cx; |
| - | + | 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.
