# Research on 3D International River Visualization Simulation Based on Human-Computer Interaction

Authors: Shuanhu Li; Jun Yang; Ziwen Zhang
Journal: Wireless Communications and Mobile Computing
 (2020)

---

## Abstract

With the development of digitalization in various fields, the water conservancy field is gradually developing digital three-dimensional visualization research to promote the development of digital watershed construction. This paper deeply analyzes and discusses the theory and application of three-dimensional visualization of river water scenes and realizes an interactive visual simulation system based on virtual reality technology, which simulates simulation and operation management, which can greatly accelerate the data. The processing speed makes the huge data be effectively utilized to provide visual interaction means for numerical simulation and data analysis, improve the efficiency of numerical calculation, and realize human-computer interaction communication, so that people can observe the phenomena and laws that are difficult to observe by traditional methods. The rationality of the mathematical model is analyzed for effectiveness.


---

## Body

## 1. Introduction

With the development of digitalization in various fields, the water conservancy field is gradually developing digital three-dimensional visualization research to promote the development of digital watershed construction [1, 2]. The overall framework structure of digital watershed research is usually divided into three layers, the digital watershed visual basic information platform foundation layer, the digital watershed professional application system thematic layer, and the digital watershed integrated management and decision system integration layer [3, 4]. The simulation of watershed 3D visualization simulation is the basis of constructing digital watershed visualization information platform. The key part of 3D visualization simulation system is the establishment of watershed professional model in the basin and the simulation of terrain virtual scene [5, 6]. There are many natural phenomena in the basin, and flooding is one of the most frequent phenomena. Floods in history often cause great disasters to human beings. To realize the prevention and control of flood disasters, it is important to study the laws of flood movement, master the habits of floods, manage flood disaster risks, and adjust the relationship between people and water [7, 8]. At present, the remediation of floods in the basin has gradually changed from flood control to flood prevention and mitigation, water resource protection, improvement of ecological environment, and ecological form in the past. This requires an in-depth understanding of the flood evolution law of the basin and the flood submersion process to perform simulations. The dynamic simulation of the digital watershed law can simulate the change process after the flood is introduced into the watershed and the three-dimensional visual display of the flooding state, analyze and study the flood phenomenon and the law, reproduce and predict the different situations of flood submerging by changing the model calculation parameters, and provide decision support for flood resource utilization and watershed ecological environment management research [9].Visualization of 3D spatial information is a key technology to be solved in digital watersheds, and it is very important for digital management of river basins. Currently widely used in the field of water conservancy is a technology-based two-dimensional visualization platform [10]. Although it is mature in terms of technology and function, there are many defects that cannot be overcome by expressing the actual three-dimensional space in two dimensions. In the study of river basin comprehensive information management and water flow movement law, the trend of digitization of various types of information becomes more and more obvious. Faced with a large amount of complicated data, how to falsify the truth and discover the changing laws of the physical processes represented by the data will be studied in the field of water conservancy [11, 12]. As the most intuitive and quick way to obtain information, 3D visualization has unique advantages in information expression. Therefore, it is necessary to study the more perfect 3D visualization simulation system, from 3D visualization, numerical simulation, data information acquisition, etc., and improve the operation level of the basin system. Because GIS can operate, analyze, simulate, and display the spatial data of the basin quickly, accurately, and comprehensively, the mathematical model of hydraulics can be used to calculate the evolution process of river water in the basin and the various locations and time periods within the basin. The water level, flow velocity, submerged area, volume of the river water, etc. will be combined with the hydraulic model to carry out research on the digital watershed 3D visualization simulation system and comprehensively process various information in the basin, so that the decision-makers have a global and clear awareness that helps decision-makers achieve scientific decision-making in planning and management [13].The construction of digital watershed characterized by digitization, network, and informatization is an inevitable trend of the development of water conservancy informatization and an important way to realize the development of watershed management and analysis to informatization. Research on digital watersheds has received more and more attention from everyone, but many engineering examples are still in the stage of exploration and research. The digital watershed is a large and complex system engineering, which involves many high-tech fields. This requires close cooperation from multiple disciplines and adopts unified planning, step-by-step implementation, and key breakthrough strategies. The watershed 3D visualization simulation system is a computer simulation system for watershed roaming, program demonstration, engineering operation simulation, etc., including 3D visualization, informatization, simulation, and other functions, including computer graphics, database, watershed mathematical model, and software engineering. The field of research belongs to the category of “digital watershed” research [14].


## 2. 3D Visualization Simulation Technologies

The three-dimensional visual simulation of watershed is an important part of constructing the basic information platform of digital watershed visualization, and it is the foundation of digital watershed construction. With the support of the data integration platform [15], a three-dimensional virtual visualization simulation system for specific applications can be formed through various water conservancy professional models, which can realize comprehensive processing of various information in the basin.


### 2.1. Three-Dimensional Theoretical Technique

Three-dimensional display research has become one of the hotspots in the field of computer graphics. Three-dimensional animation technology combined with computer video and audio technology can better simulate simulation scenes, three-dimensional flight simulation, and dynamic monitoring, and the development of three-dimensional Web technology makes the three-dimensional landscape more realistic, intuitive, and vivid [16].The starting point of 3D stereoscopic display is to use 3D stereoscopic technology and computer simulation technology to transform the real world 3D coordinates into computer coordinates, through optical and electronic processing, to imitate the real world and display on the screen [17, 18]. 3D technology is widely used in resource environment model, terrain simulation, CAD-aided design, film and television special effects, advertising design, etc. [19]. It has the advantages of high degree of visualization, flexible expression, dynamic and realistic feeling, and convenient data updating. It can also be applied to government-assisted decision-making, flood control and disaster mitigation, topographic survey and field operation design, hydropower, construction engineering planning and site selection, environmental assessment, urban and community planning and design, housing decoration design, tourist attraction planning, medicine, biology, atmosphere, and military [20]. With the development of computer and graphics and image processing technology, digital product 3D has become a major trend in today’s information products [21].3D simulation technology is actually a part of virtual reality technology. 3D digital technology is often closely connected with virtual reality technology. Dynamic, real-time display system, high-speed computer processing, and intelligent interactive multimedia technology are the key to 3D visualization simulation [22]. Technology is also the key to virtual reality technology [23]. In addition to the following key technologies are the following:
(1)
Good 3D data model and data structureThe three-dimensional spatial data model is about the concept and method of three-dimensional spatial data organization. It reflects the interrelationship between spatial entities and entities in the real world. The understanding and research of three-dimensional data models and data structures largely determine the success or failure of development and application of the three-dimensional technology. Due to the huge and complex three-dimensional data, the three-dimensional data model has not yet reached consensus [24].
(2)
Extraction of 3D geometric feature dataThe construction of 3D models requires true 3D spatial data (including planar position, elevation, or height data) and real image data (including the texture of the side of the building). How to obtain these data has become a difficult point, in addition to traditional manual internal and external surveys and simple computer processing, using satellite remote sensing, aerial telemetry, aerial ground photography, ground laser scanners and GPS, and synthetic aperture radar (SAR) technology. Getting data is the current trend of development [25].


### 2.2. 3D Visualization Simulation Technologies

#### 2.2.1. Overview of Scientific Computing Visualization

