让我先分享一下我正在阅读的PDF文档,以启动我的分形火焰绘画。
http://flam3.com/flame_draves.pdf
按照Draves的伪代码,使用提供的三个函数,我没有任何问题地绘制了Sierpinski的三角形。
F0(x, y) = ( x/2 , y/2 )
F1(x, y) = ( x+1/2 , y/2 )
F2(x, y) = ( x/2 , y+1/2 )
伪代码:
(x, y)= a random point in the bi-unit square
iterate {
i = a random integer from 0 to n − 1 inclusive
(x, y) = Fi(x, y)
plot (xf , yf ) except during the first 20 iterations
}
据我所知,分形火焰是通过应用变化(非仿射函数)来制作的,但是如果我们查看附录中的变量目录,第一幅图像(变量0)据说是使用恒等变量制作的。
现在我无法理解如何只使用一个函数创建这样的图像,再加上一个恒等函数。(难道它不会只在随机选择的像素上无限绘制一个像素吗?)
对我来说还不清楚是否应该使用与Sierpinski's gasket相同的伪代码,或者我是否没有看到其他问题?
编辑:这里是用Java编写的包含分形火焰图像生成器的最终产品:https://github.com/xtrinch/fractal_generator