A two-dimensional flow field visualization method for an adaptive LED spherical display device
By using the Leaflet-based flow field visualization solution and the improved streamline drawing algorithm on the LED spherical display device, the problem of mismatch between the dragging simulation of the flow field on the spherical surface and the generation and disappearance near the 180-degree line is solved, and the flow field movement is realized. Dynamic display of trajectories and clear visualization of global ocean current eddy motion trends.
Patent Information
- Application Number
- CN202410702988.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-03
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2044-06-03
AI Technical Summary
When traditional two-dimensional flow field visualization technology is applied to LED spherical display devices, the flow field will temporarily disappear when it is dragged on the sphere to simulate the rotation of the earth, and when the two-dimensional flow field is projected onto the sphere, it will disappear near the 180-degree line. There is a mismatch between the generation and disappearance of streamlines, which affects the visualization effect.
Using a flow field visualization solution based on Leaflet, the dynamic drawing of the flow field is realized on the canvas, combined with the improved streamline drawing algorithm, so that the streamline can cross the 180-degree line, thereby realizing adaptive secondary display on the LED spherical display device. Visualization of dimensional flow fields.
It realizes the dynamic display of the flow field motion trajectory, solves the problem of the temporary disappearance of the flow field when dragging the simulation on the spherical surface, and maintains the continuity of the streamlines near the 180-degree line, improving the understanding of global ocean currents and vortex motion trends. Visualization.
Smart Images

