Realistic computer graphics (I)-Natural Scene Simulation
Four basic tasks required for implementing realistic graphics on computer graphics devices. 1. 3D scenario description. 3D shape. 2. Convert the 3D geometric description into a two-dimensional perspective. Perspective conversion. 3. determine all meeting options in the scenario. Hidden algorithms, which can be used for detection. 4. Color of visible faces in computing scenarios. Based on the optical physics-based illumination model, the brightness and color composition of the light that can be projected to the observer's eye can be calculated. 3D modeling technology is divided into three types based on modeling objects: · Surface Modeling: studies how a computer describes a surface and how to display and control its shape interactively. A curved surface is further divided into two types: a regular curved surface (such as a plane or a cylindrical surface) and an irregular curved surface. The modeling methods of irregular surfaces include: bezr curve and surface, B-spline curve and surface, and Confucius surface. · Three-dimensional modeling. Study how to define and represent a three-dimensional object in a computer. These methods mainly include body element constructor, boundary representation, and octotree method. The surface shape and the three-dimensional shape are collectively referred to as the geometric model shape. · Natural scene simulation. Study how to simulate natural scenes in a computer, such as clouds, water flows, and trees. This article will focus on methods related to natural scene simulation. It is an important research topic in graphics to find mathematical models that can accurately describe various phenomena and landscapes in the objective world and reproduce these phenomena and landscapes in a realistic manner. Many natural scenes are difficult to describe using geometric models, such as smoke, plants, water waves, and flames. The modeling and rendering techniques discussed in this article all go beyond the limitations of the geometric model and can use simple models to describe complex natural scenes. 1.1 fragment and Ifs
1.1.1 Fractal Figure 1 "Snowflake" Curve Fractal refers to a class of geometric shapes in mathematics. It has a complex and Fine Structure on any scale. In general, the fragtal ry is self-similar, that is, every part of the image can be seen as a small copy of the overall image. For example, the snowflake curve is a typical fragtal image. The generation method is as follows: Take a first-class edge triangle and grow a small equi-edge triangle at 1/3 in the middle of each side, repeat the above process to form the curve shown in figure 2.1. Theoretically, infinite recursion forms a finite area, and the perimeter of the area is infinite and has an infinite number of vertices. Such a curve is mathematical. As early as the 19th century, some fragtal images with self-similar characteristics have emerged, but they were initially seen as a singular phenomenon. In the 1970s s of this century, Benoit B. Mandelbrot first studied the system of fragment and created a new mathematical branch of fragment. Mandelbrot extends the dimensions in the classical Euclidean ry and proposes the concept of number dimension. For example, the dimension of the above snowflake curve is 1.2618. Not just abstract mathematical theories. For example, the contour of a coastline can have an infinite length if its regularity is considered. Mandelbrot believes that the coast, mountains, clouds, and many other natural phenomena have the characteristics of fragment. Therefore, ry has become a very rapid scientific Branch, especially in computer graphics, and has become an important means to describe natural scenes and create computer art. In addition, fragment has broad application prospects in image compression. 1.1.2 ry transformation and iteration Functions The iteration function system (IFS) was first proposed by huchinson in 1981 and has become one of the important research contents in fractal ry. IFS is a framework based on affine transformation. It is generated after iteration based on the self-similar structure of the whole and local of the geometric object. An affine transform is used to rotate the image around the origin, scale up, and pan the image. Define the two-dimensional Euclidean space to be converted to a point of ω: R2 → R2, (x, y) as a point in the two-dimensional space, and the ry Transform Image is (x', y '), then, the formula for the affine transformation can be written as follows: An affine transform can generate a copy of a graph. Each part of a fragment graph can be seen as a replica of a different affine transform. This decomposition has nothing to do with the scale, that is, the source image can still be similar to the local image after the affine transformation. This general and local similarity is the basic feature of fragment. An iterative function system consists of a group of compression factors {S1, S2 ,... , Sn} limited compression ing set {ω 1, ω 2 ,... , ω n}, recorded as {ω n, n = 1, 2 ,... , N}, where N is the number of parts divided by the whole; the compression factor Sn corresponding to ω N in the overall compression ing set, with S = max {sn, n = 1, 2, ..., N} must be 0 ≤ S <1. Each ω n corresponds to an adjoint probability of 0 <PN <1, and Σ Pn = 1. The IFS Code is determined by compressing the ω n of the ing set and the corresponding adjoint probability Pn. According to the compression ing theorem of the fragment space, the random iteration can be used to plot the image's credit for the IFS Code of the given image. That is to say, if the IFS code is used for modeling, A very small amount of code can be used to draw very complex graphics. The inverse process of this process is also very meaningful. Obtaining the IFS code from a graph is equivalent to compressing the original graph. Therefore, it is also a hot topic in the research of fractal. 1.1.3 fractal-based scene generation The fragment plot drawn by IFS Code has infinitely subtle self-similar structures and can accurately reflect many objective things. This structure is difficult to be described using classical mathematical models. As long as the transformation is selected appropriately, you can use IFS to iteratively generate graphics effects of any precision, which is hard to achieve by other rendering methods.
1.2 grammar-based model
In 1969, aristid lindenmayer, an American scientist, proposed a method to describe the morphology and growth of plants. He named it l-grammars ). In 1984, A. R. Smith applied the L system to computer graphics. L The system is actually a set of formal languages, which are described by specific syntaxes. These syntaxes are composed of a series of generative clauses, and all generative clauses are directly matched. For example, a typical L system syntax includes four letters: {A, B, [,]} and two generative rules: 1. A → AA 2. B → A [B] AA [B] Starting from letter A, you can iteratively generate a, AA, AAAA, and other letter sequences. Starting from letter B, the first few iteration results are as follows: B A [B] AA [B] AA [A [B] AA [B] AAAA [A [B] AA [B] ...... If we think of words formed by generative iterations in such syntactic rules as part of a certain graph structure and the Content in square brackets as the branch of the previous symbol, the result of the three iterations of the above syntax is 2.2. On this basis, appropriately change the direction of the branch, add random factors, and draw details such as leaves, flowers, and fruits at the end of the branch, you can simulate the various forms of plants in the real world. Of course, the above L system does not record any geometric information, so the modeling language based on L system must support both syntax description and geometric description; how to grow the L system (iteration) process control is also a problem that needs to be studied. In this regard, reffye, prusinkiewicz and others proposed their respective methods. In short, the grammar-based L system is very successful in simulating plant growth, providing another powerful tool for drawing realistic computer graphics. In addition, this idea has been successfully applied to many aspects such as electronic line design and architectural design.
1.3 Particle System
The particle system method proposed by Reeves in 1983 is a very influential method for simulating irregular objects. It can successfully simulate a scene composed of irregular fuzzy objects. Different from other traditional graphics methods, this method fully reflects the dynamic and random nature of irregular fuzzy objects, so as to simulate fire, cloud, water, forest, wilderness and many other natural scenes. The basic idea of the particle system is to use many small particles with simple shapes as basic elements to represent irregular fuzzy objects. These particles have their own lifecycles, and they must all go through three stages in the system: "production", "motion and growth", and "extinction. The particle system is a system with "life". Therefore, unlike the traditional method, it can only generate instantaneous and static scenes, but can generate a series of pictures of motion evolution, this makes it possible to simulate dynamic natural scenes. The basic steps for generating a system instant screen are as follows: 1. generate new particles; 2. assign certain attributes to each new particle; 3. Delete the particles that have exceeded the lifetime; 4. Moving and transforming particles based on their dynamic attributes; 5. display an image composed of living particles. The particle system uses a random process to control the number of particles produced and determine some initial Random attributes of the newly generated particles, such as the initial movement direction, initial size, initial color, initial transparency, initial shape, and survival, and randomly change these attributes during particle motion and growth. The randomness of the particle system makes it easy to simulate irregular fuzzy objects. References [1] Donald Hearn, M. Pauline Baker. Computer Graphics C version, 2nd edition, Tsinghua University Press, 1998 [2] Alan Watt. 3D computer graphics, 2nd edition. Addison-Wesley, 1993 [3] Tang rongxi, Wang jiaye, Peng qunsheng, et al. Computer Graphics tutorial. Science Press, 1994 [4] Tang zesheng, Zhou Jiayu, Li xinyou. Computer Graphics basics. Tsinghua University Press, 1995 [5] Shi jiaoying, Cai Wenli. scientific computing visualization algorithm and system. Science Press, 1996 Member name of the author: dipper |
|