基于IFS分形树的模拟

西安科技大学 计算机科学与技术学院,陕西 西安 710054

分形几何; 迭代函数系统; 压缩仿射变换; 吸引子

Simulation of fractal tree based on IFS
WANG Yu-zhe

(College of Computer Science and Engineering,Xi'an University of Science and Technology,Xi'an 710054,China)

fractal geometry; iterated function system; compression affine transformation; attractor

DOI: 10.13800/j.cnki.xakjdxxb.2016.0622

备注

分形理论是利用分数维数的数学方法来描述和研究客观事物。利用分形可以模拟出逼真的自然景物,解决了计算机对复杂自然景物建模困难的问题。IFS迭代函数系统模型是产生分形图形的重要方法之一。根据IFS模型构建分形图形的方法和原理,通过观察树木等自然景物的特征,抽象出一种自然界树木的形状,利用拼贴的方法计算出该树木的IFS码,并用VC++作为工具实现对树木的绘制。通过树木绘制实例详细介绍了绘制的过程、颜色问题的改善和迭代次数及伴随概率对图形的显示效果的影响。由于迭代函数系统模型是通过绘制迭代点来生成图形的,对于点的颜色设置要么单一要么比较杂乱,因此对绘制过程中如何设置迭代点的颜色提出了改善办法。根据程序最终的显示效果,生成图形符合预期的形状,经过颜色改善后的图形效果更加逼真。

Fractal theory is to use fractional dimension mathematical method to describe and study the objective things.The natural scenery can be simulated by the fractal to solve difficult problem about the computer modeling for complex natural scenery.The model of iterated function systems is one of the important methods for generating fractal graphics.This article mainly expounds the IFS model fundamentals,methods and steps of the fractal images.Through observing the characteristics of the tree,we construct the model of the tree.By the means of collage,we calculate the IFS code of the tree.Finally using VC++ as the tool,we render an image of the tree.This paper introduces the process of rendering,the solution of color problem,and the effect of iterations times.Because the iteration function system model generates graphics through iterative point,the color of the point is set in single or more messy,so how to set the color of iterative is proposed to improve the effect.According to the final results of the program,the graphics is generated in accordance with the expected shape.After the color improvement,the graphics is more realistic.