Figure CN118280229B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of ocean data visualization, and in particular relates to a two-dimensional flow field visualization method of an adaptive LED spherical display device. Background Art
[0002] Vector field is one of the important branches of scientific visualization, and plays an important role in qualitative analysis in the fields of astronomy, meteorology, aeronautics, oceanography and medicine. In marine science research, in order to determine the main characteristic structure of the ocean flow field and conduct quantitative analysis and reveal its dynamic mechanism, it is necessary to use visualization and simulation to obtain graphic images of the ocean movement process. Among them, the visualization of the flow field under the vector field plays an important role in analyzing the law of ocean movement changes.
[0003] LED spherical display equipment is a special display device, which is composed of LED display modules and can present 360-degree images or videos. Generally, LED spherical display equipment is used for surround video exhibition, real-time data visualization, advertising, etc. In recent years, due to the gradual maturity of LED manufacturing technology, the reduction of manufacturing costs and the improvement of visualization effects, it has gradually been used in the field of marine visualization.
[0004] The global flow field visualization based on LED spherical display device is essentially to project 2D flow field visualization onto the spherical LED display device. Although the traditional two-dimensional flow field visualization has been very perfect in the construction of streamline drawing algorithm, there has been no better solution for global flow field visualization based on LED spherical display device. The traditional two-dimensional flow field visualization technology route is very mature, but once it is applied to the LED spherical display device, the following major problems will arise: Problem 1: When the flow field is dragged on the spherical surface to simulate the rotation of the earth, the flow field will disappear temporarily and be redrawn; Problem 2: When the two-dimensional flow field is projected onto the spherical surface, there will be a mismatch between the generation and disappearance of streamlines near the 180-degree line. This greatly affects the visualization effect of the two-dimensional flow field on the spherical display device. Summary of the invention
[0005] The purpose of the present invention is to provide a two-dimensional flow field visualization method of an adaptive LED spherical display device to make up for the deficiencies of the prior art.
[0006] The present invention proposes a two-dimensional flow field adaptive spherical screen visualization method based on flow field visualization. To solve the first problem, a flow field visualization solution based on Leaflet is adopted, and the underlying control is drawn on a canvas, so that the canvas can be dragged and the flow field motion trajectory will not disappear; to solve the second problem, the present invention proposes an improved algorithm for flow field cross-line based on the flow field visualization solution based on Leaflet, so that the streamlines can cross the 180-degree line during the streamline drawing process, thereby realizing the adaptive adaptation of flow field visualization on the LED spherical display device.
[0007] In order to achieve the above object, the specific technical solution adopted by the present invention is:
[0008] A two-dimensional flow field visualization method of an adaptive LED spherical display device comprises the following steps:
[0009] (1) Obtain global ocean current field data and generate global current field grid data objects;
[0010] (2) Randomly generate an array of seed point objects: randomly generate two-dimensional point objects with x and y longitude and latitude coordinates, and add a time attribute to each seed point object to control the generation and disappearance of particle motion;
[0011] (3) Calculate the moving trajectory of the seed point object; perform streamline drawing operations, draw the vortex trajectory through the improved Leaflet-based VectorFieldAdmin visualization class and gradually render it to the data layer, thus completing the two-dimensional flow field visualization;
[0012] (4) Project the two-dimensional flow field visualization dynamic effect diagram onto the LED spherical display device to present the visualization effect.
[0013] Furthermore, the specific process in step (1) is as follows:
[0014] (a) Reconstruction of global ocean current data and converting it into ASC (ASCII) text files;
[0015] (b) Gridding the global ocean current field data, read the ASC text file generated by (a), and generate the global ocean current field grid data Field. This object has the properties of the flow field data such as longitudinal velocity, latitudinal velocity, spatial resolution, time and spatial position.
[0016] Furthermore, the specific process of step (2) is as follows:
[0017] (a) The number parameter Num of global ocean streamline generation, which is used to control the density of global ocean flow field generation;
[0018] (b) Randomly generate a seed point object array Path. Path has Num data items. Each data item is equivalent to a seed point object, including the initial longitude, initial latitude, target longitude, target latitude, life span and streamline length attributes. The data structure of Path is essentially an object array with a length of Num.
[0019] Furthermore, the specific process in step (3) is as follows:
[0020] (a) Calculate streamline trajectories: Find the longitudinal velocity and latitudinal velocity attributes at each seed point from the Field data, and calculate the target longitude and latitude information of the seed point based on the velocity of the point;
[0021] (b) Flow field cross-line stage 1: In the process of calculating streamline trajectories, there will be a seed point whose target longitude exceeds the drawing range. The target longitude that exceeds the range is assigned as the threshold of the drawing interval (the upper limit is 180 and the lower limit is -180), thus completing the first step of flow field cross-line;
[0022] (c) Streamline drawing: Draw the target point of each seed point in the Field data. After drawing, assign the values of the target longitude and latitude to the initial longitude and initial latitude respectively;
[0023] (d) The second stage of flow field cross-line: the initial longitude of the seed point on the left and right boundaries of the drawing area (that is, the initial longitude is 180 or -180) in the drawn Field data is assigned to the position that crosses the 180-degree line of the drawing interval and approaches the opposite side of the 180-degree line, thereby realizing the second stage of flow field cross-line operation;
[0024] (e) Repeat the above steps to complete the drawing of the two-dimensional flow field.
[0025] Furthermore, in the step (a), the initial longitude x and the initial latitude y in each item traversed form a point (x, y), and the global ocean current field grid data Field is compared to extract the meridional flow velocity u and the zonal flow velocity v at the point (x, y), and the target longitude xt and the target latitude yt are calculated through (u, v). The calculation is shown as follows:
[0026] (1);
[0027] (2);
[0028] Where xt is the target longitude, x is the initial longitude, u is the meridional velocity, velocity is the velocity parameter set by the system, which is used to control the flow velocity of the flow field. The larger the velocity value, the greater the flow velocity. yt is the target latitude, and yt is the initial latitude.
[0029] Furthermore, in the step (c), the seed point object array Path is traversed, and source point objects and target point objects are established according to x, y, xt and yt in the data of each item of Path, wherein the data of the source point is composed of (x, y), and the data of the target point is composed of (xt, yt). The two points are converted into screen coordinates and directly drawn through the front-end canvas object. After the drawing is completed, the operation of x=xt, y=yt is executed.
[0030] Furthermore, in the step (d), the Path data completed in the operation (c) is traversed again, and the data item of x=180 or x=-180 is operated, and the x in the data item of x=180 is assigned a value of -179.99999, and the x in the data item of x=-180 is assigned a value of 179.99999.
[0031] Compared with the prior art, the advantages and technical effects of the present invention are as follows:
[0032] The present invention has the following advantages:
[0033] (1) Combining flow field motion with visualization principles, dynamic display of flow field motion trajectory is achieved.
[0034] (2) The problem of the flow field temporarily disappearing and needing to be redrawn when dragging the flow field on the sphere to simulate the rotation of the earth has been solved.
[0035] (3) The problem of mismatch between streamline generation and disappearance near the 180-degree line when the two-dimensional flow field is projected onto the LED spherical display device has been solved.
[0036] (4) By using the present invention, the movement trends of global ocean currents and vortices can be clearly observed on the LED spherical display device, and tiny changes in the area can be observed through the spherical screen.
[0037] Compared with the traditional two-dimensional flow field visualization method, the present invention utilizes the existing global flow field data and can adapt to the LED spherical display device. Through the LED spherical display device, the movement trend of global ocean currents and vortices and the details of vortex motion can be observed more intuitively, providing a visualization solution for studying the trajectory of global vortex motion, and has a certain degree of reference significance for the 3D visualization research of the global flow field, laying the foundation for the visualization research of the global ocean flow field. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 The present invention is a flow chart of a two-dimensional flow field visualization method for an adaptive LED spherical display device.
[0039] Figure 2 This is a traditional 2D flow field visualization effect diagram.
[0040] Figure 3 This is an improved 2D flow field visualization effect diagram of the present invention.
[0041] Figure 4 This is a flow field visualization effect diagram based on LED display equipment. DETAILED DESCRIPTION
[0042] The present invention is further explained and illustrated below through specific embodiments in conjunction with the accompanying drawings.
[0043] Embodiment 1:
[0044] Read global ocean flow field data and generate global two-dimensional global ocean flow field grid data, randomly generate streamline seed points on the globe, calculate streamline trajectories against the two-dimensional global ocean flow field grid data, perform streamline cross-line processing on the calculation results, perform streamline drawing processing, and project the drawing results onto the LED spherical display device to achieve global flow field visualization.
[0045] See also Figure 1 , a two-dimensional flow field visualization method of an adaptive LED spherical display device, the specific steps of which are:
[0046] 1. Read global flow field data and generate global flow field grid data objects.
[0047] (a) Reconstruct the global ocean current data and convert it into an ASC (ASCII) text file;
[0048] (b) Grid the flow field data, read the ASC file generated by (a), and generate the global ocean flow field grid data Field. This object has attribute information such as the longitudinal velocity, latitudinal velocity, spatial resolution, time and spatial position of the flow field data.
[0049] 2. Randomly generate an array of seed point objects.
[0050] (a) Set the parameter Num that controls the density of the number of streamlines drawn. In this experiment, Num is set to 50,000, which means that there are 50,000 points involved in the streamline drawing.
[0051] (b) Create an array Path of seed point objects with Num data items, where each seed point object contains x, y, xt, yt, age and m attributes, corresponding to the initial longitude, initial latitude, target longitude, target latitude, streamline life and streamline length respectively.
[0052] 3. Calculate streamline trajectory, streamline drawing and flow field cross-line
[0053] (a) Calculate streamline trajectory. The initial longitude x and initial latitude y in each traversal form a point (x, y). The global ocean current field grid data Field is used to extract the meridional velocity u and zonal velocity v at the point (x, y). The target longitude xt and target latitude yt are calculated through (u, v). The calculation is shown as follows:
[0054] (1);
[0055] (2);
[0056] Where xt is the target longitude, x is the initial longitude, u is the meridional velocity, velocity is the velocity parameter set by the system, which is used to control the flow velocity of the flow field. The larger the velocity value, the greater the flow velocity. yt is the target latitude, and yt is the initial latitude.
[0057] (b) Flow field cross-line stage 1. The fundamental reason for the mismatch between streamline generation and disappearance in problem 2 is that the traditional Leaflet-based flow field drawing algorithm can only draw streamlines within the display area. Points near the 180-degree line must have target latitude (xt) values that are not in the drawing interval, so problem 2 will occur near the 180-degree line.
[0058] In order to solve this problem, the present invention proposes a flow field algorithm, which is divided into two stages. The first stage is to determine the target longitude of the point crossing the 180-degree line and assign it to 180. The purpose of this operation is to draw the streamline on the 180-degree line. The algorithm implements that if the value of xt is greater than 180, the value of xt is 180, and if the value of xt is less than -180, the value of xt is set to -180. The algorithm pseudo code is shown in Table 1.
[0059] Table 1 Pseudocode of the flow field cross-line one-stage algorithm
[0060] .
[0061] (c) Streamline drawing: Path data is traversed, and source point objects and target point objects are established based on the x, y, xt and yt in the data of each Path item. The data of the source point is composed of (x, y) and the data of the target point is composed of (xt, yt). The two points are converted into screen coordinates and directly drawn through the front-end canvas object. After the drawing is completed, the operation of x=xt and y=yt is executed.
[0062] (d) Execute the second stage of flow field cross-line operation, and assign the initial longitude of the seed point on the left and right boundaries of the drawing area (that is, the initial longitude is 180 or -180) in the drawn Field data. The assignment content is the position across the 180-degree line of the drawing interval and close to the opposite side of the 180-degree line. The specific algorithm steps are to traverse the Path data completed by (c) operation again, operate the data item of x=180 or x=-180, and assign the value of x in the data item of x=180 to -179.99999, and assign the value of x in the data item of x=-180 to 179.99999. The algorithm pseudo code is shown in Table 2.
[0063] Table 2 Pseudocode of flow field cross-line two-stage
[0064] .
[0065] (e) Repeat steps (a) to (d) to achieve the two-dimensional flow field visualization effect. Figure 3 As shown, Figure 2 It is a traditional two-dimensional flow field visualization effect. By projecting the visualization results onto the LED spherical display device, the global flow field visualization effect can be achieved. Figure 4 shown.
[0066] When placing Earth remote sensing images on a spherical medium, the distortion caused by projecting a 2D flat image onto the surface of a 3D spherical screen must be considered. In response to the above problems, the present invention uses a method of equiangular projection, which is usually called a simple longitude and latitude grid, where the image is a standard map projection with a width twice as wide as the height (a ratio of 2:1). For a sphere, it is important that the data fills the entire image space, otherwise when the image is projected, the excess space around the border or edge will form a seam. The formula for converting spherical screen coordinates to equiangular projection is shown below, where and is the longitude and latitude, are the standard parallels (north and south of the equator):
[0067] (3);
[0068] (4);
[0069] After the remote sensing images in the system are visualized, they are stored in a two-dimensional plane. If they are to be displayed on a spherical screen (three-dimensional spherical surface), they need to be mapped to the surface of the sphere in a reasonable way. At the same time, the spherical screen projection system is composed of multiple projection display devices, so a complete image data will be evenly divided by each projection display device. When it is projected onto the spherical screen area, it is necessary to ensure that the image content matches the spherical screen area. If the display is realized on a three-dimensional screen, the two-dimensional plane image needs to be mapped and transformed. Therefore, for the image data of this system, mapping processing and projection transformation are performed, and it is projected onto the spherical screen surface in a reasonable way to complete the seamless splicing display of the spherical screen image.
[0070] The present invention adopts the method of longitude and latitude mapping to perform mapping transformation processing on the projection equipment of the spherical screen system to ensure that the projected image data matches the spherical screen area. By constructing a spatial mapping relationship between the projector and the physical spherical screen in three-dimensional space, the correspondence between the image information pixel points and the spherical screen area is calculated and converted, thereby obtaining a more accurate projection display result.
Claims
1. A two-dimensional flow field visualization method for an adaptive LED spherical display device, characterized in that: The steps include: (1) Obtain global ocean current field data and generate global current field grid data objects; (2) Randomly generate an array of seed point objects: randomly generate two-dimensional point objects with x and y longitude and latitude coordinates, and add a time attribute to each seed point object to control the generation and disappearance of particle motion; (3) Calculate the movement trajectory of the seed point object; The streamline drawing operation draws the vortex trajectory through the improved Leaflet-based VectorFieldAdmin visualization class and gradually renders it to the data layer, thus completing the two-dimensional flow field visualization. The specific process is as follows: (a) Calculate streamline trajectories: Find the longitudinal velocity and latitudinal velocity attributes at each seed point from the Field data, and calculate the target longitude and latitude information of the seed point based on the velocity of the point; (b) Flow field cross-line stage 1: In the process of calculating streamline trajectories, there will be a target longitude of the seed point that exceeds the drawing range. The target longitude that exceeds the range is assigned as the threshold of the drawing interval, thereby completing the first step of the flow field cross-line; (c) Streamline drawing: Draw the target point of each seed point in the Field data. After drawing, assign the values of the target longitude and latitude to the initial longitude and initial latitude respectively; (d) The second stage of flow field crossing the line: the initial longitude of the seed points on the left and right boundaries of the drawing area in the drawn Field data is assigned to the position that crosses the 180-degree line of the drawing interval and approaches the opposite side of the 180-degree line, thereby realizing the second stage of flow field crossing the line operation; (e) Repeat the above operations to complete the drawing of the two-dimensional flow field; (4) The two-dimensional flow field visualization dynamic effect diagram is projected onto the LED spherical display device to present the visualization effect.
2. The two-dimensional flow field visualization method of the adaptive LED spherical display device according to claim 1, characterized in that: The specific process in step (1) is as follows: (a) Reconstruction of global ocean current data and converting it into ASC text files; (b) Gridding the global ocean current field data, read the ASC text file generated in step (a), and generate the global ocean current field grid data Field, which has the attributes of the flow field data's longitudinal velocity, latitudinal velocity, spatial resolution, time and spatial position.
3. The two-dimensional flow field visualization method of the adaptive LED spherical display device according to claim 1, characterized in that: The specific process of step (2) is as follows: (a) The number parameter Num for generating global ocean streamlines, which is used to control the density of global ocean flow field generation; (b) Randomly generate a seed point object array Path, which has Num data items. Each data item is equivalent to a seed point object, including the initial longitude, initial latitude, target longitude, target latitude, life span and streamline length attributes. The data structure of Path is essentially an object array with a length of Num.
4. The two-dimensional flow field visualization method of the adaptive LED spherical display device according to claim 1, characterized in that: In the step (a), the initial longitude x and the initial latitude y in each item traversed form a point (x, y), and the global ocean current field grid data Field is compared to extract the meridional flow velocity u and the zonal flow velocity v at the point (x, y). The target longitude xt and the target latitude yt are calculated by (u, v). The calculation is shown as follows: xt=x+u*velocit (1) yt=y+v*velocit (2) Where xt is the target longitude, x is the initial longitude, u is the meridional velocity, velocity is the velocity parameter set by the system, which is used to control the flow velocity of the flow field. The larger the velocity value, the greater the flow velocity. yt is the target latitude, and yt is the initial latitude.
5. The two-dimensional flow field visualization method of the adaptive LED spherical display device according to claim 1, characterized in that: In the step (c), the seed point object array Path is traversed, and the source point object and the target point object are established according to the x, y, xt and yt in the data of each item of Path, wherein the data of the source point is composed of (x, y), and the data of the target point is composed of (xt, yt). The two points are converted into screen coordinates and directly drawn through the front-end canvas object. After the drawing is completed, the operation of x=xt, y=yt is executed.
6. The two-dimensional flow field visualization method of the adaptive LED spherical display device according to claim 1, characterized in that: In the step (d), the Path data completed in the operation (c) is traversed again, and the data item x=180 or x=-180 is operated, and the x in the data item x=180 is assigned a value of -179.99999, and the x in the data item x=-180 is assigned a value of 179.99999.
Citation Information
Patent Citations
Parallel flow line placing method applicable to two-dimensional flow field
CN102521854A
Two-dimensional streamline parallel placement method without data sharing conflict
CN102930587A
GPU-based interactive ocean three-dimensional flow field dynamic visual algorithm
CN104867186A
Multilayer flow field visualization method
CN106156471A
Parallel two-dimensional flow field multivariate data dynamic visual system
CN106875458A
