Mandelbrot mit JSXGraph
Aus Wiki1
(Unterschied zwischen Versionen)
Zeile 9: | Zeile 9: | ||
// Slider für Iterationstiefe | // Slider für Iterationstiefe | ||
- | const slider = board.create('slider', [[-2.3, 1.3], [1, 1.3], [10, | + | const slider = board.create('slider', [[-2.3, 1.3], [1, 1.3], [10, 10, 200]], { |
name:'Tiefe', | name:'Tiefe', | ||
snapWidth:1 | snapWidth:1 | ||
Zeile 67: | Zeile 67: | ||
// Farbverlauf | // Farbverlauf | ||
const c = Math.floor(255*it/maxIter); | const c = Math.floor(255*it/maxIter); | ||
- | obj.poly.setAttribute({fillColor: | + | obj.poly.setAttribute({fillColor: 'rgb(${c},${100},${255-c})'}); |
} | } | ||
}); | }); | ||
}); | }); | ||
</jsxgraph> | </jsxgraph> |