Developed countries began to study the emerging research field of scientific visualization in the late 1980s. It can effectively produce accurate data. The essence is to track and analyze the simulation process through graphics and image processing. Shown on the above, the interactive processing method closely integrates the graphic image processing understanding technology and the human-computer interaction technology and finally produces complex multidimensional data image graphics [26].At present, the field of scientific computing visualization research mainly focuses on the research of computing environment, the research of display equipment in virtual environment, and the research of visualization technology of scientific computing.(1)
Computational environment research, in high-end computing environments, distributed storage of massively parallel computers, shared internal storage symmetric multiprocessors, and distributed shared internal storage of multiple processors have emerged; at the same time, at workstations and on the low-end side of PCs, multiprocessor architecture and parallel processing functions have also emerged to improve the quality and efficiency of scientific computing(2)
Research on virtual environment display devices develops wall-type large-screen displays suitable for true three-dimensional display and cave-type display devices with immersive features, providing methods and means for generating and displaying huge amounts of data(3)
There are two main types of scientific computing visualization technologies: one is the study of various application models, and the other is the visualization implementation technology. The research of various application models is based on the simulation and design application model, and the interactive solution of various problems is realized by visual insight. The data of different disciplines such as medicine, geoscience, meteorology, physics, and biological science are processed as graphical information that human vision can intuitively accept; in the research of visualization technology, distributed, collaborative, and immersive technologies have become the mainstream research direction


#### 2.2.2. Visual Rendering Technology

Visual rendering technology, including image processing technology, provides underlying support for 3D reconstruction of spatial data. According to different drawing methods, it can be divided into two categories: one is based on face-based drawing method, and the other is based on the method of volume data drawing. The most basic theory of three-dimensional object shape is that it can provide three-dimensional object shape complete information surface rendering technology. According to its specific contour, it can be divided into two types: one is the boundary contour representation, and the other is the surface representation.Surface reconstruction was first proposed in 1975, mainly in the tomographic image, by manually or computer-automatically dividing the target contour, and then combining the contours of each fault to represent the boundary of the object of interest. The method is simple, and the amount of data is small. In 1977, the science of using the planar contour triangle algorithm was proposed based on various contour images. Surface fitting uses a triangular outline. This is the surface-oriented approach, which reconstructs the entity by constructing a combined shape of the solid surface. The problem of three-dimensional reconstruction of the CT tomographic image sequence proposed in 1983 was proposed by Xu, who proposed adding a constraint condition to the sum of the curvatures at each contour point, and the minimum curvature represents an interpolation surface. In 1987, Lorensen proposed the “Marching Cube” algorithm, which is a surface technique, which is based on voxel-based surface reconstruction. In 1989, Lin used the B-spline interpolation reconstruction algorithm from the contour and obtained an overall smooth plane or surface. These two methods are surface-oriented rendering methods. In 1999, Zhao Haifeng and others proposed using an octal tree to quickly calculate a series of tomographic images.Volume rendering technology is computationally intensive and fast and relies on the absorption of image processing, computer vision, and computer graphics. The basic principle is to project color, opacity, etc. into cloud-like substances and then pass light and these substances. The interaction describes the resulting image.(1)
The Difference from Traditional Computer Graphics: in terms of performance, the volume rendering method is a complete representation of the three-dimensional voxel on the object, and the rendering technique can cover all the information; from the performance content, the difference is mainly reflected in the representation object. The model is different, and the volume rendering is mainly to express a limited number of discrete sampling points, while the traditional computer graphics is a description of the continuous geometric model, which makes them the processing, operation, transformation, analysis, and implementation methods of the object model very different.(2)
Source and Organization of Data: there are three main sources, including measurements (such as medical computed tomography and MRI imaging), operations (such as fluid dynamics and finite element analysis), and voxel element of geometric entities. These data can be mapped in the voxel set of the three-dimensional space grid unit. The structure of the three-dimensional space grid determines the basic shape of the voxel and the spatial relationship between the voxels, which determines the form of the volume data. The structure of the grid mainly includes Cartesian grid, regular grid, linear grid, curved grid, block structure grid, unstructured grid, and scattered data. Drawing Method: mainly includes the image sequence drawing method represented by ray casting method, the footstep method (footprint or splatting) as the representative object body drawing method, and the shear-mechanism (shear-warp). The three types of hybrid rendering methods are applicable to multiple observation angles.(3)
Illumination Model: including the optical properties of the light source and the substance, wherein the light source model includes the type of light source (ambient light, radiant light, diffused light, specular light, etc.), intensity, position, and color; the optical properties of the substance include properties such as reflectivity, refractive index, opacity, and diffusion determined by the material. They combine and work together to complete the entire illumination model.At present, many scholars in China have conducted in-depth research and comparison on volume rendering methods and have done a lot of practical work in medicine, graphics, geosciences, and meteorology.


## 2.1. Three-Dimensional Theoretical Technique

Three-dimensional display research has become one of the hotspots in the field of computer graphics. Three-dimensional animation technology combined with computer video and audio technology can better simulate simulation scenes, three-dimensional flight simulation, and dynamic monitoring, and the development of three-dimensional Web technology makes the three-dimensional landscape more realistic, intuitive, and vivid [16].The starting point of 3D stereoscopic display is to use 3D stereoscopic technology and computer simulation technology to transform the real world 3D coordinates into computer coordinates, through optical and electronic processing, to imitate the real world and display on the screen [17, 18]. 3D technology is widely used in resource environment model, terrain simulation, CAD-aided design, film and television special effects, advertising design, etc. [19]. It has the advantages of high degree of visualization, flexible expression, dynamic and realistic feeling, and convenient data updating. It can also be applied to government-assisted decision-making, flood control and disaster mitigation, topographic survey and field operation design, hydropower, construction engineering planning and site selection, environmental assessment, urban and community planning and design, housing decoration design, tourist attraction planning, medicine, biology, atmosphere, and military [20]. With the development of computer and graphics and image processing technology, digital product 3D has become a major trend in today’s information products [21].3D simulation technology is actually a part of virtual reality technology. 3D digital technology is often closely connected with virtual reality technology. Dynamic, real-time display system, high-speed computer processing, and intelligent interactive multimedia technology are the key to 3D visualization simulation [22]. Technology is also the key to virtual reality technology [23]. In addition to the following key technologies are the following:
(1)
Good 3D data model and data structureThe three-dimensional spatial data model is about the concept and method of three-dimensional spatial data organization. It reflects the interrelationship between spatial entities and entities in the real world. The understanding and research of three-dimensional data models and data structures largely determine the success or failure of development and application of the three-dimensional technology. Due to the huge and complex three-dimensional data, the three-dimensional data model has not yet reached consensus [24].
(2)
Extraction of 3D geometric feature dataThe construction of 3D models requires true 3D spatial data (including planar position, elevation, or height data) and real image data (including the texture of the side of the building). How to obtain these data has become a difficult point, in addition to traditional manual internal and external surveys and simple computer processing, using satellite remote sensing, aerial telemetry, aerial ground photography, ground laser scanners and GPS, and synthetic aperture radar (SAR) technology. Getting data is the current trend of development [25].


## 2.2. 3D Visualization Simulation Technologies

### 2.2.1. Overview of Scientific Computing Visualization

Developed countries began to study the emerging research field of scientific visualization in the late 1980s. It can effectively produce accurate data. The essence is to track and analyze the simulation process through graphics and image processing. Shown on the above, the interactive processing method closely integrates the graphic image processing understanding technology and the human-computer interaction technology and finally produces complex multidimensional data image graphics [26].At present, the field of scientific computing visualization research mainly focuses on the research of computing environment, the research of display equipment in virtual environment, and the research of visualization technology of scientific computing.(1)
Computational environment research, in high-end computing environments, distributed storage of massively parallel computers, shared internal storage symmetric multiprocessors, and distributed shared internal storage of multiple processors have emerged; at the same time, at workstations and on the low-end side of PCs, multiprocessor architecture and parallel processing functions have also emerged to improve the quality and efficiency of scientific computing(2)
Research on virtual environment display devices develops wall-type large-screen displays suitable for true three-dimensional display and cave-type display devices with immersive features, providing methods and means for generating and displaying huge amounts of data(3)
There are two main types of scientific computing visualization technologies: one is the study of various application models, and the other is the visualization implementation technology. The research of various application models is based on the simulation and design application model, and the interactive solution of various problems is realized by visual insight. The data of different disciplines such as medicine, geoscience, meteorology, physics, and biological science are processed as graphical information that human vision can intuitively accept; in the research of visualization technology, distributed, collaborative, and immersive technologies have become the mainstream research direction


