CN115495938A - Three-dimensional dynamic simulation and visualization method for sea surface waves - Google Patents
Three-dimensional dynamic simulation and visualization method for sea surface waves Download PDFInfo
- Publication number
- CN115495938A CN115495938A CN202211436973.0A CN202211436973A CN115495938A CN 115495938 A CN115495938 A CN 115495938A CN 202211436973 A CN202211436973 A CN 202211436973A CN 115495938 A CN115495938 A CN 115495938A
- Authority
- CN
- China
- Prior art keywords
- dimensional
- sea surface
- grid
- horizontal
- points
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
- G06F30/23—Design optimisation, verification or simulation using finite element methods [FEM] or finite difference methods [FDM]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
- G06T17/20—Finite element generation, e.g. wire-frame surface description, tesselation
- G06T17/205—Re-meshing
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A90/00—Technologies having an indirect contribution to adaptation to climate change
- Y02A90/10—Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation
Abstract
The invention provides a three-dimensional dynamic simulation and visualization method for sea surface waves, which comprises the following steps: s1: acquiring basic information of sea surface waves; s2: establishing a sea surface wave model, and simulating the elevation change of sea surface waves; s3: further simulating horizontal movement of sea surface waves on the basis of the step S2; s4: and rendering and outputting the simulation image at unit time intervals according to the requirement until the simulation is finished. By adopting the method, the technical problem that a scheme for dynamically simulating and visualizing the sea surface waves is lacked in the prior art can be solved, and the dynamic visualization of the sea surface waves and the water flow is realized.
Description
Technical Field
The invention relates to dynamic simulation of ocean surface deformation and wave motion, in particular to a three-dimensional dynamic simulation and visualization method for sea surface waves.
Background
With the rapid development of economy in China, the informatization degree of marine related industries is higher and higher, the visual demand of people on massive marine environment data is more and more urgent, and especially the simulation and reproduction technology of marine scenes is greatly concerned by practitioners. The realization of the high-reality ocean scene simulation and visualization has important significance for ocean-related industries, on one hand, people can conveniently know and understand the motion change mechanism of the ocean, and on the other hand, the realization method also provides a bottom foundation for ocean engineering construction industry, ocean fishery industry, ocean transportation industry and other industries relating to ocean simulation. Sea surface waves are important components of ocean scenes, and simulation and visualization technology of the sea surface waves have important significance for ocean related industries. For example, dynamic loads caused by sea waves and ocean currents have important influence on an ocean platform and a ship, the effects caused by waves with different heights, directions and periods are different, and in the dynamic response simulation and visualization process of the ship platform and the ship, some technologies are necessary to intuitively express the dynamic changes of sea waves under different working conditions, so that the coupling analysis and display of a target main body and an ocean environment are realized.
The existing sea surface dynamic visualization technology is realized in a mode of multi-base mapping replacement, and dynamic changes of the sea surface in the spatial position caused by waves are less considered, so that the problems that the position of a water surface submerged target object changes along with time and the like are difficult to deal with in practical application.
Disclosure of Invention
The invention provides a three-dimensional dynamic simulation and visualization method of sea surface waves, aiming at solving the technical problem that dynamic changes of the sea surface on the spatial position caused by waves are not considered in the prior art.
In order to achieve the purpose, the invention adopts the following technical scheme:
a three-dimensional dynamic simulation and visualization method for sea surface waves comprises the following steps:
s1: acquiring basic information of sea surface waves;
s2: establishing a sea surface wave model, and simulating the elevation change of sea surface waves;
s3: further simulating horizontal movement of sea surface waves on the basis of the step S2;
s4: and rendering and outputting the simulation image at unit intervals according to the requirement until the simulation is finished.
Further, the basic information in step S1 includes:
elevation function of sea surface wavesWhere z is a given horizontal coordinate at time tVertical coordinate of sea surface。
Further, step S2 specifically includes the following steps:
s2-1: acquiring a horizontal grid for representing a closed two-dimensional plane, wherein the horizontal grid comprises a series of two-dimensional points and a connection combination relation between the points, and is specifically represented by a plurality of triangles formed by vertexes and connecting lines thereof;
s2-2: and calculating the ordinate of the two-dimensional point according to the elevation function to change the ordinate into a three-dimensional point, so that the horizontal grid is changed into a three-dimensional grid to obtain a three-dimensional sea surface.
Further, step S2 further includes the following steps:
s2-3: and optimizing the three-dimensional sea surface in the step S2-2 to display the smooth grids.
Further, step S2-3 is specifically,
when the elevation function is a continuous elevation function, assigning a point normal vector on the curved surface corresponding to the three-dimensional point, namely:
the vector is unitized to obtain a normal vector of a single point
Wherein the content of the first and second substances,are two-dimensional point coordinates on a horizontal grid,for the given moment in time, the system is,andpartial derivatives of the elevation function in two horizontal directions;
when the elevation function has only discrete points or partial derivatives that are difficult to solve, for a given three-dimensional mesh vertexAnd calculating the surface normal directions of all connected triangles, carrying out weighted average on the unit normal vectors according to the area of the triangles, and taking the obtained unit normal vectors as the point normal direction of the vertex.
Further, the step S2-2 specifically includes the following steps:
s2-2-1: according to two-dimensional point coordinates on a horizontal gridAt a given momentThen, the corresponding elevation is calculated by the elevation functionTo obtain new three-dimensional points;
S2-2-2: and connecting and combining the three-dimensional points according to the connection combination relationship between the points in the two-dimensional grid to form a new three-dimensional grid.
Further, in step S2-2, the step of obtaining the three-dimensional surface from the three-dimensional points is to connect and combine the three-dimensional points according to the connection and combination relationship between the points in the two-dimensional grid to form a new three-dimensional grid.
Further, step S3 specifically includes the following steps:
s3-1: acquiring a real sea surface picture as a mapping;
s3-2: adding a map coordinate to each vertex of the three-dimensional meshThus, covering the preset picture on the sea surface wave model;
s3-3: and continuously updating the mapping coordinates of the vertex based on the moving direction and the moving speed of the wave current.
Further, the method for overlaying the preset picture on the model in the step S3-2 specifically includes the following steps:
s3-2-1: taking the plane coordinates of each vertex as the original map coordinatesObtaining the corresponding mapping coordinates through conversionThe conversion process is defined asThe transformation is used to bring the transformed map coordinates of all vertices within the map region.
Further, in step S3-2-1, the range of the map coordinate on the X axis and the Y axis isIn particular, for each vertex, the transformation is carried outAxial direction ofOriginal mapping coordinates in axial directionIs rounded down to obtainSatisfy the following requirementsThe decimal partIf, ifAn even number, thenAs final chartlet coordinates, otherwise willAs final map coordinates.
Further, step S3-3 specifically includes the following steps:
s3-3-1: determining coordinate ranges in two directions of a horizontal two-dimensional grid from a simulation regionAndand appointing a mapping range corresponding to the grid at the initial momentAndthe scaling factor between the coordinate ranges is determined as follows:
the purpose of setting the proportionality coefficient is to convert the actual movement speed of the seawater into the change speed of the mapping coordinates, so that the simulation effect is closer to reality.
S3-3-2: recording the horizontal flow velocity of the sea surface asThe velocity components in the two axial directions are respectivelyAndtwo-dimensional grid pointsIn thatThe map coordinates at time are as follows:
wherein the content of the first and second substances,、the abscissa and ordinate of the patch coordinate at time t.
The invention has the following beneficial effects:
the method realizes the motion simulation and display of the sea surface waves by combining the method of simulating the deformation of the sea surface wave model by adopting the elevation function and considering the horizontal movement of the waves, and can simultaneously consider the motions of the waves in the vertical direction and the horizontal direction, thereby simulating the dynamic change of the sea surface in the spatial position caused by the waves, and being difficult to solve the problems of the change of the position of a target object submerged in the water surface along with time and the like in practical application.
In some embodiments, the present invention employs smoothing based on a horizontal grid and a weighted average point normal vector, making the simulated waves more natural.
In some embodiments, the horizontal grid and the elevation function adopted in the invention can be suitable for waves of various types such as regular waves, random waves, measured waves and the like, support multi-wave superposition, have higher expandability than the technology of only using sine waves or unidirectional waves, and the adopted method for calculating the direction of the point method by the area weighted average is also more efficient.
Drawings
FIG. 1 is a schematic diagram of elevation changes and horizontal movement in a sea surface wave simulation method according to an embodiment of the present invention;
FIG. 2a is a schematic diagram of a sample manner of simple horizontal grid partitioning according to an embodiment of the present invention;
FIG. 2b is a schematic diagram illustrating a sample division manner of any complex shape of a horizontal grid in the embodiment of the present invention;
FIG. 3a is a schematic view of a normal vector in an embodiment of the present invention;
FIG. 3b is a schematic diagram of a normal vector of a point in an embodiment of the invention;
FIG. 4 is a schematic diagram of direction calculation by discrete point method in the embodiment of the present invention;
FIG. 5a is a diagram illustrating a three-dimensional mesh tiling phenomenon according to an embodiment of the present invention;
FIG. 5b is an exemplary diagram of a three-dimensional mesh smooth surface in an embodiment of the present invention;
FIG. 6 is a diagram illustrating a repetition of mapping coordinates and mirroring in accordance with an embodiment of the present invention;
FIG. 7 is a schematic flow chart of a method in an embodiment of the present invention;
FIG. 8 is a schematic diagram of an example of a three-dimensional visualization of a floating wind turbine in the ocean in an embodiment of the present invention; FIG. 9 is a schematic diagram of the module components of the dynamic simulation device for three-dimensional sea waves in the embodiment of the invention;
FIG. 10a is a diagram of default map resources employed by an apparatus in an embodiment of the present invention;
FIG. 10b is a schematic diagram of a simulated top view of an apparatus according to an embodiment of the present invention;
FIG. 10c is a schematic diagram of a simulated side view of an apparatus according to an embodiment of the present invention;
11 a-11 f are diagrams of the simulation effect of sea waves at different times in the embodiment of the invention;
in the figure, 1-the initial sea surface, 2-the deformed sea surface.
Detailed Description
The embodiments of the present invention will be described in detail below. It should be emphasized that the following description is merely exemplary in nature and is not intended to limit the scope of the invention or its application.
In the ocean, waves are mainly represented by the deformation of the surface, so that the visual simulation of the wave motion is realized by analyzing and simulating the shape and position change of the sea surface. Specifically, as shown in FIG. 1, the present invention divides the wave motion into two separate sub-processes, elevation change and horizontal movement, as shown in FIG. 1. The elevation change refers to the vertical coordinate change of a corresponding point on the sea surface under a given horizontal coordinate; the horizontal movement refers to the horizontal component of the displacement of the specific water particles on the sea surface, and the initial sea surface 1 becomes the deformed sea surface 2 after the above change. The calculation and simulation principles of these two sub-processes are described separately below.
Elevation change
At a given moment, the sea surface wave can be regarded as a three-dimensional curved surface, and is expressed in the form of a curved surface equationConsider the coordinate at a given levelVertical coordinate of sea surfaceIs also unique and can be further written asIn the form of (1). When time changes, the sea surface vertical coordinate of a given horizontal coordinate also changes, so that a time variable needs to be introduced againThe final elevation function is written as。
The problem to be solved is how to determine the elevation functionAnd drawing a three-dimensional sea surface. The invention adopts a drawing method of a fixed horizontal coordinate grid, and the idea is to determine a horizontal grid in advance, wherein the grid comprises a series of two-dimensional points and a connection combination relationship between the points and is used for representing a closed two-dimensional plane, as shown in fig. 2a and fig. 2 b. From two-dimensional point coordinates on a horizontal gridAt a given momentThen, the corresponding elevation can be calculated by the elevation functionTo obtain new three-dimensional points。
According to the connection combination relationship between the points in the two-dimensional grid, the three-dimensional points can be connected and combined to form a new three-dimensional grid. E.g. in a two-dimensional grid、、Three points form a plane triangle, and corresponding three-dimensional points are calculated according to the elevation function、、Then, thenI.e. a spatial triangle in the three-dimensional mesh. And drawing all the space triangles by applying all the connection combination relations in the two-dimensional grid to obtain the three-dimensional sea surface corresponding to the elevation function.
It should be noted that, for a planar mesh, a smooth plane can be obtained by directly drawing all triangles; however, for the spatial mesh, because two adjacent triangles may not be on one plane (the directions of the plane methods are different), an obvious edge broken line may appear at the joint of the triangles, and a smooth spatial curved surface cannot be formed, which may greatly affect the display effect of sea surface waves.
On the basis of the three-dimensional grid, the invention further adopts a point method direction mode to realize the display of the smooth grid. Determining a plane according to the three vertexes, and then taking the normal direction of the plane as the normal direction of the triangle; the normal direction is set at each vertex, so that a display effect similar to a curved triangle is achieved, as shown in fig. 3a and 3 b. When the common vertexes of the adjacent triangles have the same vertex normal direction, a smooth connection effect is exhibited without creases at the edges.
The next question is how to determine the direction of the point method for each vertex on the three-dimensional mesh. The three-dimensional normal direction can be a unit normal vectorIs expressed in such a way that the modulo length of the vector is 1 (i.e., the length of the modulus is 1)). For a given continuous elevation functionSince the function determines a curved surface, only the normal direction of the vertex on the curved surface needs to be calculated and assigned to the corresponding point. Two-dimensional grid points can be foundIn thatA point normal vector of the three-dimensional point corresponding to the moment is
Unitizing the vector to obtain a normal vector of a single point
The above method for solving the direction of the point method requires to give the partial derivatives of the elevation function in two horizontal directionsAndand the method is not suitable for the situation that the elevation function only has discrete points or partial derivatives which are difficult to solve. Aiming at the condition of discrete points, the invention adopts a point method direction calculation method based on a surface method direction. The basic idea of the method is as follows: for a given three-dimensional mesh vertexAnd calculating the surface normal directions of all connected triangles, carrying out weighted average on the unit normal vectors according to the area of the triangles, and taking the obtained unit normal vectors as the point normal directions of the vertexes. For example, for the common case where the fixed horizontal two-dimensional grid is a square grid, as shown in FIG. 4, the following formula can be calculatedDot method direction at the dots:
the effect of using the point method before and after is shown in fig. 5a and fig. 5b, it can be seen that there is a significant flaking phenomenon (as in fig. 5 a) in the direction without using the point method, and it appears as a smooth curved surface (as in fig. 5 b) after using the above method.
Moving horizontally
The shape change of sea surface waves can be simulated by the elevation change, but the water particles on the sea surface also move in the horizontal direction, for example, floating objects on the sea surface not only float up and down, but also move along the sea surface, and the horizontal movement cannot be demonstrated by the deformation of the curved surface. In consideration of the problem, the invention further realizes the horizontal movement of sea surface waves through color change, and the basic idea is as follows: a real sea surface picture is preset as a map, a map coordinate is added to each vertex of a three-dimensional grid, the preset picture is covered on a model, and then the map coordinate of the vertex is continuously modified based on the movement direction and the movement speed of wave water flow, so that the color on the vertex is changed, and the horizontal movement effect of sea waves is finally shown.
The binding of the map and the three-dimensional grid is realized through map coordinates at the vertexes, the map coordinates are m (x, y) and represent the coordinates of the corresponding points of the points in the map, the areas drawn by the three vertexes of the same triangle in the map are the map of the triangle, and the map coordinates are on the transverse axis of the mapTo and from the longitudinal axisThe range of the direction is usuallyFrom the lower left cornerTo the upper right cornerAs shown in fig. 6. For the value exceeding the range, the value can be converted into the value range through some preset methods, and different display effects such as edge stretching, repetition, mirror image repetition and the like are realized. In order to avoid the phenomenon of obvious image mutation on the sea surface, the invention adopts a mirror image repetition mode to realize the mapping of sea surface waves, and the specific method comprises the following steps: to pairTo andto original chartlet coordinatesIs rounded down to obtainTo satisfyThe decimal partIf at allAn even number, thenAs final chartlet coordinates, otherwiseAs final map coordinates. After processing according to the method, the obtained final mapping coordinates areIn between, the process is noted asThe mirror repeat effect is achieved as in fig. 6.
Consider further the movement of the map over time.
Because the three-dimensional grid is obtained by fixing the horizontal two-dimensional grid, the original chartlet coordinate corresponding to each three-dimensional vertex can be directly determined by the two-dimensional coordinate of the original chartlet coordinate, namely, the original chartlet coordinate is generated on the basis of the two-dimensional grid. Firstly, respectively calculating the coordinate ranges of a horizontal two-dimensional grid along two directionsAndand specifying an initial timeMapping range corresponding to gridAnd withDetermining the proportionality coefficient between the coordinate ranges as follows
Recording the horizontal flow velocity of the sea surface asThe velocity components in the two axial directions being respectivelyAndthen the time passedThen the movement distances of the water particles along two directions are respectivelyAndmultiplying the two by the above proportional coefficient to obtain the map coordinateAnd (4) reducing the amount. For example, when the water surface is facingWhen moving in the positive direction, the chartlet will also faceMoving in positive direction, and pasting on grid vertexThe coordinates will decrease. From which two-dimensional grid points can be calculatedIn thatThe mapping coordinates of the time are as follows
Method step
The core innovative principle of the method lies in the realization principle of the elevation change and the horizontal movement, and comprises the steps of utilizing the proposed point normal vector weighted average method based on the horizontal grid to realize the efficient visualization of the smooth sea wave surface, and utilizing the proposed mapping coordinate transformation rule to realize the water flow translation effect.
Referring to fig. 7, the process and key parameters of the method are as follows:
(1) Determining basic information of sea surface waves
The basic information of sea surface waves includes:
height of sea surface waveFunction of degreeThe structure can be constructed by means of actual measurement data interpolation, given regular waves or random wave generation;
(2) Determining horizontal meshing and time step
And generating a proper horizontal grid according to the simulation precision requirement of the sea surface waves, wherein the proper horizontal grid comprises grid vertexes and connection combination relations between points. In general, a simple mesh division method as shown in fig. 2a may be adopted, i.e. a region is divided into a series of small rectangles according to a given side length or mesh number, and each small rectangle is divided into two triangles along a diagonal. Using a listAll two-dimensional grid point information is recorded, for example, for the grid division shown in fig. 2a, it can be notedThere are 25 vertices; using a listAll the connection combination relations are recorded, andeach element of (a) is composed of 3 different integersComposition of, representsThe 3 vertexes of the corresponding positions in the middle can be connected into a triangle, for the above exampleThere are 32 elements in total. By passingAndtwo lists, also can record the grid division mode of arbitrary complex shape like fig. 2 b.
Step of time for simulationThe simulation time step can be determined according to the frame rate required for simulating the animation, for example, to make the frame rate 25FPS。
(3) Initializing three-dimensional surface model of sea surface waves
Time measurementFrom elevation functionActing on two-dimensional vertex listsEach element of (1), map generationNew three-dimensional vertex list,Andhaving the same number of elementsAndwherein the elements at the same position are respectivelyAndsatisfy the following requirements
ComputingGenerating a unit normal vector list according to the dot normal direction of each three-dimensional vertex,Andhave the same number of elements. The point method direction is generated according to the method: if the partial derivatives of the elevation function in two horizontal directions are knownAndthen get the normal vector of point as
Otherwise, for the vertex of the given three-dimensional mesh, calculating the surface normal directions of all connected triangles, carrying out weighted average on normal vectors according to the area of the triangles, and then taking the obtained normal direction as the point normal direction of the vertex. For the case where the fixed horizontal two-dimensional grid is a square, the target three-dimensional vertices are noted asThe adjacent vertexes of the left side, the right side, the upper side and the lower side are respectively、、、Then, the direction of the dot method can be simplified according to the following formula:
calculating a scaling factor between coordinate ranges
Calculating the mapping coordinates of each two-dimensional vertex at the initial moment to generate a mapping point list,And withHaving the same number of elementsAndwherein the elements at the same position are respectivelyAnd(use a listRecord all two-dimensional grid point information) satisfying
Listing three-dimensional mesh verticesPoint normal vector listList of sticking pointsList of vertex connection relationshipsAnd transmitting the mapping resources into a three-dimensional rendering engine, setting relevant parameters such as transparency of the three-dimensional curved surface model, and carrying out first loading and rendering.
(4) Iterative computation and update of three-dimensional surface model
Recording the current actual time as the time zero point, and setting the timetableCyclically executing the following steps untilThe simulation end time is reached.
UpdatingAll ofThe calculation method of the normal vector of the point is the same as that of the list in the step (3)Initializing (1);
Waiting for actual time to arriveWill be present、、And transmitting and updating the image into a three-dimensional rendering engine, erasing the original image and re-rendering the image.
(5) End of simulation
One embodiment is described below in conjunction with the present method.
In a display scene of a certain floating wind turbine, digital dynamic simulation needs to be performed on sea waves of a local sea area where a wind turbine is located, so as to represent states of the wind turbine in different marine environments. According to the procedures and steps, determining the horizontal coordinate range of the area to be simulatedAndtaking the following 2 Stocks second-order waves with different directions, periods, wavelengths and wave heights for superposition:
Corresponding wave elevation function of
uniformly dividing the horizontal grid according to a square form, taking the side length of each square to be 5m, dividing the whole sea surface area into 100 multiplied by 100 squares, and constructing the grid division according to the mode given in the step (2)Andtwo lists. Taking the frame rate as 50FPS, the time step of the simulation is。
Carrying out initialization and iteration loop according to the steps (3) and (4), and at a given momentFirst, a three-dimensional mesh vertex list is computedThen, calculating according to simplified mode to obtain point normal vector list. The scale factor of the coordinate range is
Wherein, the first and the second end of the pipe are connected with each other,、the abscissa and ordinate of the patch coordinate at time t.
The three-dimensional dynamic visualization of the marine environment in which the wind turbine is located in this example can be realized as shown in fig. 8. In the application scene, the coupling motion effect of the fan and the wave motion can be realized by further combining the dynamic simulation technology of the floating fan under the wave load, such as fig. 8, so that the simulation and the simulation of the high-reality ocean scene are supported.
Realizing device
Based on the simulation method of sea surface wave deformation and motion, the three-dimensional sea wave dynamic simulation device which can be used for different directions, periods, wavelengths and wave heights is realized.
Module assembly
The implementation process can be divided into the following 4 modules: the system comprises a horizontal grid generating module, a three-dimensional vertex management module, a point method direction calculating module, a chartlet coordinate updating module and a result displaying module. The relationship among the modules is shown in fig. 9, and the functions are as follows:
(1) Horizontal grid generation module
Constructing a horizontal two-dimensional grid according to a given simulation area range, grid precision requirements and the like, and enabling the generated grid to pass through a two-dimensional vertex listList of connection relationships with verticesIs expressed in terms of the form.
(2) Three-dimensional vertex management module
Accepting the two-dimensional vertex list output by the horizontal mesh generation moduleAnd constructing corresponding sea surface elevation function according to parameters such as wave direction, period, wavelength and wave heightThrough the elevation function willMapping to three-dimensional vertex lists。
(3) Point method direction calculation module
Obtaining vertex lists from a three-dimensional vertex management moduleCalculating the dot-normal direction of each vertex according to the above method, and generating a dot-normal list。
(4) Map coordinate updating module
Obtaining vertex lists from a horizontal grid management moduleCalculating the mapping point coordinates corresponding to each vertex at the appointed time according to the set sea surface horizontal flow velocity, and generating a mapping point list。
(5) Result display module
Respectively obtaining a three-dimensional mesh vertex list from the 4 modulesDot-method nematic chartList of sticking pointsList of vertex connection relationshipsAnd displaying the simulation result in a three-dimensional graph and animation mode according to the given map resources and time intervals.
Implementation details
The device is realized based on C # programming language, and draws and displays a three-dimensional model through SharpDX (DirectX packaging library).
(1) Horizontal grid
The horizontal grid is rectangular grid, and the input information includesNumber of grids in direction、Number of directional grids、Length of grid sides of directionAndlength of grid side of directionThe lower left corner of the default grid is the origin of coordinates. Namely that
(2) Elevation function
The elevation function adopts a form of Stocks second-order wave as follows
Wherein
Is the wave height of the wave, and the wave height of the wave,is a function of the wavelength of the light,is a wave the period of the time period is as follows,a two-dimensional unit vector representing the horizontal direction of the wave may be specified by user input. In order to realize a more real wave effect, a plurality of waves with different parameters are added into the module, and the sub elevation functions are superposed to obtain a final elevation function.
(3) Direction of point method
Since the device uses a rectangular horizontal grid, the direction of the point method can be calculated according to the method and 4 adjacent vertexes of each three-dimensional vertex. In order to preserve positional adjacency information of vertices, in devices other thanList of other than、、、In practice, a two-dimensional table structure is adopted, and the search is supported in a two-dimensional index or one-dimensional index mode. For example, forA two-dimensional table of sizes, which can be indexed in two dimensionsObtain its row 2, column 3 elements, and may also be indexed by a one-dimensional index of 7 (i.e., 7)) The same element is obtained. For a vertex at a mesh boundary, computing the direction of the normal to the point replaces the missing adjacent vertex with the vertex itself, e.g. for a two-dimensional index ofOf (2) vertexLeft and lower adjacent vertices thereof、If none exist, then use in calculating point normal vectorIs replaced byAnd。
(4) Picture pasting device
Fig. 10a shows the default map resources used by the present device, and fig. 10b and 10c show the simulation effect achieved by using the map. In addition, the initial mapping range of the device is default to the lower left corner of the pictureLength and diameterOver a wide area, i.e.
Fig. 11 a-11 f are diagrams showing the effect of wave simulation at different times, wherein the "+" sign is a white mark added in a map for highlighting the effect of the change of the sea surface color with time, and in the simulation, the horizontal speed of the mark is the same as the water flow speed, namely, the edgeDirection. In addition, the motion state of the fan, such as the rotation of the fan blade, can also be simulated in the present embodiment.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The foregoing is a further detailed description of the invention in connection with specific/preferred embodiments and it is not intended to limit the invention to the specific embodiments described. It will be apparent to those skilled in the art that numerous alterations and modifications can be made to the described embodiments without departing from the inventive concepts herein, and such alterations and modifications are to be considered as within the scope of the invention. In the description herein, references to the description of the term "one embodiment," "some embodiments," "preferred embodiments," "an example," "a specific example," or "some examples" or the like are intended to mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Various embodiments or examples and features of various embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction. Although embodiments of the present invention and their advantages have been described in detail, it should be understood that various changes, substitutions and alterations can be made herein without departing from the scope of the claims.
Claims (10)
1. A three-dimensional dynamic simulation and visualization method for sea surface waves is characterized by comprising the following steps:
s1: acquiring basic information of sea surface waves;
s2: establishing a sea surface wave model, and simulating the elevation change of sea surface waves;
s3: further simulating horizontal movement of sea surface waves on the basis of the step S2;
s4: and rendering and outputting the simulation image at unit time intervals according to the requirement until the simulation is finished.
3. The method according to claim 2, wherein step S2 comprises in particular the steps of:
s2-1: acquiring a horizontal grid for representing a closed two-dimensional plane, wherein the horizontal grid comprises a series of two-dimensional points and a connection combination relationship between the points, and is specifically represented as a plurality of triangles formed by vertexes and connecting lines thereof;
s2-2: and calculating the ordinate of the two-dimensional point according to the elevation function to change the ordinate into a three-dimensional point, so that the horizontal grid is changed into a three-dimensional grid to obtain a three-dimensional sea surface.
4. The method of claim 3, wherein step S2 further comprises the steps of:
s2-3: optimizing the three-dimensional sea surface in the step S2-2 to realize the display of the smooth grids, wherein the optimization method specifically comprises the following steps:
when the elevation function is a continuous elevation function, point normal vectors on the curved surface corresponding to the three-dimensional points are assigned to the three-dimensional points, namely:
unitizing the vector to obtain a normal vector of a single point
Wherein, the first and the second end of the pipe are connected with each other,is a two-dimensional point coordinate on a horizontal grid,for the given moment in time, the system is,andpartial derivatives of the elevation function in two horizontal directions;
when the elevation function has only discrete points or partial derivatives that are difficult to solve, for a given three-dimensional mesh vertexAnd calculating the surface normal directions of all connected triangles, carrying out weighted average on the unit normal vectors according to the area of the triangles, and taking the obtained unit normal vectors as the point normal directions of the vertexes.
5. The method according to claim 3, characterized in that step S2-2 comprises in particular the steps of:
s2-2-1: from two-dimensional point coordinates on a horizontal gridAt a given momentThen, the corresponding elevation is calculated by the elevation functionTo obtain new three-dimensional points;
S2-2-2: and connecting and combining the three-dimensional points according to the connection combination relationship between the points in the two-dimensional grid to form a new three-dimensional grid.
6. The method according to claim 3, wherein in step S2-2, the step of obtaining the three-dimensional surface from the three-dimensional points comprises connecting and combining the three-dimensional points according to a connection and combination relationship between the points in the two-dimensional grid to form a new three-dimensional grid.
7. The method according to claim 3, wherein step S3 comprises in particular the steps of:
s3-1: acquiring a real sea surface picture as a mapping;
s3-2: adding a map coordinate to each vertex of the three-dimensional meshThus, covering the preset picture on the sea surface wave model;
s3-3: and continuously updating the mapping coordinates of the vertex based on the moving direction and the moving speed of the wave current.
8. The method according to claim 7, wherein the step S3-2 of overlaying the preset picture on the model comprises the following steps:
s3-2-1: the plane coordinate of each vertex is used as the original mapping coordinate m, and the corresponding mapping coordinate is obtained through conversionThe conversion process is defined asThe transformation is used to bring the transformed map coordinates of all vertices within the map region.
9. The method of claim 8, wherein in step S3-2-1, the map coordinates range between the X-axis and the Y-axisIn particular, for each vertex, the conversion isAxial direction ofOriginal mapping coordinates in axial directionIs rounded down to obtainSatisfy the following requirementsThe decimal partIf at allIf it is even, thenAs final chartlet coordinates, otherwise willAs the final map coordinates.
10. The method according to claim 9, characterized in that step S3-3 comprises in particular the steps of:
s3-3-1: determining coordinate ranges in two directions of a horizontal two-dimensional grid from a simulation regionAndand appointing a mapping range corresponding to the grid at the initial momentAnd withThe scaling factor between the coordinate ranges is determined as follows:
s3-3-2: recording the horizontal flow velocity of the sea surface asThe velocity components in the two axial directions are respectivelyAndtwo-dimensional grid pointsIn thatThe map coordinates of the time are as follows:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211436973.0A CN115495938B (en) | 2022-11-16 | 2022-11-16 | Three-dimensional dynamic simulation and visualization method for sea surface waves |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211436973.0A CN115495938B (en) | 2022-11-16 | 2022-11-16 | Three-dimensional dynamic simulation and visualization method for sea surface waves |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115495938A true CN115495938A (en) | 2022-12-20 |
CN115495938B CN115495938B (en) | 2023-03-10 |
Family
ID=85115907
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211436973.0A Active CN115495938B (en) | 2022-11-16 | 2022-11-16 | Three-dimensional dynamic simulation and visualization method for sea surface waves |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115495938B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116611364A (en) * | 2023-05-23 | 2023-08-18 | 上海木圣网络科技有限公司 | Wave generation method, system, equipment and readable medium based on Airy wave |
CN117436317A (en) * | 2023-12-20 | 2024-01-23 | 浙江远算科技有限公司 | Wave current load simulation calculation method, system and equipment based on offshore wind power pile foundation |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0944698A (en) * | 1995-07-25 | 1997-02-14 | Hitachi Ltd | Method and device for generating simulated marine wave image |
CN105894563A (en) * | 2016-04-25 | 2016-08-24 | 中国电子科技集团公司第二十八研究所 | Method for simulating global ocean effect on digital earth |
CN109003322A (en) * | 2018-08-20 | 2018-12-14 | 集美大学 | A kind of three-dimensional ocean waves simulation optimization method of dynamic positioning ship operation on the sea |
-
2022
- 2022-11-16 CN CN202211436973.0A patent/CN115495938B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0944698A (en) * | 1995-07-25 | 1997-02-14 | Hitachi Ltd | Method and device for generating simulated marine wave image |
CN105894563A (en) * | 2016-04-25 | 2016-08-24 | 中国电子科技集团公司第二十八研究所 | Method for simulating global ocean effect on digital earth |
CN109003322A (en) * | 2018-08-20 | 2018-12-14 | 集美大学 | A kind of three-dimensional ocean waves simulation optimization method of dynamic positioning ship operation on the sea |
Non-Patent Citations (8)
Title |
---|
刘丁等: "基于OpenGL索引顶点数组的大尺度海面LOD算法", 《同济大学学报(自然科学版)》 * |
刘浩翰等: "一种视点相关的海浪网格模型", 《计算机工程与应用》 * |
彭晶等: "基于投影网格算法的海面波浪模拟", 《武汉工程大学学报》 * |
曾凡涛: "基于构造函数的波浪模拟", 《广东轻工职业技术学院学报》 * |
曾凡涛: "基于海频谱的实时波浪模拟", 《计算机仿真》 * |
李上海等: "在C#中结合LOD技术实现海浪模拟", 《科学技术与工程》 * |
谭小辉等: "一种基于GPU的大规模水面实时模拟方法", 《计算机仿真》 * |
黄吴蒙;陈静;: "一种面向虚拟地球的海面动态可视化优化方法" * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116611364A (en) * | 2023-05-23 | 2023-08-18 | 上海木圣网络科技有限公司 | Wave generation method, system, equipment and readable medium based on Airy wave |
CN117436317A (en) * | 2023-12-20 | 2024-01-23 | 浙江远算科技有限公司 | Wave current load simulation calculation method, system and equipment based on offshore wind power pile foundation |
CN117436317B (en) * | 2023-12-20 | 2024-03-29 | 浙江远算科技有限公司 | Wave current load simulation calculation method, system and equipment based on offshore wind power pile foundation |
Also Published As
Publication number | Publication date |
---|---|
CN115495938B (en) | 2023-03-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115495938B (en) | Three-dimensional dynamic simulation and visualization method for sea surface waves | |
CN105354355B (en) | A kind of Design of Simulation System and implementation method based on three-dimensional motion what comes into a driver's | |
JP4364409B2 (en) | How to model graphic objects interactively using linked and unlinked surface elements | |
Gallagher et al. | Computer visualization: graphics techniques for engineering and scientific analysis | |
US7050058B2 (en) | Interactive water effects using texture coordinate shifting | |
Jeschke et al. | Water surface wavelets | |
CN102663827A (en) | Three-dimensional dynamic whole-process simulation method for storm surge and flood routing in complex flooding areas | |
JP2001052196A (en) | Method for generating detail oriented hierarchical expression of distance field surrounded with character frame and memory for storing data | |
CN113593051B (en) | Live-action visualization method, dam visualization method and computer equipment | |
JP2000222601A (en) | Generating method and generation system for graphic object | |
CN115758938B (en) | Adhesive boundary flow field numerical simulation-oriented boundary layer grid generation method | |
Shepherd et al. | The case for subdivision surfaces in building design | |
Sobolevskaya et al. | Principles of 3D Web-collections Visualization. | |
Würfel et al. | Natural Phenomena as Metaphors for Visualization of Trend Data in Interactive Software Maps. | |
Janke | Mathematical structures for computer graphics | |
WO2006106829A1 (en) | Structured grid data visualization method and program | |
Pazos Pérez | Blurring the boundaries between real and artificial in architecture and urban design through the use of artificial intelligence | |
JP6093704B2 (en) | Drawing apparatus, drawing method, and drawing program | |
Ragia et al. | Precise photorealistic visualization for restoration of historic buildings based on tacheometry data | |
Merrell et al. | Constraint-based model synthesis | |
Stroila et al. | Clip art rendering of smooth isosurfaces | |
Hasan et al. | Putting table cartograms into practice | |
US20230267696A1 (en) | Responsive Video Canvas Generation | |
Kriushichev et al. | Interactive Visualization for Simulating the Movement of Liquids and Gases | |
Li et al. | Fast global illumination of dynamic water surface based on two stage rendering |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |