A system and method for reconstructing and rendering an in-plane displacement field
Through the reconstruction and rendering system of in-plane displacement field, the color displacement field analysis of in-plane displacement data of rocket engines is realized using data processing and OpenGL drawing function, solving the problem that the existing technology cannot perform color displacement field data analysis, and improving the data Reconstruction and rendering efficiency provide data support for the development of rocket engines.
Patent Information
- Application Number
- CN202210564992.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-23
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2042-05-23
AI Technical Summary
The prior art cannot effectively analyze the color displacement field data of the rocket engine in-plane displacement data, and lacks an overall analysis method for the opposite in-plane displacement field.
A system for reconstruction and rendering of in-plane displacement field is designed, including data processing module, data reconstruction module and data drawing and rendering module. The reconstruction and rendering of displacement field is realized through dynamic two-dimensional array processing and OpenGL drawing function, and customization is adopted. The function performs intuitive color display of n-dimensional displacement fields.
The color displacement field data analysis of the in-plane displacement data of the rocket engine is realized, which improves the data reconstruction efficiency and rendering effect, and provides strong data support for the rapid development of the rocket engine.
Smart Images

Figure CN115082587B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of rocket engine in-plane displacement data analysis, and in particular relates to a system and method for reconstructing and rendering an in-plane displacement field. Background Art
[0002] With the rapid development of my country's aerospace industry, multi-parameter and multi-dimensional data analysis and research on rocket engines are of great significance. Data is the soul of rocket engine tests. Only by studying and analyzing the data can we obtain accurate performance parameters of the engine and the surface, thereby providing strong data support for high-density space launch missions. The displacement field data can more intuitively express the displacement magnitude of different displacements in the surface than simple displacement-time two-dimensional linear data. Therefore, the research on how to process, reconstruct and render the displacement data collected by the rocket engine has very important application value.
[0003] In recent years, the reconstruction and analysis of rocket engine in-plane displacement field data has been attracting much attention. How to convert linear two-dimensional displacement data at different plane positions into colored displacement field data is an important research topic. Currently, there is no self-developed rocket engine in-plane displacement field reconstruction and rendering technology combined with the rocket engine surface. Summary of the invention
[0004] The purpose of the present invention is to provide a system and method for reconstructing and rendering an in-plane displacement field, mainly to solve the technical problem that the prior art cannot perform color displacement field data analysis on the in-plane displacement data of a rocket engine, thereby analyzing the overall displacement field in the plane.
[0005] To achieve the above object, the present invention provides the following solutions:
[0006] A reconstruction and rendering system for an in-plane displacement field comprises a data processing module, a data reconstruction module and a data drawing and rendering module; the data processing module is used to process the in-plane displacement data derived from the real-time displacement acquisition and analysis software to obtain a dynamic two-dimensional array required for reconstructing a displacement field color map; the dynamic two-dimensional array is a collection of displacement field data read cyclically;
[0007] The data reconstruction module is used to import the dynamic two-dimensional array, establish the displacement field plane coordinate system, and reconstruct the displacement field;
[0008] The data drawing and rendering module is used to render and color the data of the displacement field plane coordinate system to obtain a displacement field color map within the plane.
[0009] The present invention also provides a method for reconstructing and rendering an in-plane displacement field, comprising the following steps:
[0010] S1, data acquisition:
[0011] Exporting displacement data within the surface from real-time displacement acquisition and analysis software, wherein the displacement data includes a header file, a displacement column, and corresponding time column data;
[0012] S2, data processing:
[0013] S21, processing the displacement data in S1 through the data processing module, removing the header file, and extracting the displacement column and the corresponding time column data, and storing them in the dynamic two-dimensional array data[n][m]; defining the first dimension of the dynamic two-dimensional array to represent the displacement column, the displacement column is the serial number of the displacement point, which increases from 0 to n in sequence, where n is a positive integer; defining the second dimension of the dynamic two-dimensional array to represent the time column, the time column increases from 0 to m in sequence, where m is a positive integer; saving the data of the displacement column and the time column as a displacement field dynamic two-dimensional array that can be cyclically read;
[0014] S22, using the data information of the displacement column to calculate the direction information of the displacement field, and storing it in a variable direction, wherein the variable direction uses different colors to represent the gradient of the direction, and the gradient of the direction is the set of the displacement field directions;
[0015] S23, combining S21 and S22, the data information required to reconstruct the displacement field can be obtained;
[0016] S3, data reconstruction:
[0017] S31, in the data reconstruction module, based on the dynamic two-dimensional array data[n][m] of the displacement field in S2, the OpenGL two-dimensional drawing function glVertex2f is used to draw the plane coordinate system of the displacement field;
[0018] S32, using the OpenGL two-dimensional drawing function glVertex2f to draw S equal parts of the displacement field color plane stick strips; where S ≥ 1, S is a positive integer;
[0019] S33, calling S+1 different colors and placing them respectively at S+1 boundary lines of the S equal parts of the displacement field color plane rod-shaped strips;
[0020] S34, cyclically reading the displacement field dynamic two-dimensional array data[n][m] obtained in S2, and reconstructing the displacement field;
[0021] S4, data plotting and rendering:
[0022] In the data drawing and rendering module, the displacement field color map is drawn based on the displacement field reconstructed by S3. A double-layer for loop is used to read and call the function Draw Displacement Field (double value, double mBegin, double mEnd), where value represents the temporary variable value stored, mBegin represents the stored starting variable value, and mEnd represents the stored final variable value. The direction of each displacement point is reconstructed and rendered from the color interval with a small value to the color interval with a large value. n displacement points can form an n-dimensional displacement field vector, thereby completing the reconstruction and rendering of the displacement field.
[0023] Furthermore, in S2, the variable direction is used to store the direction information of the displacement, and the value of the angle θ between the direction of the displacement and the center line OO' in a clockwise direction is calculated. The numerical value of the displacement direction is represented by sinθ, and the set of sinθ is the set of the variable direction. By combining the dynamic two-dimensional array data[n][m] and the variable direction, the data information required to reconstruct the displacement field can be obtained.
[0024] Furthermore, in S32, the coordinate drawing functions of the four corners of the displacement field color plane rod are glVertex2f(-v, 1.0), glVertex2f(0.0, 1.0), glVertex2f(0.0, 0.0) and glVertex2f(-v, 0.0), respectively, where: v is the width of the displacement field color plane rod.
[0025] Furthermore, in S4, the function declaration used for data drawing and rendering is:
[0026] Draw Displacement Field(double value, double mBegin, double mEnd); where: mBegin = (float)(k-1) / (m_nDisplacement-1.0f); mEnd = (float)(k) / (m_nDisplacement-1.0f); m_nDisplacement is n-1, k is a positive integer from 0 to index[i], i is a positive integer from 0 to (m-1) / 2, f represents a floating point number, and a double-layer for loop statement is used to loop and read the displacement field data reconstructed by S3.
[0027] Compared with the prior art, the present invention has the following beneficial effects:
[0028] 1. The in-plane displacement field reconstruction and rendering system of the present invention includes a data processing module, a data reconstruction module, and a data drawing and rendering module. The system structure design is simplified, wherein the data drawing and rendering module uses a custom function to realize an intuitive color display of the n-dimensional displacement field, realizes efficient drawing and rendering of data, and has a good rendering effect. It can achieve the purpose of color displacement field data analysis of the in-plane displacement data of the rocket engine, and provides strong data support for the rapid development of the rocket engine.
[0029] 2. In the in-plane displacement field reconstruction and rendering system of the present invention, the data reconstruction module uses a dynamic two-dimensional array to store the displacement field data information in real time, reads the displacement field data into the memory, and operates the displacement field data at the memory level, thereby improving the efficiency of displacement field data reconstruction.
[0030] 3. The data drawing and rendering module of the present invention uses a bar-shaped color chart to represent the displacement size of different position coordinates (X-axis, Y-axis). This method can intuitively display the displacement field data of different position coordinates. It not only has high drawing and rendering efficiency, but also can provide an intuitive data model for theoretical learning. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 Schematic diagram of a system framework for reconstructing and rendering an in-plane displacement field according to an embodiment of the present invention.
[0032] Figure 2 The present invention is a flowchart of an in-plane displacement field reconstruction and rendering method according to an embodiment of the present invention.
[0033] Figure 3 The figure is a schematic diagram of the principle of data processing in a method for reconstructing and rendering an in-plane displacement field according to an embodiment of the present invention.
[0034] Figure 4 This is a displacement field color map in a method for reconstructing and rendering an in-plane displacement field according to an embodiment of the present invention.
[0035] Reference numerals:
[0036] 1- In-plane displacement field reconstruction and rendering system, 2- Data processing module, 3- Data reconstruction module, 4- Data drawing and rendering module. DETAILED DESCRIPTION
[0037] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0038] like Figure 1 As shown, the present invention provides a reconstruction and rendering system 1 for an in-plane displacement field, comprising a data processing module 2, a data reconstruction module 3 and a data drawing and rendering module 4; the data processing module 2 is used to process the in-plane displacement data derived from the displacement real-time acquisition and analysis software, and obtain the dynamic two-dimensional array required for reconstructing the displacement field color map, and the dynamic two-dimensional array is a collection of displacement field data read in a loop; the data reconstruction module 3 is used to import the dynamic two-dimensional array, establish a displacement field plane coordinate system, and reconstruct the displacement field; the data drawing and rendering module 4 is used to render and color the data of the displacement field plane coordinate system, and obtain the displacement field color map in the plane. The reconstruction and rendering system of the present invention has a simplified structure, and the reconstruction and rendering efficiency of the displacement field is high. The data drawing and rendering module uses a custom function to realize the intuitive color display of the n-dimensional displacement field, has high working efficiency, and has a good rendering effect. It can achieve the purpose of color displacement field data analysis of the in-plane displacement data of the rocket engine, and provides strong data support for the rapid development of rocket engines.
[0039] like Figure 2 As shown, the present invention also provides a method for reconstructing and rendering an in-plane displacement field. The method is implemented based on a system for reconstructing and rendering an in-plane displacement field, and mainly includes the following steps:
[0040] S1, data acquisition:
[0041] The displacement data within the surface is exported from the real-time displacement acquisition and analysis software. The displacement data includes the header file, displacement column and corresponding time column data. The exported displacement data is in the .txt text file data format.
[0042] S2, data processing:
[0043] S21, processing the displacement data in S1 through data processing module 2, removing redundant header files, extracting the displacement column and the corresponding time column data, and storing them in the dynamic two-dimensional array data[n][m].
[0044] This step is specifically as follows: define the first dimension of the dynamic two-dimensional array to represent the displacement column, which is the serial number of the displacement point, increasing from 0 to n, where n is a positive integer; define the second dimension of the dynamic two-dimensional array to represent the time column, which increases from 0 to m, where m is a positive integer; save the data of the displacement column and the time column as a dynamic two-dimensional array of displacement field that can be read cyclically.
[0045] S22, using the data information of the displacement column in S21 to calculate the direction information of the displacement field, and store it in the variable direction. The variable direction uses different colors to represent the gradient of the direction, that is, the gradient of the direction represents the set of directions of the displacement field.
[0046] like Figure 3 As shown, the data processing is specifically as follows: assuming that the variable direction stores the direction information of the displacement, then the value of the angle θ between the direction of the displacement and the center line OO' in a clockwise direction is calculated, and sinθ is used to represent the direction value of the displacement, wherein the AA' displacement identifier represents the displacement direction sin270°, i.e. -1, and the BB' displacement identifier represents the displacement direction sin90°, i.e. 1, and the set of sinθ is the set of the variable direction; the above-mentioned dynamic two-dimensional array data[n][m] is combined with the variable direction to obtain the data information required to reconstruct the displacement field.
[0047] S3, data reconstruction:
[0048] S31, in the data reconstruction module 3, based on the dynamic two-dimensional array of the displacement field in S2, the OpenGL two-dimensional drawing function glVertex2f is used to draw the plane coordinate system of the displacement field.
[0049] S32, using the OpenGL two-dimensional drawing function glVertex2f to draw S equal parts of the displacement field color plane stick strips, where S ≥ 1, S is a positive integer.
[0050] Specifically, the coordinate drawing functions of the four corners of the displacement field color plane rod are glVertex2f(-v, 1.0), glVertex2f(0.0, 1.0), glVertex2f(0.0, 0.0) and glVertex2f(-v, 0.0), where v is the width of the displacement field color plane rod.
[0051] S33, calling S+1 different colors and placing them respectively at the S+1 boundary lines of the S equally divided displacement field color plane rod-shaped strips.
[0052] S34, cyclically read the dynamic two-dimensional array data[n][m] of the displacement field obtained in S2 to complete the reconstruction of the displacement field.
[0053] S4, data plotting and rendering:
[0054] In the data drawing and rendering module 4, the displacement field color map is drawn based on the displacement field reconstructed by S3. The double-layer for loop is used to read and call the function Draw Displacement Field (double value, double mBegin, double mEnd), where value represents the temporary variable value stored, mBegin represents the stored starting variable value, and mEnd represents the stored final variable value; the direction of each displacement point is reconstructed and rendered from the color interval with a small value to the color interval with a large value. The n displacement points can form an n-dimensional displacement field vector, so as to complete the reconstruction and rendering of the displacement field (the rendering result is shown in FIG. 1 ). Figure 4 (as shown).
[0055] In the present invention, the declaration of the Draw Displacement Field function used for data drawing and rendering is:
[0056] Draw Displacement Field(double value, double mBegin, double mEnd); where: mBegin = (float)(k-1) / (m_nDisplacement-1.0f); mEnd = (float)(k) / (m_nDisplacement-1.0f); m_nDisplacement is n-1, k is a positive integer from 0 to index[i], i is a positive integer from 0 to (m-1) / 2, f represents a floating point number, and a double-layer for loop statement is used to loop and read the displacement field data reconstructed by S3.
[0057] The present invention uses a custom function to realize an intuitive color display of the n-dimensional displacement field, realizes efficient drawing and rendering of data, and has a good rendering effect. It can achieve the purpose of color displacement field data analysis on the in-plane displacement data of the rocket engine, and provides strong data support for the rapid development of rocket engines.
[0058] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to these embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is defined by the appended claims and their equivalents. The purpose of the present invention is to provide a super-resolution real-time displacement measurement system and method to solve the problems raised in the above background.
Claims
1. A method for reconstructing and rendering an in-plane displacement field, characterized in that: The following steps are involved: S1, data acquisition: Exporting displacement data within the surface from real-time displacement acquisition and analysis software, wherein the displacement data includes a header file, a displacement column, and corresponding time column data; S2, data processing: S21, processing the displacement data in S1 through the data processing module (2), removing the header file, and extracting the displacement column and the corresponding time column data, and storing them in the dynamic two-dimensional array data[n][m]; The first dimension of the dynamic two-dimensional array is defined to represent a displacement column, the displacement column is the serial number of the displacement point, and increases from 0 to n, where n is a positive integer; the second dimension of the dynamic two-dimensional array is defined to represent a time column, and the time column increases from 0 to m, where m is a positive integer; the data of the displacement column and the time column are saved as a displacement field dynamic two-dimensional array that can be cyclically read; S22, using the data information of the displacement column in S21 to calculate the direction information of the displacement field, and storing it in a variable direction, wherein the variable direction uses different colors to represent the gradient of the direction, and the gradient of the direction is the set of the displacement field directions; S23, combining S21 and S22, the data information required to reconstruct the displacement field can be obtained; S3, data reconstruction: S31, in the data reconstruction module (3), based on the dynamic two-dimensional array data[n][m] of the displacement field in S2, the OpenGL two-dimensional drawing function glVertex2f is used to draw the plane coordinate system of the displacement field; S32, using the OpenGL two-dimensional drawing function glVertex2f to draw S equal parts of the displacement field color plane stick strips; where S ≥ 1, S is a positive integer; S33, calling S+1 different colors and placing them respectively at S+1 boundary lines of the S equal parts of the displacement field color plane rod-shaped strips; S34, cyclically reading the dynamic two-dimensional array data[n][m] of the displacement field obtained in S2, and completing the reconstruction of the displacement field; S4, data plotting and rendering: In the data drawing and rendering module (4), a displacement field color map is drawn based on the displacement field reconstructed by S3. This is accomplished by using a double-layer for loop to read and call the function Draw Displacement Field (double value, double mBegin, double mEnd), where value represents the temporary variable value stored, mBegin represents the stored starting variable value, and mEnd represents the stored final variable value. The direction of each displacement point is reconstructed and rendered from the color interval with a small value to the color interval with a large value. n displacement points can form an n-dimensional displacement field vector, thereby completing the reconstruction and rendering of the displacement field.
2. The method for reconstructing and rendering an in-plane displacement field according to claim 1, characterized in that: In S2, the variable direction is used to store the direction information of the displacement, and the value of the angle θ between the direction of the displacement and the center line OO' in a clockwise direction is calculated. The value of the displacement direction is represented by sinθ, and the set of sinθ is the combination of the variable direction. By combining the dynamic two-dimensional array data[n][m] and the variable direction, the data information required to reconstruct the displacement field can be obtained.
3. The method for reconstructing and rendering an in-plane displacement field according to claim 2, characterized in that: In S32, the coordinate drawing functions of the four corners of the displacement field color plane rod are glVertex2f (-v, 1.0), glVertex2f (0.0, 1.0), glVertex2f (0.0, 0.0) and glVertex2f (-v, 0.0), respectively, where: v is the width of the displacement field color plane rod.
4. The method for reconstructing and rendering an in-plane displacement field according to claim 3, characterized in that: In S4, the function declaration used for data drawing and rendering is: Draw Displacement Field(double value, double mBegin, double mEnd); where: mBegin=(float)(k-1) / (m_nDisplacement-1.0f); mEnd=(float)(k) / (m_nDisplacement-1.0f); m_nDisplacement is n-1, k is a positive integer from 0 to index[i], i is a positive integer from 0 to (m-1) / 2, f represents a floating point number, and a double-layer for loop statement is used to loop and read the displacement field data reconstructed by S3.
5. A system for reconstructing and rendering an in-plane displacement field, used to implement a method for reconstructing and rendering an in-plane displacement field according to any one of claims 1 to 4, characterized in that: It includes a data processing module (2), a data reconstruction module (3) and a data drawing and rendering module (4) which are connected in sequence; The data processing module (2) is used to process the in-plane displacement data exported by the real-time displacement acquisition and analysis software to obtain a dynamic two-dimensional array required for reconstructing the displacement field color map; the dynamic two-dimensional array is a collection of displacement field data read cyclically; The data reconstruction module (3) is used to import the dynamic two-dimensional array, establish a displacement field plane coordinate system, and reconstruct the displacement field; The data drawing and rendering module (4) is used to render and color the data of the displacement field plane coordinate system to obtain a displacement field color map within the plane.