### 2.2.2. Visual Rendering Technology

Visual rendering technology, including image processing technology, provides underlying support for 3D reconstruction of spatial data. According to different drawing methods, it can be divided into two categories: one is based on face-based drawing method, and the other is based on the method of volume data drawing. The most basic theory of three-dimensional object shape is that it can provide three-dimensional object shape complete information surface rendering technology. According to its specific contour, it can be divided into two types: one is the boundary contour representation, and the other is the surface representation.Surface reconstruction was first proposed in 1975, mainly in the tomographic image, by manually or computer-automatically dividing the target contour, and then combining the contours of each fault to represent the boundary of the object of interest. The method is simple, and the amount of data is small. In 1977, the science of using the planar contour triangle algorithm was proposed based on various contour images. Surface fitting uses a triangular outline. This is the surface-oriented approach, which reconstructs the entity by constructing a combined shape of the solid surface. The problem of three-dimensional reconstruction of the CT tomographic image sequence proposed in 1983 was proposed by Xu, who proposed adding a constraint condition to the sum of the curvatures at each contour point, and the minimum curvature represents an interpolation surface. In 1987, Lorensen proposed the “Marching Cube” algorithm, which is a surface technique, which is based on voxel-based surface reconstruction. In 1989, Lin used the B-spline interpolation reconstruction algorithm from the contour and obtained an overall smooth plane or surface. These two methods are surface-oriented rendering methods. In 1999, Zhao Haifeng and others proposed using an octal tree to quickly calculate a series of tomographic images.Volume rendering technology is computationally intensive and fast and relies on the absorption of image processing, computer vision, and computer graphics. The basic principle is to project color, opacity, etc. into cloud-like substances and then pass light and these substances. The interaction describes the resulting image.(1)
The Difference from Traditional Computer Graphics: in terms of performance, the volume rendering method is a complete representation of the three-dimensional voxel on the object, and the rendering technique can cover all the information; from the performance content, the difference is mainly reflected in the representation object. The model is different, and the volume rendering is mainly to express a limited number of discrete sampling points, while the traditional computer graphics is a description of the continuous geometric model, which makes them the processing, operation, transformation, analysis, and implementation methods of the object model very different.(2)
Source and Organization of Data: there are three main sources, including measurements (such as medical computed tomography and MRI imaging), operations (such as fluid dynamics and finite element analysis), and voxel element of geometric entities. These data can be mapped in the voxel set of the three-dimensional space grid unit. The structure of the three-dimensional space grid determines the basic shape of the voxel and the spatial relationship between the voxels, which determines the form of the volume data. The structure of the grid mainly includes Cartesian grid, regular grid, linear grid, curved grid, block structure grid, unstructured grid, and scattered data. Drawing Method: mainly includes the image sequence drawing method represented by ray casting method, the footstep method (footprint or splatting) as the representative object body drawing method, and the shear-mechanism (shear-warp). The three types of hybrid rendering methods are applicable to multiple observation angles.(3)
Illumination Model: including the optical properties of the light source and the substance, wherein the light source model includes the type of light source (ambient light, radiant light, diffused light, specular light, etc.), intensity, position, and color; the optical properties of the substance include properties such as reflectivity, refractive index, opacity, and diffusion determined by the material. They combine and work together to complete the entire illumination model.At present, many scholars in China have conducted in-depth research and comparison on volume rendering methods and have done a lot of practical work in medicine, graphics, geosciences, and meteorology.


## 2.2.1. Overview of Scientific Computing Visualization

Developed countries began to study the emerging research field of scientific visualization in the late 1980s. It can effectively produce accurate data. The essence is to track and analyze the simulation process through graphics and image processing. Shown on the above, the interactive processing method closely integrates the graphic image processing understanding technology and the human-computer interaction technology and finally produces complex multidimensional data image graphics [26].At present, the field of scientific computing visualization research mainly focuses on the research of computing environment, the research of display equipment in virtual environment, and the research of visualization technology of scientific computing.(1)
Computational environment research, in high-end computing environments, distributed storage of massively parallel computers, shared internal storage symmetric multiprocessors, and distributed shared internal storage of multiple processors have emerged; at the same time, at workstations and on the low-end side of PCs, multiprocessor architecture and parallel processing functions have also emerged to improve the quality and efficiency of scientific computing(2)
Research on virtual environment display devices develops wall-type large-screen displays suitable for true three-dimensional display and cave-type display devices with immersive features, providing methods and means for generating and displaying huge amounts of data(3)
There are two main types of scientific computing visualization technologies: one is the study of various application models, and the other is the visualization implementation technology. The research of various application models is based on the simulation and design application model, and the interactive solution of various problems is realized by visual insight. The data of different disciplines such as medicine, geoscience, meteorology, physics, and biological science are processed as graphical information that human vision can intuitively accept; in the research of visualization technology, distributed, collaborative, and immersive technologies have become the mainstream research direction


## 2.2.2. Visual Rendering Technology

Visual rendering technology, including image processing technology, provides underlying support for 3D reconstruction of spatial data. According to different drawing methods, it can be divided into two categories: one is based on face-based drawing method, and the other is based on the method of volume data drawing. The most basic theory of three-dimensional object shape is that it can provide three-dimensional object shape complete information surface rendering technology. According to its specific contour, it can be divided into two types: one is the boundary contour representation, and the other is the surface representation.Surface reconstruction was first proposed in 1975, mainly in the tomographic image, by manually or computer-automatically dividing the target contour, and then combining the contours of each fault to represent the boundary of the object of interest. The method is simple, and the amount of data is small. In 1977, the science of using the planar contour triangle algorithm was proposed based on various contour images. Surface fitting uses a triangular outline. This is the surface-oriented approach, which reconstructs the entity by constructing a combined shape of the solid surface. The problem of three-dimensional reconstruction of the CT tomographic image sequence proposed in 1983 was proposed by Xu, who proposed adding a constraint condition to the sum of the curvatures at each contour point, and the minimum curvature represents an interpolation surface. In 1987, Lorensen proposed the “Marching Cube” algorithm, which is a surface technique, which is based on voxel-based surface reconstruction. In 1989, Lin used the B-spline interpolation reconstruction algorithm from the contour and obtained an overall smooth plane or surface. These two methods are surface-oriented rendering methods. In 1999, Zhao Haifeng and others proposed using an octal tree to quickly calculate a series of tomographic images.Volume rendering technology is computationally intensive and fast and relies on the absorption of image processing, computer vision, and computer graphics. The basic principle is to project color, opacity, etc. into cloud-like substances and then pass light and these substances. The interaction describes the resulting image.(1)
The Difference from Traditional Computer Graphics: in terms of performance, the volume rendering method is a complete representation of the three-dimensional voxel on the object, and the rendering technique can cover all the information; from the performance content, the difference is mainly reflected in the representation object. The model is different, and the volume rendering is mainly to express a limited number of discrete sampling points, while the traditional computer graphics is a description of the continuous geometric model, which makes them the processing, operation, transformation, analysis, and implementation methods of the object model very different.(2)
Source and Organization of Data: there are three main sources, including measurements (such as medical computed tomography and MRI imaging), operations (such as fluid dynamics and finite element analysis), and voxel element of geometric entities. These data can be mapped in the voxel set of the three-dimensional space grid unit. The structure of the three-dimensional space grid determines the basic shape of the voxel and the spatial relationship between the voxels, which determines the form of the volume data. The structure of the grid mainly includes Cartesian grid, regular grid, linear grid, curved grid, block structure grid, unstructured grid, and scattered data. Drawing Method: mainly includes the image sequence drawing method represented by ray casting method, the footstep method (footprint or splatting) as the representative object body drawing method, and the shear-mechanism (shear-warp). The three types of hybrid rendering methods are applicable to multiple observation angles.(3)
Illumination Model: including the optical properties of the light source and the substance, wherein the light source model includes the type of light source (ambient light, radiant light, diffused light, specular light, etc.), intensity, position, and color; the optical properties of the substance include properties such as reflectivity, refractive index, opacity, and diffusion determined by the material. They combine and work together to complete the entire illumination model.At present, many scholars in China have conducted in-depth research and comparison on volume rendering methods and have done a lot of practical work in medicine, graphics, geosciences, and meteorology.


