Mandelbrot集合渲染的平滑光谱 [英] Smooth spectrum for Mandelbrot Set rendering

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

问题描述

我目前正在写一个程序来生成真正巨大的(65536x65536像素及以上)Mandelbrot图像,我想设计一个光谱和着色方案,使他们正义。 wikipedia特色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集合渲染的平滑光谱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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