Я визуализирую набор Мандельброта и уже добился некоторой плавной окраски, но если присмотреться, картина становится очень зашумленной. Мне интересно, как лучше всего улучшить окраску, чтобы добиться большей эстетики. Поможет ли использование раскраски гистограммы удалить грубые пиксельные области? Вот визуализация фрактала с использованием 10 000 итераций.
Вот как я сейчас генерирую и назначаю цвета:
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
int black = 0;
int[] colors = new int[max]; //max is the maximum number of iterations
for (int i = 0; i<max; i++) {
colors[i] = Color.HSBtoRGB(i/256f, 1, i/(i+8f));
}
for(int i = 0; i < colors.length / 2; i++)
{
int temp = colors[i];
colors[i] = colors[colors.length - i - 1];
colors[colors.length - i - 1] = temp;
}
...
...
...
if (iterations < max) image.setRGB(col, row, colors[iterations]);
else image.setRGB(col, row, black);
}
}
//ImageIO.write(image, "png", new File("mandelbrot_seeria90"+Integer.toString(i)+".png"));
ImageIO.write(image, "png", new File("resotest.png"));