Mandelbrot Set 渲染的平滑频谱 [英] Smooth spectrum for Mandelbrot Set rendering

查看:24
本文介绍了Mandelbrot Set 渲染的平滑频谱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在编写一个程序来生成非常大的(65536x65536 像素及以上)Mandelbrot 图像,我想设计一个光谱和着色方案,使它们公正.维基百科特色 mandelbrot 图像 似乎是一个很好的例子,尤其是调色板如何保持变化在序列的所有缩放级别.不过,我不确定它是在旋转调色板还是在做其他一些技巧来实现这一点.

I'm currently writing a program to generate really enormous (65536x65536 pixels and above) Mandelbrot images, and I'd like to devise a spectrum and coloring scheme that does them justice. The wikipedia featured mandelbrot image seems like an excellent example, especially how the palette remains varied at all zoom levels of the sequence. I'm not sure if it's rotating the palette or doing some other trick to achieve this, though.

我熟悉 mandelbrot 的平滑着色算法设置,所以我可以避免条带,但我仍然需要一种方法来为这个算法的输出值分配颜色.

I'm familiar with the smooth coloring algorithm for the mandelbrot set, so I can avoid banding, but I still need a way to assign colors to output values from this algorithm.

我生成的图像是金字塔形的(例如,一系列图像,每个图像的尺寸都是前一个的一半),所以我可以使用某种旋转调色板,只要后续缩放级别之间的调色板不太明显.

The images I'm generating are pyramidal (eg, a series of images, each of which has half the dimensions of the previous one), so I can use a rotating palette of some sort, as long as the change in the palette between subsequent zoom levels isn't too obvious.

推荐答案

我的最终解决方案是创建一个漂亮(而且相当大)的调色板并将其作为常量数组存储在源中,然后使用平滑着色算法.调色板环绕(并设计为连续的),但这似乎无关紧要.

My eventual solution was to create a nice looking (and fairly large) palette and store it as a constant array in the source, then interpolate between indexes in it using the smooth coloring algorithm. The palette wraps (and is designed to be continuous), but this doesn't appear to matter much.

这篇关于Mandelbrot Set 渲染的平滑频谱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