ウィキペディアのMandelbrotページにはマンデルブロセットの本当に美しい画像があります。wikipediaでマンデルブロを塗りつぶす色のグラデーションはどれですか?
また、私はちょうど私自身のマンデルブロアルゴリズムを実装しました。各ピクセルを計算するために使用される反復回数がn
さを考えると、私はそのような白に緑に黒から非常に簡単にそれらを色(Cと++とQt 5.0):
QColor mapping(Qt::white);
if (n <= MAX_ITERATIONS){
double quotient = (double) n/(double) MAX_ITERATIONS;
double color = _clamp(0.f, 1.f, quotient);
if (quotient > 0.5) {
// Close to the mandelbrot set the color changes from green to white
mapping.setRgbF(color, 1.f, color);
}
else {
// Far away it changes from black to green
mapping.setRgbF(0.f, color, 0.f);
}
}
return mapping;
私の結果はそのようになります。
私はかなり好きですが、どの色のグラデーションがWikipediaの画像に使われていますか?その勾配を与えられたn
の反復でどのように計算するのですか?
(この質問はないについてsmoothingである。)