ウィキペディアのマンデルブロ集合ページには、マンデルブロ集合の非常に美しい生成画像があります。
また、独自のマンデルブロ アルゴリズムを実装しました。各ピクセルの計算に使用される反復回数が与えられ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;
私の結果は次のようになります。
私はすでにかなり気に入っていますが、ウィキペディアの画像にはどの色のグラデーションが使用されていますか? n
与えられた反復でその勾配を計算する方法は?
(この質問はスムージングに関するものではありません。)