## 3. 3D River Water Models

The development of this system is based on a tributary of a main canal. To maximize the versatility, operability, and demonstration of the system, it is assumed that the tributary has a total of three sections, two sections of open channels plus a landscape water body, and the open channel adopts a trapezoidal section, and the landscape water body is approximately rectangular section (as shown). It is assumed that the water flow in the tributary is a constant uniform flow in the open channel, and there is no tributary separation and separation. The slope of the bottom of the canal cannot be 0, and the path along the long straight prism channel keeps the roughness constant. There is no absolute uniform flow in the actual work, but as long as the actual situation is similar to the required conditions and the basic uniform flow conditions are met, it can be approximated as a uniform flow in the open channel. Therefore, the branch channel can be regarded as a uniform flow in the open channel.


### 3.1. Calculation Formula

The hydraulic calculations for the open channel tributaries are mainly expressed as follows:(1)A=b+mhh,χ=b+2h1+m2,R=b+mhhb+2h1+m2,v=CRi=1nR2/3i1/2,Q=b+mhh•v.In which,v is the average flow velocity of the section, R is the hydraulic radius, C is the coefficient, A is the cross-sectional area of the water, Q is the flow rate, and K is the flow modulus and can also represent the characteristic flow, reflecting m, b, and n versus Q impact.The qualitative model is a mathematical equation. The water quality model is a process used to describe the flow of water, in which mixed pollutants migrate in the water environment. There are many methods for solving equations. For a single water quality, the answer can be directly given. The numerical solution is used to solve complex water quality problems. The water quality model is constructed based on the complete mixing of the main canal pollutants. The water concentration of the water body is used to predict and analyze the pollutant concentration through the self-purification function of the water body, considering the variety and indicators of the pollutants, combined with the actual development of the project. With the research background, this time, the most representative BOD and DO were selected as the simulation indicators of water environmental quality organic pollutants.The water quality model is given as follows:(2)Bx=B1e−K1x/u,Dx=K1B1K2−K1e−K1x/u−e−K2x/u+D1e−K2x/u.


### 3.2. Model Building Step

Suppose a branch channel is divided into 3 sections. The first section is the trapezoidal section channel lengthx1. The section dimensions are as follows: bottom width b1, water depth h1, slope coefficient m1, slope i1, and roughness n1; the second section of landscape water, approximate rectangle, and its length is x2, bottom width is b2, slope is i2, and roughness is n2; the third section is trapezoidal section channel length x3, and its section dimensions are as follows: bottom width water depth h3, slope coefficient b3, slope i3, and rough raten3.It is known that the initial section (the inlet of the branch channel), the BOD concentration, the deficient oxygen amountD1, the branch channel flow rate and the downstream flow velocity v, the water depth h, the BODx concentration Bx, and the deficient oxygen amount Dx determine whether the section meets the water quality standard.The steps to build the model are as follows:(1)
Ifx≤x1, the parameters of the section are(1)
Calculate the water depthh(3)h=h0(2)
Calculate the flow ratev(4)R1=b1+m1hhb1+2h1+m12v=1n1R2/3i1/2(3)
Calculate trafficQ(5)Q=b1+m1hh•v(4)
Calculate BOD concentration and oxygen deficiency in the water body of the section(6)Bx=B1e−K1x/vDx=K1B1K2−K1e−K1x/u−e−K2x/u+D1e−K2x/u(5)
Analysis of water environment quality assessmentStep 1.
Enter the channel parameters of the first paragraphx1,b1,h1,m1,n1,i1; the second paragraph of the water parameters x2,b2,h2,m2,n2,i2; and the third paragraph of the channel parameters x3,b3,h3,m3,n3,i3.Step 2.
Enter the initial section oxygen consumption coefficientK1 and the reoxygenation coefficient K2.Step 3.
Input the initial section water depthh0, BOD concentration B1, and deficient oxygen amount D1.Step 4.
Calculate the water parameters of any section downstream of the initial section. Given a certain valuex, the calculation steps are as follows:IfBx>10, the water body is inferior V water; if 6<Bx<10, the water body is type V water; if 4<Bx<6, the water body is type IV water; if 3<Bx<4, the water body is type III water. If Bx<3, the water body is type II water.
(2)
Ifx1<x≤x1+x2, the parameters of the section are(1)
Calculate trafficQ(7)h1=h0R1=b1+m1h1h1b1+2h11+m12v1=1n1R12/3i11/2Q=b1+m1hh1•v1(2)
Calculate the water depth of the second section of the waterhAfter calculatingQ, calculate h, because h=fQ,n2,i2,b2, so the function relationship is
(8)Q=1n2i21/2b2hb2hb2+2h2/3.By computer trial, you can solveh.
(3)
Calculate the flow ratev(9)v=Qb2h(4)
Calculate BOD concentration and oxygen deficiency in the water body of the sectionTo calculate the BOD concentrationBx and the deficient oxygen Dx in the second paragraph, firstly, the first section of the open channel end BOD concentration B2 and the oxygen deficiency amount D2.
(10)B2=B1e−K1x/v1,D2=K1B1K2−K1e−K1x/v1−e−K2x/v1+D1e−K2x/v1.Then,Bx and Dx are
(11)Bx=B2e−K1x−x1/v,Dx=K1B1K2−K1e−K1x−x1/v−e−K2x−x1/v+D1e−K2x−x1/vv.(5)
Analysis of water environment quality assessmentIfBx>10, the water body is inferior V water; if 6<Bx<10, the water body is type V water; if 4<Bx<6, the water body is type IV water; if 3<Bx<4, the water body is type III water. If Bx<3, the water body is type II water.
(3)
Ifx1+x2<x≤x1+x2+x3, the parameters of the section are(1)
Calculate trafficQ(12)h1=h0R1=b1+m1h1h1b1+2h11+m12v1=1n1R12/3i11/2Q=b1+m1hh1•v1(2)
Calculate the water depth of the second section of the waterhAfter calculatingQ, calculate h, because h=fQ,n3,i3,b3, so the function relationship is
(13)Q=1n3i31/2b3+m3hhb3+m3hhb3+2h1+m322/3.By computer trial, you can solveh.
(3)
Calculate the flow ratev(14)v=Qb3+m3hh(4)
Calculate BOD concentration and oxygen deficiency in the water body of the sectionTo calculate the BOD concentrationBx and the deficient oxygen Dx in the third paragraph, first, the first paragraph of the open channel end BOD concentration B2, the oxygen deficiency D2 and the second section of the water end section BOD concentration B3, the oxygen deficiency D3.
(15)B2=B1e−K1x/v1,D2=K1B1K2−K1e−K1x/v1−e−K2x/v1+D1e−K2x/v1.To calculate the BOD concentrationB3 and the deficient oxygen amount D3 of the second section of the water body, it is necessary to know the flow rate v2 of the second section of the water body. First, calculate the water depth h2 of the second section of water and solve h2 according to formula Q=1/n2i21/2b2hb2h/b2+2h2/3. Calculate v2 according tov2=Q/b2+m2h2h.
(16)B3=B2e−K1x2/v2,D3=K1B2K2−K1e−K1x2/v2−e−K2x2/v2+D1e−K2x2/v2.Then,Bx and Dx are
(17)Bx=B3e−K1x−x1−x2/v,Dx=K1B3K2−K1e−K1x−x1−x2/v−e−K2x−x1−x2/v+D1e−K2x−x1−x2/v.(5)
Analysis of water environment quality assessmentIfBx>10, the water body is inferior V water; if 6<Bx<10, the water body is type V water; if 4<Bx<6, the water body is type IV water; if 3<Bx<4, the water body is type III water. If Bx<3, the water body is type II water.


