我已经成功地为 Mandelbrot 集着色,尽管在它变得“模糊”并且图案停止之前我无法放大很远。我通过增加 max_iteration 来解决这个问题,这是有效的,但我在 *1 放大倍率下得到的颜色很少,而且只有在放大时才会出现很多颜色。我理解为什么会发生这种情况,因为在“真正的”Mandelbrot-set 中没有颜色和增加 max_iterations 只会让它更接近那个。但我的问题是,在整个缩放过程中,像 youtube 上的缩放如何拥有美丽的色彩,同时仍然能够放大以获得永远的感觉?
我试过在网上到处寻找,但我找不到解决方案,当我查看这些 youtube 缩放的描述时,他们似乎几乎没有提供关于他们如何进行缩放的任何信息。
这里只是绘制 Mandelbrot 集的代码部分。下面的代码是在处理过程中编写的,它是带有添加视觉库的 java。您可以在此处了解有关该计划的更多信息:https : //processing.org/
//m is max_iterations
//mb is the function which calculates how many iterations each point took to escape to infinity. I won't be including the function since I know it works fine and it's quite messy.
//i'm using a HSB/HSV system to draw the mandelbrot
hue=(mb(x, y, m)*360)/m;
sat=255;
if (mb(x, y, m)<m) {
val=255;
}
else {
val=0; …Run Code Online (Sandbox Code Playgroud)