在数学中,“混沌游戏”指代一种创造分形的方法。
一个最典型的例子是这样的:使用一个三角形并给定一个位于多边形内的随机起始点,随机选择多边形的一个顶点,作这个顶点和起点的中点,不断地取随机的顶点并作顶点和上一次得到的点的中点,最终将会得到一个分形图案。
在给定具体规则后,初始点的位置几乎不会对最终形态有影响。我们可以调整参数和规则来改变最终的图形,比如多边形的边数、多边形的形状或者我们可以决定是否一定要取中点,这样我们就会获取到很多结果。
In mathematics, the term chaos game originally referred to a method of creating a fractal, using a polygon and an initial point selected at random inside it. The fractal is created by iteratively creating a sequence of points, starting with an initial random point, in which each point in the sequence is a given fraction of the distance between the previous point and one of the vertices of the polygon; the vertex is chosen at random in each iteration. Repeating this iterative process a large number of times, selecting the vertex at random on each iteration, and throwing out the first few points in the sequence, will often (but not always) produce a fractal shape.