### 3.3. The Overall Design of the Visual Simulation System

The main function of the visual simulation system is to combine the geographic information analysis function of GIS and the three-dimensional display function of Vega [20] to express the river water environment information in various forms. Its main modules include GIS platform, 3D visual module, water quality evaluation module, and data management module.The basis for visualizing the water quality is to obtain corresponding water quality data, including monitoring data and simulation data. The data management module can easily add, delete, modify, and import various geographic, hydrological, and water quality data to provide basic data for water quality assessment; the water quality assessment module provides the final data to be displayed for visualization; GIS platform achieves water quality 2D display, while the Vega module provides a 3D display of geographic information. The functional modules of the system are shown in Figure1.Figure 1
Functional block diagram of water environment visualization simulation system.


## 3.1. Calculation Formula

The hydraulic calculations for the open channel tributaries are mainly expressed as follows:(1)A=b+mhh,χ=b+2h1+m2,R=b+mhhb+2h1+m2,v=CRi=1nR2/3i1/2,Q=b+mhh•v.In which,v is the average flow velocity of the section, R is the hydraulic radius, C is the coefficient, A is the cross-sectional area of the water, Q is the flow rate, and K is the flow modulus and can also represent the characteristic flow, reflecting m, b, and n versus Q impact.The qualitative model is a mathematical equation. The water quality model is a process used to describe the flow of water, in which mixed pollutants migrate in the water environment. There are many methods for solving equations. For a single water quality, the answer can be directly given. The numerical solution is used to solve complex water quality problems. The water quality model is constructed based on the complete mixing of the main canal pollutants. The water concentration of the water body is used to predict and analyze the pollutant concentration through the self-purification function of the water body, considering the variety and indicators of the pollutants, combined with the actual development of the project. With the research background, this time, the most representative BOD and DO were selected as the simulation indicators of water environmental quality organic pollutants.The water quality model is given as follows:(2)Bx=B1e−K1x/u,Dx=K1B1K2−K1e−K1x/u−e−K2x/u+D1e−K2x/u.


## 3.2. Model Building Step

Suppose a branch channel is divided into 3 sections. The first section is the trapezoidal section channel lengthx1. The section dimensions are as follows: bottom width b1, water depth h1, slope coefficient m1, slope i1, and roughness n1; the second section of landscape water, approximate rectangle, and its length is x2, bottom width is b2, slope is i2, and roughness is n2; the third section is trapezoidal section channel length x3, and its section dimensions are as follows: bottom width water depth h3, slope coefficient b3, slope i3, and rough raten3.It is known that the initial section (the inlet of the branch channel), the BOD concentration, the deficient oxygen amountD1, the branch channel flow rate and the downstream flow velocity v, the water depth h, the BODx concentration Bx, and the deficient oxygen amount Dx determine whether the section meets the water quality standard.The steps to build the model are as follows:(1)
Ifx≤x1, the parameters of the section are(1)
Calculate the water depthh(3)h=h0(2)
Calculate the flow ratev(4)R1=b1+m1hhb1+2h1+m12v=1n1R2/3i1/2(3)
Calculate trafficQ(5)Q=b1+m1hh•v(4)
Calculate BOD concentration and oxygen deficiency in the water body of the section(6)Bx=B1e−K1x/vDx=K1B1K2−K1e−K1x/u−e−K2x/u+D1e−K2x/u(5)
Analysis of water environment quality assessmentStep 1.
Enter the channel parameters of the first paragraphx1,b1,h1,m1,n1,i1; the second paragraph of the water parameters x2,b2,h2,m2,n2,i2; and the third paragraph of the channel parameters x3,b3,h3,m3,n3,i3.Step 2.
Enter the initial section oxygen consumption coefficientK1 and the reoxygenation coefficient K2.Step 3.
Input the initial section water depthh0, BOD concentration B1, and deficient oxygen amount D1.Step 4.
Calculate the water parameters of any section downstream of the initial section. Given a certain valuex, the calculation steps are as follows:IfBx>10, the water body is inferior V water; if 6<Bx<10, the water body is type V water; if 4<Bx<6, the water body is type IV water; if 3<Bx<4, the water body is type III water. If Bx<3, the water body is type II water.
(2)
Ifx1<x≤x1+x2, the parameters of the section are(1)
Calculate trafficQ(7)h1=h0R1=b1+m1h1h1b1+2h11+m12v1=1n1R12/3i11/2Q=b1+m1hh1•v1(2)
Calculate the water depth of the second section of the waterhAfter calculatingQ, calculate h, because h=fQ,n2,i2,b2, so the function relationship is
(8)Q=1n2i21/2b2hb2hb2+2h2/3.By computer trial, you can solveh.
(3)
Calculate the flow ratev(9)v=Qb2h(4)
Calculate BOD concentration and oxygen deficiency in the water body of the sectionTo calculate the BOD concentrationBx and the deficient oxygen Dx in the second paragraph, firstly, the first section of the open channel end BOD concentration B2 and the oxygen deficiency amount D2.
(10)B2=B1e−K1x/v1,D2=K1B1K2−K1e−K1x/v1−e−K2x/v1+D1e−K2x/v1.Then,Bx and Dx are
(11)Bx=B2e−K1x−x1/v,Dx=K1B1K2−K1e−K1x−x1/v−e−K2x−x1/v+D1e−K2x−x1/vv.(5)
Analysis of water environment quality assessmentIfBx>10, the water body is inferior V water; if 6<Bx<10, the water body is type V water; if 4<Bx<6, the water body is type IV water; if 3<Bx<4, the water body is type III water. If Bx<3, the water body is type II water.
(3)
Ifx1+x2<x≤x1+x2+x3, the parameters of the section are(1)
Calculate trafficQ(12)h1=h0R1=b1+m1h1h1b1+2h11+m12v1=1n1R12/3i11/2Q=b1+m1hh1•v1(2)
Calculate the water depth of the second section of the waterhAfter calculatingQ, calculate h, because h=fQ,n3,i3,b3, so the function relationship is
(13)Q=1n3i31/2b3+m3hhb3+m3hhb3+2h1+m322/3.By computer trial, you can solveh.
(3)
Calculate the flow ratev(14)v=Qb3+m3hh(4)
Calculate BOD concentration and oxygen deficiency in the water body of the sectionTo calculate the BOD concentrationBx and the deficient oxygen Dx in the third paragraph, first, the first paragraph of the open channel end BOD concentration B2, the oxygen deficiency D2 and the second section of the water end section BOD concentration B3, the oxygen deficiency D3.
(15)B2=B1e−K1x/v1,D2=K1B1K2−K1e−K1x/v1−e−K2x/v1+D1e−K2x/v1.To calculate the BOD concentrationB3 and the deficient oxygen amount D3 of the second section of the water body, it is necessary to know the flow rate v2 of the second section of the water body. First, calculate the water depth h2 of the second section of water and solve h2 according to formula Q=1/n2i21/2b2hb2h/b2+2h2/3. Calculate v2 according tov2=Q/b2+m2h2h.
(16)B3=B2e−K1x2/v2,D3=K1B2K2−K1e−K1x2/v2−e−K2x2/v2+D1e−K2x2/v2.Then,Bx and Dx are
(17)Bx=B3e−K1x−x1−x2/v,Dx=K1B3K2−K1e−K1x−x1−x2/v−e−K2x−x1−x2/v+D1e−K2x−x1−x2/v.(5)
Analysis of water environment quality assessmentIfBx>10, the water body is inferior V water; if 6<Bx<10, the water body is type V water; if 4<Bx<6, the water body is type IV water; if 3<Bx<4, the water body is type III water. If Bx<3, the water body is type II water.


