1. About the origin of fractal and chaos on fractal, it is very accurate to find out. Research on dynamic systems, non-linear mathematics, function analysis, has been numerous. Although the early clues of fractals are very old, this discipline is still very young. For example, most of the work of dynamic systems and cellular automators can be traced back to Von-Nomanian; however, until Mandelbrot is so clearly similarity to the chaotic and fractal of artificial phenomena. If you are interested in this, you can further refer to the relevant information. Let's take a look at the concept of fractal. What is a fractal? Considering this intention, we have no intention to give it strict definitions, as far as our purpose, a fractal is an image, but this image has a characteristic, which is infinite self-similarity. What is it true? In natural and artificial phenomena, since the similarity refers to the overall structure being reflected in each of them. For example, the coastline, the unifeliated example, you see a 10 km image (curve), and one inch scene (curve) is similar, this is self-similarity. It is chaos that has a thousand relationships with fractal. The source of chaos and the greek vocabulary, the originality "Zhang Kaizu", but in the sense of social, it is old and unordered. To explain the contact of fractal and chaotic, it should be noted that the fractal is to separate the attractor and the discharge attractor, so in a sense, fractal is visual representation of chaotic behavior. Is it more boring about these stuff? Oh, I can't give you a beautiful picture - but you can go outside, see if the cloud in Wuhan is very beautiful? Then come back, the next one I will tell you a little mathematical knowledge and take it out of the program I wrote, talk about the generation of fractal.
Second, how is a little mathematical knowledge, Wuhan's cloud is OK! If you want to implement it on your computer, I think the fractal method is the best choice. Unfortunately, I am too nick, Wuhan's cloud can only remember it. If anyone is implemented, please be a little bit of meritorious :)? In addition, I want to be a lot of ladies, I think they have to learn this theory and then appropriate. Marx said that women are natural, although beauty is not a woman :). Their sense of perception is natural. Besides, cold-ice system software, you are not happy, of course, there is still a flower, grass:) --- and salary is not good! Ok, it's not poor, the words come true, let's take a look at the generation of fractals. The first thing to explain is that mathematics knowledge introduced here is just to introduce the convenience of fractal concepts. If you want to learn more about this area, a series of things, the probability, the probability, chaotic system, etc., you are best to take a look. 1, attraction point and escape point this is the basic vocabulary that describes fractal. We consider such a function f: f: r -> r x -> f (x) function and its own composite, such as F, record f (f (x)). If you use F once again acting on the result, you can record it as F (f (f (f (x))) so that you have completed a composite iteration of a function F. Obviously, the function iterations at a certain point in the define domain may be divergent or convergent. Make iterative divergent points called denotene; however, if the iteration result tends to some isolated points, this point is called an attraction point. In the iteration, both are not a point, called a neutral point. Let's take a collection of all attractive points of certain iterative functions or iterative geometries. When an iterative function or iterative geometric process is an unlimited self-similar set (also fractal, understand?), Then this attraction is called a singular attractor. 2, the attractive set of some real functions of the bifurcation, such as a simple example: f (x) = x ** 2 c // 2 is power :) For certain constitudes C, function iteration. Suppose it starts from c = -1.1, x = 0, you may wish to take a counter :), perform iteration. If you repeat, you will find an interesting phenomenon: iteration results are jumped from around -1.0 and about 0.1. If the number of iterations, such as 200 times, and different C values within a certain range will have a very beautiful surprising result. What is it? Oh, when you are critical, you have a cold - I can draw a picture of each iteration, but unfortunately there is no way to share it. --- I can only do it, do this, the value of many C, will get a graphic, that is, forked. I am gratifying, I will introduce the implementation of the program later. You go back to a try, don't you OK? Obviously, the bifurcation is a simple and interesting fractal. There are many applications. 3, Sierpinski triangles From the above introduction, you may have discovered a way to generate fractal. Another way is to make a special geometric process by repeating.
This type of fractal is called iterative function system (IFS). Sierpinski triangle is a more classic example. I can only say what it forms, no matter what I have seen. (1) Triangle, take the middle point of the trilate and connect each other - produce four full-class small triangles; (2) According to (1), each small triangle is so iteratively. Repeating a certain number of times, it will produce a singular attractor, which is a fractal. The techniques of the program implementation will be described in detail. The fractal is a recurring, I am not detailed, such as the Cantor set example, everyone should be able to find it in the general book. I finally want to talk about the IFS conversion rules. It is very important in the implementation of the fractal algorithm and the implementation of the program. 4. Iterative Function System Transformation Generates Sierpinski triangles and other fractal geometric rules that can be described in a set of operations including sliding, stretching, and rotation. Such mathematical operations are called affine transformations, usually use matrix operations to be programmed. As shown in the following table, a matrix coding form for the rule of Sierpinski triangles is given: -------- 1 ------- 2 ------- 3 ------ 4 - ------ 5 ------- 6 --------- Probability value ----- 1 ------ 0.5 ------ 0 ---- --- 0 ------ 0.5 ------ 25 ------- 1 --------- 0.33 ------ 2 ------ 0.5 ------ 0 ------- 0 ------ 0.5 ------ 1 -------- 50 -------- 0.33 --- --- 3 ------ 0.5 ------ 0 ------- 0 ------ 0.5 ------ 50 ------- 50-- ------ 0.33 ------ The position of D [1,5] in the table is 25; the last column of the table has special meaning, indicating that the transformation of this line will be used or Probability. So-called transformation, how is it applied? Suppose the transformation is map (x, y) to (x ', y'), you see the transformations implemented by the first line: x '= d [i, 1] x d [i, 2] y D [i, 5] y '= d [i, 3] y d [i, 4] y d [i, 6] You will understand. How is the probability application? You see: i = random (3) 1 // Before the transformation :) Can't it? These stuff applications may be mastered, but find such a matrix is not a simple matter. I hope that there is a wish to develop in this regard, and I have a good look at the relevant mathematical theory. Don't spend the time! The book is self-owned gold house, self ... :) Look at the projections and Sierpinski triangles (Delphi6.0). Third, the program example
In-depth graphic images, mathematics is still quite important. Below, just implement the last mathematical knowledge, if you go back to write a write, see the pattern, if you think these things are so interesting, I will be able to go deep, I will be very happy. The program draws a fork map, a sierpinski triangle (Delphi6.0). In the example, you have to look at them, all by operating the Windows menu, that is, the drawing function is in the response event of the two menus, respectively. The program does not have trouble, I will not say much.
unit Unit1; interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Menus, ExtCtrls; type TForm1 = class (TForm) MainMenu1: TMainMenu; Control1: TMenuItem; picture1: TMenuItem; picture2: TMenuItem; exit1 : TMenuItem; Help1: TMenuItem; Panel1: TPanel; Image1: TImage; procedure exit1Click (Sender: TObject); procedure picture1Click (Sender: TObject); procedure picture2Click (Sender: TObject); private {Private declarations} public {public declarations} end Var Form1: TForm1; ImplementationVar C, X, Y, Scale: Double; I, J, K, Maxx, Maxy, X1, Y1: Integer; D: array [1..6, 1..6] of double; {$ R * .dfm} procedure tform1.exit1click (sender: TOBJECT); begin close; END; // fork implementation procedure tForm1.Picture1Click (sender: TOBJECT); begin C: = - 2.0; maxx: = 800 Maxy: = 600; scale: = 55.0; image1.canvas.brush.color: = CLWHIT; image1.canvas.floodfill (10, 10, clgreen, fsborder); for i: = 0 to maxx do begin x: = 0.0 ; C: = C 2.2 5 / maxx; for j: = 0 to 40 do begin x: = x * x c; if j> 5 dam Image1.canvas.pixels [i, round (MAXY / 2 X * Scale)]: = CLBLUE; End; end; end; // sierpinski triangular procedure tForm1.Picture2Click (Sender: TOBJECT); VAR i, J: Integer; Begin D [1, 1]: = 0.5; D [1, 2]: = 0; D [ 1,3]: = 0; D [1,4]: = 0.5; D [1,5]: = 25; D [1,6]: = 1; D [2, 1]: = 0.5; D [ 2, 2]: = 0; D [2, 3]: = 0; D [2, 4]: = 0.5; D [2, 5]: = 1; D [2, 6]: = 50; D [ 3,1]: = 0.5; D [3, 2]: = 0; D [3, 3]: = 0; D [3, 4]: = 0.5; D [3, 5]: = 50; D [ 3,6]: = 50; image1.canvas.brush.color: = CLWHITE; image1.canvas.floodfill (10, 10, clgreen, fsborder); x: = 1000; Y: = 1000; J: = 2; for i: =
0 TO 100000 DO Begin K: = Random (3) 1; x: = D [k, 1] * x D [k, 2] * Y D [K, 5]; Y: = D [K, 3] * x d [k, 4] * y D [k, 6]; x1: = runk (x) * j 300; y1: = round (y) * J 150; image1.canvas.pixels [x1, y1]: = CLBLUE; END; END. OK, thank you ... Everyone work together!