## 3.3. The Overall Design of the Visual Simulation System

The main function of the visual simulation system is to combine the geographic information analysis function of GIS and the three-dimensional display function of Vega [20] to express the river water environment information in various forms. Its main modules include GIS platform, 3D visual module, water quality evaluation module, and data management module.The basis for visualizing the water quality is to obtain corresponding water quality data, including monitoring data and simulation data. The data management module can easily add, delete, modify, and import various geographic, hydrological, and water quality data to provide basic data for water quality assessment; the water quality assessment module provides the final data to be displayed for visualization; GIS platform achieves water quality 2D display, while the Vega module provides a 3D display of geographic information. The functional modules of the system are shown in Figure1.Figure 1
Functional block diagram of water environment visualization simulation system.


## 4. Interactive 3D Visualization Simulation System

### 4.1. Software Development Tools

The development of river visualization systems involves data management, GIS rendering, and 3D visual development. In order to develop the visualization system, the development tools needed include GIS platform, 3D modeling tools, visual simulation tools, software development tools, and database development tools.(1)
GIS platform toolsTopMap ActiveX6 is a full-component GIS development platform, including TopMap ActiveX 6 main control, bird’s eye view control for full-image browsing and positioning, attribute list editing control, map layer list, and management controls, suitable for stand-alone and local area network customers. Users can easily insert TopMap ActiveX6 in object-oriented visual programming languages (such as VB, C#, Delphi, VC, C++ Builder, and FoxPro) to easily implement GIS functions, including GIS exchange format data import and export: exquisite map representation, rich annotation settings, projection settings and conversion, vector editing, vector calibration, attribute data manipulation, multimedia support, feature analysis, spatial analysis, topology analysis, network analysis, interpolation analysis, large format vector printing, and automatic page printing, image output, etc.(2)
3D modeling toolsCreator is a popular real-time 3D view database modeling and optimization tool that can be used to generate, edit, and view visual databases in battlefield environments, entertainment, urban simulation, and other computing visualizations. Its basic function is to provide users with a powerful and interactive visual modeling environment, due to its high fidelity, optimally optimized real-time 3D modeling capabilities and texture mapping, terrain surface generation, and its improved model. The advanced technical means of system real-time, etc., make it widely used in the field of virtual reality.(3)
Visual simulation toolVega is an advanced software environment used by MultiGen-Paradigm for real-time visual simulation, sound simulation, and virtual reality. It combines easy-to-use tools with advanced simulation capabilities, allowing users to create, edit, and run complex simulation applications quickly and easily. Vega greatly reduces the source code writing, making software maintenance and real-time performance optimization easier, greatly improving development efficiency. Vega includes a complete C language application interface that provides developers with maximum software control and flexibility. Vega includes a friendly graphical environment interface, a complete C language API, a rich set of useful utility libraries, and a selection of optional modules. Vega mainly consists of two parts, one is the LynX graphical user interface; the other is the C language based Vega function library. The main function of LynX is to create a 3D scene model through visual operations and store it in a pdf file, and then the application can render the built 3D scene by Vega’s C language library.(4)
Software development toolsThe Visual C++6.0 development environment provides users with a good visual programming environment that allows programmers to easily access the C++ source code editor, resource editor, and internal debugger,and create project file. Visual C++ not only includes the compiler, but it also includes many useful components. Through the collaborative work of these components, you can easily create source files and edit resources in the Visual C++6.0 integrated environment and the compilation, connection, and debugging of the program.(5)
Database development toolsSQL Server 2000 is a high-performance relational database management system that covers almost all database operations, including database creation, maintenance, operations, warnings, data replication, and transformation, and has good database design, management, and network functions. Because of its good performance, reliability, and ease of use, it has become the best database platform for OLTP (online transaction process), data warehousing, and e-commerce applications.


### 4.2. System Settings

The system can be run on a regular PC workstation due to the adoption of some technologies and improved hardware performance. Secondly, the scale of the whole scene is large, and there are many texture maps, and most of them are real photos with large amount of data. In addition, the main work of the whole system is to perform visual simulation, and other activities, audio simulation, and other aspects are not needed. Combining these features and requirements, the system’s Vega vision simulation module is adopted.The following application settings are available.(1)
The system settingsThe system’s multithreading control property is set to single thread because most workstations have one CPU configuration. The error reporting level is set to the Notice level. The exit hotkey for the entire program is set to the ESC key. The default processing of the texture map is to preload all the texture files. Since the texture file is larger in this application, this default setting is changed. The more important graphic rendering frame number setting is set to an upper limit of 30 Hz, which is a maximum of 30 frames per second. This number may not be reached on machines with poor hardware configuration, but this may be exceeded on advanced machines if set to Free mode.(2)
The graphic state settingsThe different settings of the graphic state have a great impact on the running performance, such as removing the texture map and lighting effects, and the rendering speed will be greatly improved. In actual operation, in order to achieve the virtual reality effect as much as possible, texture, lighting, depth buffer and transparency are set when debugging the program. The fog effect, Backfaces display, and frame effect (wireframe) are set to “off.”(3)
The window settingsThe window size is set to 1024 wide and 768 high, in pixels, which is full-screen operation at normal screen resolution. Because it is full screen, there is no title and the border is set to none. For mouse operation, the state of the cursor (cursor) is set to “display” and the coordinates of the mouse are also converted to relative to the window. In addition, stereo and antialias settings are set to “Off” for performance reasons and can be turned on to enhance simulation if the hardware level permits.(4)
The settings of the graphic channelThere is only one graphic channel, and it fills the entire window. Multichannel has little meaning in the application of this system, and it consumes computer performance. The projection method of the channel adopts the usual symmetric frustum mode, and the near and far points of the cut surface of the field of view are set on 1 and 1000 database units, respectively.(5)
The settings of the observerThere is only one observer, and of course it is in a state that requires on with graphics. Other scenes and environment properties are unique. Since the system does not have players, the observer is directly connected to the graphic channel and does not have to be attached to a player. The positioning method is set to determine the coordinates according to its own motion mode. There are multiple motion modes in the system, and the motion mode used by the observer as the positioning method can be dynamically switched at any time.(6)
The environment settingsThe environment system is set to open, and the atomization effect has been said to have been canceled for performance reasons. The color of the sky uses the default blue. The brightness of the entire environment is set to the maximum, which is equivalent to the noon effect, so that not only the graphic details of the model can be perfectly represented, but also the illumination is not calculated.(7)
The setting of the light sourceThe light source is set to “on,” and its type is set to sunlight in infinite, local, spot, Sun, and Moon. There are two ways to set the position of the light source, one is set according toXYZ coordinates, and the other is set according to the deflection angle. The latter used in this system has an azimuth angle of 90 degrees and an elevation of 90 degrees, which are consistent with the setting of the noon time in the environment.Most of these settings are directly set by the visualization tool LynX, and some properties of graphic state and observer are set by the program, which are easy to modify in the program. The main interface set by LynX is shown below the Figure2.Figure 2
The main interface set by LynX.The main function of this system is to allow users to visually see the simulation results in a virtual digital watershed environment. The visual simulation result seen by the user on the screen is the output of Vega to the currently active graphic channel, which is associated with the observer. In fact, it may be considered that the observer is equivalent to a camera, and the image taken in the “camera” lens is displayed in front of the user. In order to achieve different roaming modes, this “camera” must be viewed in the entire scene in different motions. This requires the use of important objects in Vega: the motion model.The motion models provided by the Vega system come in four forms: simple, complex, direct, and user defined. The simple motion model provides a quick overview of the database, including spin, drive, UFO, warp, trackball, fly, and walk.There are two types of complex motion models, mainly used in military simulations of high-speed flight. They are flight simulator and missile motion models.The direct motion model can in turn be an input device direct, which provides a data interface for various input device types that are directly supported by Vega.Because objects such as observers, geometry, and athletes can be located using the vgPos method, it is more appropriate to consider the motion model as a convenient means of calculating position. It is not a necessity. In fact, using the vgPosVec function to create an initialized position vector and then positioning it with the vgPos function completely removes the need for motion models. Of course, the parameters required by the vgPosVec function XYZHPR six values must be obtained from somewhere, ideally even with more detailed mathematically based software running on another computer.Unless the new position is generated at the same frequency as the frame rate, the out-of-synchronization of the position update may cause the “jitter” or the nonsmooth motion of the object in the scene. For this phenomenon, the well-known sampling theorem suggests generating a new position at twice the frame frequency. These time-intervened position data can be interpolated or extrapolated as needed. The interpolation of the position is called data smoothing. Similar to the antialiasing of edge pixels used in 3D graphic rendering, the data can be smoothed as antialiasing for position coordinates. The overall flow of the Vega simulation module of the 3D visual simulation module system is shown in Figure3.Figure 3
Simulation module overall process.


### 4.3. Implementation of the Simulation System

First, the previously built model and various terrain data are integrated. The integration diagram is shown in Figure4.Figure 4
System integration framework.The VR technology is applied to the digital watershed 3D visualization simulation system to build a unified digital simulation platform. The system uses Vega and Visual C++ as its software platform. Firstly, MultiGen-Creator is used to complete the building model in the scene. In Vega, the rapid establishment of 3D simulation environment and the automatic management of large terrain scenes are realized. Visual C++ is used to realize the optimization of some API functions and the scheduling of interactive simulation process. Vega is a well-known object-oriented virtual reality platform developed by MultiGen-Paradigm, which can easily complete the construction of the scene. LynX is a collection of tools provided by Vega with a graphical user interface.The system’s 3D visualization simulation system mainly collects the information in the simulation modeling process and visually expresses the dynamic information in the simulation calculation process. At the same time, in the visual simulation process, the user can synchronously maintain the interactive control of the simulation process through the intuitive result of the operation interface simulation feedback provided by the system until the simulation object obtains the desired result.Figure5 shows the framework of an interactive visual simulation system based on virtual reality. It describes the data processing flow and interaction process in the visual simulation system. The interaction process of virtual reality in the system is as follows: firstly, the user collects the simulation entity according to the requirements and obtains the coordinate information by means of the peripheral device; according to the coordinate information, the local scene coordinate is given according to the corresponding coordinate conversion algorithm in the scene database; according to the local scene, the coordinates search for the attribute information of the corresponding point in the corresponding attribute database and feedback to the simulation entity model; the simulation entity model calculates the corresponding parameters according to the obtained attribute information and then takes corresponding attribute actions; according to the flow chart 4, the water body and the three-dimensional terrain are generated. The simulation system of the scene is transmitted to the observer through various peripheral devices, so that the observer has an immersive feeling.Figure 5
Framework structure of interactive visual simulation system based on virtual reality technology.


## 4.1. Software Development Tools

The development of river visualization systems involves data management, GIS rendering, and 3D visual development. In order to develop the visualization system, the development tools needed include GIS platform, 3D modeling tools, visual simulation tools, software development tools, and database development tools.(1)
GIS platform toolsTopMap ActiveX6 is a full-component GIS development platform, including TopMap ActiveX 6 main control, bird’s eye view control for full-image browsing and positioning, attribute list editing control, map layer list, and management controls, suitable for stand-alone and local area network customers. Users can easily insert TopMap ActiveX6 in object-oriented visual programming languages (such as VB, C#, Delphi, VC, C++ Builder, and FoxPro) to easily implement GIS functions, including GIS exchange format data import and export: exquisite map representation, rich annotation settings, projection settings and conversion, vector editing, vector calibration, attribute data manipulation, multimedia support, feature analysis, spatial analysis, topology analysis, network analysis, interpolation analysis, large format vector printing, and automatic page printing, image output, etc.(2)
3D modeling toolsCreator is a popular real-time 3D view database modeling and optimization tool that can be used to generate, edit, and view visual databases in battlefield environments, entertainment, urban simulation, and other computing visualizations. Its basic function is to provide users with a powerful and interactive visual modeling environment, due to its high fidelity, optimally optimized real-time 3D modeling capabilities and texture mapping, terrain surface generation, and its improved model. The advanced technical means of system real-time, etc., make it widely used in the field of virtual reality.(3)
Visual simulation toolVega is an advanced software environment used by MultiGen-Paradigm for real-time visual simulation, sound simulation, and virtual reality. It combines easy-to-use tools with advanced simulation capabilities, allowing users to create, edit, and run complex simulation applications quickly and easily. Vega greatly reduces the source code writing, making software maintenance and real-time performance optimization easier, greatly improving development efficiency. Vega includes a complete C language application interface that provides developers with maximum software control and flexibility. Vega includes a friendly graphical environment interface, a complete C language API, a rich set of useful utility libraries, and a selection of optional modules. Vega mainly consists of two parts, one is the LynX graphical user interface; the other is the C language based Vega function library. The main function of LynX is to create a 3D scene model through visual operations and store it in a pdf file, and then the application can render the built 3D scene by Vega’s C language library.(4)
Software development toolsThe Visual C++6.0 development environment provides users with a good visual programming environment that allows programmers to easily access the C++ source code editor, resource editor, and internal debugger,and create project file. Visual C++ not only includes the compiler, but it also includes many useful components. Through the collaborative work of these components, you can easily create source files and edit resources in the Visual C++6.0 integrated environment and the compilation, connection, and debugging of the program.(5)
Database development toolsSQL Server 2000 is a high-performance relational database management system that covers almost all database operations, including database creation, maintenance, operations, warnings, data replication, and transformation, and has good database design, management, and network functions. Because of its good performance, reliability, and ease of use, it has become the best database platform for OLTP (online transaction process), data warehousing, and e-commerce applications.


## 4.2. System Settings

The system can be run on a regular PC workstation due to the adoption of some technologies and improved hardware performance. Secondly, the scale of the whole scene is large, and there are many texture maps, and most of them are real photos with large amount of data. In addition, the main work of the whole system is to perform visual simulation, and other activities, audio simulation, and other aspects are not needed. Combining these features and requirements, the system’s Vega vision simulation module is adopted.The following application settings are available.(1)
The system settingsThe system’s multithreading control property is set to single thread because most workstations have one CPU configuration. The error reporting level is set to the Notice level. The exit hotkey for the entire program is set to the ESC key. The default processing of the texture map is to preload all the texture files. Since the texture file is larger in this application, this default setting is changed. The more important graphic rendering frame number setting is set to an upper limit of 30 Hz, which is a maximum of 30 frames per second. This number may not be reached on machines with poor hardware configuration, but this may be exceeded on advanced machines if set to Free mode.(2)
The graphic state settingsThe different settings of the graphic state have a great impact on the running performance, such as removing the texture map and lighting effects, and the rendering speed will be greatly improved. In actual operation, in order to achieve the virtual reality effect as much as possible, texture, lighting, depth buffer and transparency are set when debugging the program. The fog effect, Backfaces display, and frame effect (wireframe) are set to “off.”(3)
The window settingsThe window size is set to 1024 wide and 768 high, in pixels, which is full-screen operation at normal screen resolution. Because it is full screen, there is no title and the border is set to none. For mouse operation, the state of the cursor (cursor) is set to “display” and the coordinates of the mouse are also converted to relative to the window. In addition, stereo and antialias settings are set to “Off” for performance reasons and can be turned on to enhance simulation if the hardware level permits.(4)
The settings of the graphic channelThere is only one graphic channel, and it fills the entire window. Multichannel has little meaning in the application of this system, and it consumes computer performance. The projection method of the channel adopts the usual symmetric frustum mode, and the near and far points of the cut surface of the field of view are set on 1 and 1000 database units, respectively.(5)
The settings of the observerThere is only one observer, and of course it is in a state that requires on with graphics. Other scenes and environment properties are unique. Since the system does not have players, the observer is directly connected to the graphic channel and does not have to be attached to a player. The positioning method is set to determine the coordinates according to its own motion mode. There are multiple motion modes in the system, and the motion mode used by the observer as the positioning method can be dynamically switched at any time.(6)
The environment settingsThe environment system is set to open, and the atomization effect has been said to have been canceled for performance reasons. The color of the sky uses the default blue. The brightness of the entire environment is set to the maximum, which is equivalent to the noon effect, so that not only the graphic details of the model can be perfectly represented, but also the illumination is not calculated.(7)
The setting of the light sourceThe light source is set to “on,” and its type is set to sunlight in infinite, local, spot, Sun, and Moon. There are two ways to set the position of the light source, one is set according toXYZ coordinates, and the other is set according to the deflection angle. The latter used in this system has an azimuth angle of 90 degrees and an elevation of 90 degrees, which are consistent with the setting of the noon time in the environment.Most of these settings are directly set by the visualization tool LynX, and some properties of graphic state and observer are set by the program, which are easy to modify in the program. The main interface set by LynX is shown below the Figure2.Figure 2
The main interface set by LynX.The main function of this system is to allow users to visually see the simulation results in a virtual digital watershed environment. The visual simulation result seen by the user on the screen is the output of Vega to the currently active graphic channel, which is associated with the observer. In fact, it may be considered that the observer is equivalent to a camera, and the image taken in the “camera” lens is displayed in front of the user. In order to achieve different roaming modes, this “camera” must be viewed in the entire scene in different motions. This requires the use of important objects in Vega: the motion model.The motion models provided by the Vega system come in four forms: simple, complex, direct, and user defined. The simple motion model provides a quick overview of the database, including spin, drive, UFO, warp, trackball, fly, and walk.There are two types of complex motion models, mainly used in military simulations of high-speed flight. They are flight simulator and missile motion models.The direct motion model can in turn be an input device direct, which provides a data interface for various input device types that are directly supported by Vega.Because objects such as observers, geometry, and athletes can be located using the vgPos method, it is more appropriate to consider the motion model as a convenient means of calculating position. It is not a necessity. In fact, using the vgPosVec function to create an initialized position vector and then positioning it with the vgPos function completely removes the need for motion models. Of course, the parameters required by the vgPosVec function XYZHPR six values must be obtained from somewhere, ideally even with more detailed mathematically based software running on another computer.Unless the new position is generated at the same frequency as the frame rate, the out-of-synchronization of the position update may cause the “jitter” or the nonsmooth motion of the object in the scene. For this phenomenon, the well-known sampling theorem suggests generating a new position at twice the frame frequency. These time-intervened position data can be interpolated or extrapolated as needed. The interpolation of the position is called data smoothing. Similar to the antialiasing of edge pixels used in 3D graphic rendering, the data can be smoothed as antialiasing for position coordinates. The overall flow of the Vega simulation module of the 3D visual simulation module system is shown in Figure3.Figure 3
Simulation module overall process.


## 4.3. Implementation of the Simulation System

First, the previously built model and various terrain data are integrated. The integration diagram is shown in Figure4.Figure 4
System integration framework.The VR technology is applied to the digital watershed 3D visualization simulation system to build a unified digital simulation platform. The system uses Vega and Visual C++ as its software platform. Firstly, MultiGen-Creator is used to complete the building model in the scene. In Vega, the rapid establishment of 3D simulation environment and the automatic management of large terrain scenes are realized. Visual C++ is used to realize the optimization of some API functions and the scheduling of interactive simulation process. Vega is a well-known object-oriented virtual reality platform developed by MultiGen-Paradigm, which can easily complete the construction of the scene. LynX is a collection of tools provided by Vega with a graphical user interface.The system’s 3D visualization simulation system mainly collects the information in the simulation modeling process and visually expresses the dynamic information in the simulation calculation process. At the same time, in the visual simulation process, the user can synchronously maintain the interactive control of the simulation process through the intuitive result of the operation interface simulation feedback provided by the system until the simulation object obtains the desired result.Figure5 shows the framework of an interactive visual simulation system based on virtual reality. It describes the data processing flow and interaction process in the visual simulation system. The interaction process of virtual reality in the system is as follows: firstly, the user collects the simulation entity according to the requirements and obtains the coordinate information by means of the peripheral device; according to the coordinate information, the local scene coordinate is given according to the corresponding coordinate conversion algorithm in the scene database; according to the local scene, the coordinates search for the attribute information of the corresponding point in the corresponding attribute database and feedback to the simulation entity model; the simulation entity model calculates the corresponding parameters according to the obtained attribute information and then takes corresponding attribute actions; according to the flow chart 4, the water body and the three-dimensional terrain are generated. The simulation system of the scene is transmitted to the observer through various peripheral devices, so that the observer has an immersive feeling.Figure 5
Framework structure of interactive visual simulation system based on virtual reality technology.


## 5. Conclusion

The simulation of natural scenery and natural phenomena is an important research content of computer graphics, and it is also a challenging research direction. In recent years, with the rapid development of computer graphic technology and virtual reality, the three-dimensional visualization technology of river waters has been become an important topic in the research and development of digital watersheds, rapid mapping of large-scale terrain scenes, simulation of river fluid movement and hydrological phenomena, and remote visualization of complex scenes in the network environment. In this paper, the theory and application of the three-dimensional visualization of river water scenes are analyzed and discussed in-depth, and an interactive visual simulation system based on virtual reality technology is realized. Simulation simulations such as program demonstration and engineering operation management can be greatly accelerated. The processing speed of data enables the effective use of huge data to provide visual interaction means for numerical simulation and data analysis, improve the efficiency of numerical calculation, and realize human-computer interaction communication, so that people can observe the phenomena and laws that are difficult to observe by traditional methods, and the validity of the mathematical model can be analyzed for validity.



---

*Source: 8838617-2020-12-07.xml*