CN114818309A - Two-dimensional scalar field interpolation method and device based on discrete point representation and computer equipment - Google Patents

Two-dimensional scalar field interpolation method and device based on discrete point representation and computer equipment Download PDF

Info

Publication number
CN114818309A
CN114818309A CN202210422038.2A CN202210422038A CN114818309A CN 114818309 A CN114818309 A CN 114818309A CN 202210422038 A CN202210422038 A CN 202210422038A CN 114818309 A CN114818309 A CN 114818309A
Authority
CN
China
Prior art keywords
point
interpolated
triangular
scalar field
unit
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.)
Pending
Application number
CN202210422038.2A
Other languages
Chinese (zh)
Inventor
唐滨
李宝君
黄礼敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Harbin Engineering University
Original Assignee
Harbin Engineering University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Harbin Engineering University filed Critical Harbin Engineering University
Priority to CN202210422038.2A priority Critical patent/CN114818309A/en
Publication of CN114818309A publication Critical patent/CN114818309A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Image Generation (AREA)
  • Complex Calculations (AREA)

Abstract

The invention discloses a two-dimensional scalar field interpolation method and device based on discrete point representation and computer equipment, belongs to the technical field of simulation, and solves the problems of low interpolation precision and efficiency in the prior simulation technology. The method of the invention comprises the following steps: acquiring a discretely distributed scalar field and a coordinate position of a point to be interpolated; performing triangular meshing on the discretely distributed scalar field, and dividing the two-dimensional plane into a plurality of triangular units; calculating the central position of each triangular unit, and acquiring the central points of all the triangular units; acquiring the triangle unit where the point to be interpolated is located according to the central points of all the triangle units; and performing linear interpolation in the triangular unit where the point to be interpolated is positioned to obtain the attribute value of the point to be interpolated.

Description

Two-dimensional scalar field interpolation method and device based on discrete point representation and computer equipment
Technical Field
The present application relates to the field of simulation technologies, and in particular, to a two-dimensional scalar field interpolation method and apparatus based on discrete point representation, and a computer device.
Background
In computer numerical simulation calculation or reverse engineering, the distribution condition of physical attributes in a certain spatial region, called an attribute field, is obtained through simulation calculation or scanning by a scanner. The representation of the property field is typically represented by a finite number of discrete points and property values at the locations of the discrete points. However, in mathematical expression, a certain spatial region includes infinite points, and when data analysis is performed, the positions of the analysis points often cannot coincide with a limited number of points in the attribute field, and at this time, an interpolation algorithm is required to interpolate to obtain the attribute values of the analysis points.
In the field of reverse engineering or scientific calculation, the distribution of an attribute field obtained by measurement or calculation is discrete distribution, and the interpolation of the discretely distributed attribute is needed when an attribute value of any point in a space is required; the most applied method at present is an inverse distance weighted interpolation method, that is, N nearest points are found in the neighborhood of an interpolation point, then the distance between each point and the interpolation point is calculated, and interpolation calculation is performed according to the inverse proportion of the distance. However, the interpolation effect of the reverse distance weighted interpolation of the N-adjacent points in the non-uniformly sampled field data and the complex curved surface model is unsatisfactory, and the interpolation precision is poor. The reason is that the interpolation calculation method of the N adjacent points only considers the position factors of the interpolation points and the field data sampling points, and does not consider the topological relation between the field data sampling points.
Disclosure of Invention
The invention aims to solve the problems of low interpolation precision and low interpolation efficiency in the prior simulation technology, and provides a two-dimensional scalar field interpolation method and device based on discrete point representation and computer equipment.
The invention is realized by the following technical scheme, and on one hand, the invention provides a two-dimensional scalar field interpolation method based on discrete point representation, which comprises the following steps:
step 1, obtaining a discretely distributed scalar field and a coordinate position of a point to be interpolated;
step 2, carrying out triangular meshing on the discretely distributed scalar field, and dividing the two-dimensional plane into a plurality of triangular units;
step 3, calculating the central position of each triangular unit, and acquiring the central points of all the triangular units;
step 4, acquiring the triangle unit where the point to be interpolated is located according to the central points of all the triangle units;
and 5, performing linear interpolation in the triangular unit where the point to be interpolated is located to obtain the attribute value of the point to be interpolated.
Further, the step 3 further comprises: and combining the central points of all the triangular units in a KD-Tree form.
Further, the step 4 specifically includes: and acquiring the triangular unit where the point to be interpolated is positioned by using KD-Tree and a three-dimensional space algorithm.
Further, the obtaining the triangle unit where the point to be interpolated is located by using the KD-Tree and a three-dimensional space algorithm specifically includes:
step 4.1, setting a preset number;
4.2, calculating the distances between the central points of all the triangular units and the points to be interpolated, and selecting the preset central points with the shortest distances;
4.3, determining the triangular unit corresponding to each preset plurality of central points with the shortest distance as an adjacent triangular unit;
4.4, traversing all the adjacent triangular units, and judging whether the point to be interpolated is in the adjacent triangular units by adopting an area calculation method;
step 4.5, if the point to be interpolated is outside all the adjacent triangle units, returning to the step 4.1;
otherwise, acquiring the triangle unit where the point to be interpolated is located.
Further, the step 4.4 specifically includes:
step 4.4.1, respectively calculating the areas of the adjacent triangular units, and recording the areas as S i I is 1 … k, k is the number of the center points;
4.4.2, randomly selecting two vertexes of the adjacent triangular units, and forming a new triangular unit with the point to be interpolated;
4.4.3, respectively calculating the areas of the new triangular units, and summing the areas of all the new triangular units to obtain the sum of the total areas of the new triangular units, which is recorded as S;
step 4.4.4, respectively i Comparing with S, if S>S i Then the point to be interpolated is at S i The corresponding triangle unit is external;
if S ═ S i Then the point to be interpolated is at S i Corresponding triangular unit interior, and converting the S i And determining the corresponding triangle unit as the triangle unit where the point to be interpolated is located.
Further, the step 2 specifically includes:
and performing triangular meshing on the discretely distributed scalar field by using a Delaunay method, and dividing the two-dimensional plane into a plurality of triangular units.
Further, the step 5 specifically includes:
step 5.1, setting the coordinates of three vertexes of the triangle where the point to be interpolated is positioned as P 1 ,P 2 ,P 3 The corresponding attribute values are respectively V 1 ,V 2 ,V 3 The coordinate of the point to be interpolated is P, and the corresponding attribute value is V;
step 5.2, setting an error threshold value;
step 5.3, respectively calculating the distance between the point to be interpolated and the three vertexes to obtain the minimum distance;
step 5.4, if the minimum distance is smaller than the error threshold, setting the attribute value of the vertex corresponding to the minimum distance as the attribute value of the point to be interpolated; otherwise, executing step 5.5;
step 5.5, adding P 1 Point-to-point connection, and extending to point P 2 And P 3 On the straight line, cross over P 4 Point, calculate P 3 Point to P 4 Distance D of points 1 And P 2 To P 4 Distance D of 2
Obtain the attribute value of point P4 as
Figure BDA0003608266330000031
Calculated available P 4 Distance D from point to point P 3 And P 1 Distance D from point to P with your 4
Obtain the attribute value of P point as
Figure BDA0003608266330000032
In a second aspect, the present invention provides a two-dimensional scalar field interpolation apparatus based on discrete point representations, the apparatus comprising:
the scalar field and to-be-interpolated point coordinate acquisition module is used for acquiring the coordinate positions of the discretely distributed scalar field and to-be-interpolated point;
the scalar field triangular meshing module is used for carrying out triangular meshing on the discretely distributed scalar field and dividing the two-dimensional plane into a plurality of triangular units;
the central point acquisition module is used for calculating the central position of each triangular unit and acquiring the central points of all the triangular units;
the triangular unit obtaining module is used for obtaining a triangular unit where the point to be interpolated is located according to the central points of all the triangular units;
and the attribute value acquisition module of the point to be interpolated is used for carrying out linear interpolation in the triangular unit where the point to be interpolated is positioned to acquire the attribute value of the point to be interpolated.
In a third aspect, the present invention provides a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program stored by the memory performing the steps of a method of two-dimensional scalar field interpolation based on discrete point representations as described above.
In a fourth aspect, the present invention provides a computer readable storage medium having stored therein a plurality of computer instructions for causing a computer to perform the steps of a method of two-dimensional scalar field interpolation based on discrete point representations as described above.
The invention has the beneficial effects that:
1. the interpolation process introduces a Delaunay triangulation process to convert discrete field data expression into data expression with topological expression, establishes a topological relation of an attribute field of the discrete expression in a triangularization mode, divides a field area into a plurality of small triangular units, and has more definite and targeted interpolation input so as to improve the interpolation precision;
2. the triangular cells are searched by the KD-Tree formed by the cell centers, and the searching method of the KD-Tree is adopted, so that the global traversal searching is avoided, and the calculation efficiency is high;
3. the method of linear interpolation inside the triangular unit is adopted to replace inverse distance weighted interpolation, the interpolation method adopts linear interpolation inside the triangle, compared with inverse distance linear interpolation, the calculated amount is small, the efficiency is higher, the method can avoid the problem of abrupt change of the interpolation result, the transition is more uniform, and the interpolation precision is improved.
4. The method of the invention can also be extended to interpolation calculation of vector fields.
The method can solve the interpolation problem of the two-dimensional scalar field, and has higher efficiency and better interpolation precision compared with the prior method.
The invention is suitable for simulation in computer numerical simulation calculation or reverse engineering.
Drawings
In order to more clearly explain the technical solution of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious to those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of the method of the present invention;
FIG. 2 is a schematic diagram of a scalar field and a point to be interpolated according to the present invention;
FIG. 3 is a schematic diagram of scalar field triangulation of the present invention;
FIG. 4 is a schematic diagram of the center position of the triangular unit according to the present invention;
FIG. 5 is a schematic diagram of triangle units adjacent to a point to be interpolated according to the present invention;
FIG. 6 is a first schematic diagram of linear interpolation inside a triangle unit where a point to be interpolated is located according to the present invention;
FIG. 7 is a second schematic diagram of linear interpolation inside a triangle unit where a point to be interpolated is located according to the present invention;
FIG. 8 is a third schematic diagram of linear interpolation inside a triangle unit where a point to be interpolated is located according to the present invention;
FIG. 9 is a diagram of simulation effect based on an inverse distance linear interpolation method;
FIG. 10 is a diagram of simulation effect based on the interpolation method of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be illustrative of the present invention and are not to be construed as limiting the present invention.
Before describing embodiments of the present invention in detail, the names in the present invention are explained:
scalar: in contrast to vectors and tensors, scalar quantities are quantities without directions, and their full physical meaning, such as temperature, density, salinity, etc., can be described by only one numerical value.
Field: is the distribution of a physical quantity in a certain area, such as a magnetic field, a temperature field, a wind field, etc.
In one embodiment, a two-dimensional scalar field interpolation method based on discrete point representation is characterized by including:
step 1, obtaining a discretely distributed scalar field and a coordinate position of a point to be interpolated;
step 2, carrying out triangular meshing on the discretely distributed scalar field, and dividing the two-dimensional plane into a plurality of triangular units;
step 3, calculating the central position of each triangular unit, and acquiring the central points of all the triangular units;
step 4, acquiring the triangle unit where the point to be interpolated is located according to the central points of all the triangle units;
and 5, performing linear interpolation in the triangular unit where the point to be interpolated is located to obtain the attribute value of the point to be interpolated.
The embodiment provides an interpolation method for a two-dimensional scalar field, wherein topology among discrete points is generated by triangularizing a discretely sampled physical attribute field, then a triangular unit cell where the difference point is located is searched according to the position of the input difference point, and then an interpolated attribute value is obtained by interpolation in the triangular unit cell, so that the input of interpolation is more definite and targeted, and the interpolation precision is further improved; and the interpolation method adopts linear interpolation inside the triangle, compared with reverse distance linear interpolation, the calculation amount is small, the efficiency is higher, the method can avoid the problem of sudden change of the interpolation result, and the transition is more uniform.
In a second embodiment, the present embodiment is further limited to the two-dimensional scalar field interpolation method based on discrete point representation according to the first embodiment, and in the present embodiment, the step before the step 3 is further limited, and specifically includes:
and combining the central points of all the triangular units in a KD-Tree form.
In this embodiment, the KD-Tree is a data structure expression of computer graphics, and is implemented based on a basic data structure of a Tree and a graph, and can realize quick search and comparison of spatial points.
In a third embodiment, the present embodiment is further limited to the two-dimensional scalar field interpolation method based on discrete point representation described in the second embodiment, and in the present embodiment, the step 4 is further limited, and specifically includes:
and acquiring the triangular unit where the point to be interpolated is positioned by using KD-Tree and a three-dimensional space algorithm.
According to the implementation method, the advantages of KD-Tree rapid search and comparison are utilized, the triangular unit where the point to be interpolated is located can be rapidly searched in the space where the point to be interpolated is located according to a certain algorithm, global traversal retrieval is avoided, high calculation efficiency is achieved, and the efficiency of the interpolation method is improved.
In a fourth embodiment, the present embodiment is a further limitation on the two-dimensional scalar field interpolation method based on discrete point representation in the third embodiment, and in the present embodiment, the obtaining of the triangle unit where the point to be interpolated is located by using the KD-Tree and the three-dimensional space algorithm is further limited, and specifically includes:
step 4.1, setting a preset number;
4.2, calculating the distances between the central points of all the triangular units and the points to be interpolated, and selecting the preset central points with the shortest distances;
4.3, determining the triangular unit corresponding to each preset plurality of central points with the shortest distance as an adjacent triangular unit;
4.4, traversing all the adjacent triangle units, and judging whether the point to be interpolated is in the adjacent triangle unit by adopting an area calculation method;
step 4.5, if the point to be interpolated is outside all the adjacent triangle units, returning to the step 4.1;
otherwise, acquiring the triangle unit where the point to be interpolated is located.
In the embodiment, a specific algorithm for finding the triangle unit where the point to be interpolated is located is provided, and the algorithm can accurately find the triangle unit where the point to be interpolated is located, so that the interpolation input is more definite and targeted, and the interpolation precision is further improved.
Fifth embodiment is further limited to the two-dimensional scalar field interpolation method based on discrete point representation according to the fourth embodiment, and in the present embodiment, the step 4.4 is further limited, and specifically includes:
step 4.4.1, respectively calculating the areas of the adjacent triangular units, and recording the areas as S i Where i is 1 … k, k isThe number of the dry central points;
4.4.2, randomly selecting two vertexes of the adjacent triangular units, and forming a new triangular unit with the point to be interpolated;
4.4.3, respectively calculating the areas of the new triangular units, and summing the areas of all the new triangular units to obtain the sum of the total areas of the new triangular units, which is recorded as S;
step 4.4.4, respectively i Comparing with S if S>S i Then the point to be interpolated is at S i The corresponding triangle unit is external;
if S is equal to Si, the point to be interpolated is in the triangular unit corresponding to Si, and the S is added i And determining the corresponding triangle unit as the triangle unit where the point to be interpolated is located.
In the embodiment, the triangle unit where the point to be interpolated is located is judged by adopting a triangle area calculation method, the relation between the point to be interpolated and the adjacent triangle unit is constructed by constructing a new triangle, and the adjacent triangle unit where the point to be interpolated is located can be more accurately judged by comparing the areas, so that the interpolation precision is improved.
Sixth embodiment, the present embodiment is further limited to the two-dimensional scalar field interpolation method based on discrete point representation according to the first embodiment, and in the present embodiment, the step 2 is further limited, and specifically includes:
and (3) performing triangular meshing on the discretely distributed scalar field by using a Delaunay method, and dividing the two-dimensional plane into a plurality of triangular units.
In the embodiment, the Delaunay triangulation process is introduced in the interpolation process to convert the discrete field data expression into the data expression with the topological representation, the topological relation is established in the attribute field of the discrete representation in the triangulation mode, and the field area is divided into a plurality of small triangular units, so that the interpolation input is more definite.
Seventh embodiment, the present embodiment is further limited to the two-dimensional scalar field interpolation method based on discrete point representation according to the first embodiment, and in the present embodiment, the step 5 is further limited, and specifically includes:
step 5.1, setting the coordinates of three vertexes of the triangle where the point to be interpolated is positioned as P 1 ,P 2 ,P 3 The corresponding attribute values are respectively V 1 ,V 2 ,V 3 The coordinate of the point to be interpolated is P, and the corresponding attribute value is V;
step 5.2, setting an error threshold value;
step 5.3, respectively calculating the distance between the point to be interpolated and the three vertexes to obtain the minimum distance;
step 5.4, if the minimum distance is smaller than the error threshold, setting the attribute value of the vertex corresponding to the minimum distance as the attribute value of the point to be interpolated; otherwise, executing step 5.5;
step 5.5, adding P 1 Point-to-point connection, and extending to point P 2 And P 3 On the straight line, cross over P 4 Point, calculate P 3 Point to P 4 Distance D of points 1 And P 2 To P 4 Distance D of 2
Obtain the attribute value of point P4 as
Figure BDA0003608266330000071
Calculated available P 4 Distance D from point to point P 3 And P 1 Distance D from point to P with your 4
Obtain the attribute value of P point as
Figure BDA0003608266330000072
In the embodiment, a specific algorithm is provided for the triangle idea mentioned in step 5, and a specific interpolation method is provided, wherein the interpolation method adopts triangle internal linear interpolation, so that compared with inverse distance linear interpolation, the calculation amount is small, the efficiency is higher, the method can avoid the mutation problem of the interpolation result, and the transition is more uniform.
Eighth embodiment, this embodiment is based on the above-described example of the two-dimensional scalar field interpolation method based on discrete point representation, and specifically includes:
step one, inputting a discretely distributed scalar field and a coordinate position of a point to be interpolated. The expression of a discretely distributed scalar field is N coordinate points in a certain space region, and the variable values of the coordinate points are mathematically expressed as:
F={(X 1 ,Y 1 ,V 1 ),(X 2 ,Y 2 ,V 2 ),…(X i ,Y i ,V i ),…(X n ,Y n ,V n )}
wherein F is a scalar field, Xi and Yi, i is 1,2,3, is a point coordinate in the scalar field, Vi, i is 1,2,3, is an attribute value of a point in the scalar field;
the input point to be interpolated is represented as:
P={X,Y}
wherein, P is a point to be interpolated, and X and Y are coordinates of the point to be interpolated.
As shown in fig. 2, the dots represent the distribution of the discrete scalar field, and the square dots represent the points to be interpolated.
And step two, performing triangular meshing on the discretely distributed scalar field by using a Delaunay method, and dividing the two-dimensional plane into a plurality of triangular areas, as shown in FIG. 3.
And step three, calculating the central position of each triangle, and combining the points in a KD-Tree form, as shown in figure 4.
And fourthly, searching the triangular unit cell where the interpolation point is located by using the KD-Tree and a three-dimensional space algorithm. The method comprises the following specific steps:
using the coordinates of the point to be interpolated to search the 3 triangle units adjacent to the point in the KD-Tree, as shown in fig. 5;
traversing the three triangle units, judging whether the point is in the triangle by adopting an area calculation method, wherein the method comprises the following steps:
2.1) computing triangles from three pointsArea S of the shape unit 0 ;;
2.2) any two points of the triangle unit and the point to be interpolated form three new triangles, and the areas S of the three new triangles are calculated General assembly ;;
2.3) if S General assembly >S 0 If the two are equal, the point to be interpolated is inside the triangle unit.
3) And (3) through traversal in the step 2), if the points to be interpolated are judged to be positioned outside the three triangles, returning to the step 1), finding 6 triangle units adjacent to the points to be interpolated for judgment, and repeating the steps in such a way, wherein the number of the adjacent units searched is doubled each time until the triangle unit where the interpolation points are positioned is found.
Step five, performing linear interpolation inside the triangular unit where the point to be interpolated is located, wherein the process is as follows:
5.1) assuming that the three vertex coordinates of the triangle unit are P respectively 1 ,P 2 ,P 3 The physical attribute values of the corresponding points are respectively V 1 ,V 2 ,V 3 The coordinate of the point to be interpolated is P, and the attribute value of the point to be calculated is V, as shown in fig. 6;
5.2) if P points with P 1 If the distance of the points is very close and is less than the error threshold value, the V is directly connected 1 Outputting as a V value, otherwise, executing the next step;
5.3) from P 1 Point connection P, extending to P 2 ,P 3 The straight line intersects with P 4 Point, can obtain P 3 Point to P 4 Distance of points being D 1 ,P 2 To P 4 A distance of D 2 As shown in fig. 7;
then P 4 The attribute value of a point is
Figure BDA0003608266330000081
5.4) calculation of P 4 Distance of P is D 3 ,P 1 Distance of P is D 4 As shown in FIG. 8,
Then the attribute value of point P is
Figure BDA0003608266330000082
In this embodiment, for a fixed example, 9864 points are input into a scalar field, an interpolation test is performed on 1000 test points, and the results of comparing the efficiency of two methods on a common PC working machine are shown in table 1:
TABLE 1 comparison data sheet of operating efficiency
Figure BDA0003608266330000091
As can be seen from Table 1, the program running speed based on the method of the present invention is relatively fast, so that the interpolation method adopts the linear interpolation inside the triangle, and compared with the linear interpolation of the inverse distance, the calculation amount is small, and the efficiency is higher.
As shown in fig. 9 and 10, the method of the present invention can avoid the problem of abrupt change of the interpolation result, and the transition is relatively uniform. Under the condition that the spatial distribution of data points of an input field is not uniform and the data amount is small, the situation that data are suddenly changed easily occurs in inverse distance linear interpolation, and the situation that the interpolation result cannot be smoothly transited occurs because the interpolation points suddenly change near the position between two data points with the same distance with the two data points, so that sudden change occurs. The method described herein can avoid such abrupt changes by the ratio of the two distances within the triangle (these ratios can vary from 0 to 1), and thus the transition is relatively uniform.

Claims (10)

1. A method of interpolation of a two-dimensional scalar field based on a discrete point representation, the method comprising:
step 1, obtaining a discretely distributed scalar field and a coordinate position of a point to be interpolated;
step 2, carrying out triangular meshing on the discretely distributed scalar field, and dividing the two-dimensional plane into a plurality of triangular units;
step 3, calculating the central position of each triangular unit, and acquiring the central points of all the triangular units;
step 4, acquiring the triangle unit where the point to be interpolated is located according to the central points of all the triangle units;
and 5, performing linear interpolation in the triangular unit where the point to be interpolated is located to obtain the attribute value of the point to be interpolated.
2. A method of interpolation of a two-dimensional scalar field based on discrete point representation according to claim 1, wherein said step 3 further comprises: and combining the central points of all the triangular units in a KD-Tree form.
3. A two-dimensional scalar field interpolation method based on discrete point representation according to claim 2, wherein the step 4 specifically includes: and acquiring the triangular unit where the point to be interpolated is positioned by using KD-Tree and a three-dimensional space algorithm.
4. The two-dimensional scalar field interpolation method based on discrete point representation according to claim 3, wherein the obtaining of the triangle unit where the point to be interpolated is located by using the KD-Tree and a three-dimensional space algorithm specifically includes:
step 4.1, setting a preset number;
4.2, calculating the distances between the central points of all the triangular units and the points to be interpolated, and selecting the preset central points with the shortest distances;
4.3, determining the triangular unit corresponding to each preset plurality of central points with the shortest distance as an adjacent triangular unit;
4.4, traversing all the adjacent triangle units, and judging whether the point to be interpolated is in the adjacent triangle unit by adopting an area calculation method;
step 4.5, if the point to be interpolated is outside all the adjacent triangle units, returning to the step 4.1;
otherwise, acquiring the triangle unit where the point to be interpolated is located.
5. A method of interpolation of a two-dimensional scalar field based on discrete point representation according to claim 4, characterized in that said step 4.4 specifically comprises:
step 4.4.1, respectively calculating the areas of the adjacent triangular units, and recording the areas as S i I is 1 … k, k is the number of the center points;
4.4.2, randomly selecting two vertexes of the adjacent triangular units, and forming a new triangular unit with the point to be interpolated;
4.4.3, respectively calculating the areas of the new triangular units, and summing the areas of all the new triangular units to obtain the sum of the total areas of the new triangular units, which is recorded as S;
step 4.4.4, respectively i Comparing with S, if S>S i Then the point to be interpolated is at S i The corresponding triangle unit is external;
if S ═ S i Then the point to be interpolated is at S i Corresponding triangular unit interior, and converting the S i And determining the corresponding triangle unit as the triangle unit where the point to be interpolated is located.
6. The two-dimensional scalar field interpolation method based on discrete point representation according to claim 1, wherein the step 2 specifically comprises:
and performing triangular meshing on the discretely distributed scalar field by using a Delaunay method, and dividing the two-dimensional plane into a plurality of triangular units.
7. The two-dimensional scalar field interpolation method based on discrete point representation according to claim 1, wherein the step 5 specifically includes:
step 5.1, setting the coordinates of three vertexes of the triangle where the point to be interpolated is positioned as P 1 ,P 2 ,P 3 The corresponding attribute values are respectively V 1 ,V 2 ,V 3 The coordinate of the point to be interpolated is P, and the corresponding attribute value is V;
step 5.2, setting an error threshold value;
step 5.3, respectively calculating the distance between the point to be interpolated and the three vertexes to obtain the minimum distance;
step 5.4, if the minimum distance is smaller than the error threshold, setting the attribute value of the vertex corresponding to the minimum distance as the attribute value of the point to be interpolated; otherwise, executing step 5.5;
step 5.5, adding P 1 Point-to-point connection, and extending to point P 2 And P 3 On the straight line, cross over P 4 Point, calculate P 3 Point to P 4 Distance D of points 1 And P 2 To P 4 Distance D of 2
Obtain the attribute value of point P4 as
Figure FDA0003608266320000021
Calculated available P 4 Distance D from point to point P 3 And P 1 Distance D from point to P with your 4
Obtain the attribute value of P point as
Figure FDA0003608266320000022
8. An apparatus for two-dimensional scalar field interpolation based on discrete point representations, the apparatus comprising:
the scalar field and point to be interpolated coordinate acquisition module is used for acquiring the coordinate positions of the discretely distributed scalar field and the point to be interpolated;
the scalar field triangular meshing module is used for carrying out triangular meshing on the discretely distributed scalar field and dividing the two-dimensional plane into a plurality of triangular units;
the central point acquisition module is used for calculating the central position of each triangular unit and acquiring the central points of all the triangular units;
the triangle unit acquisition module is used for acquiring the triangle unit where the point to be interpolated is located according to the central points of all the triangle units;
and the attribute value acquisition module of the point to be interpolated is used for carrying out linear interpolation in the triangular unit where the point to be interpolated is positioned to acquire the attribute value of the point to be interpolated.
9. A computer device comprising a memory and a processor, the memory having stored therein a computer program, characterized in that the steps of the method of any of claims 1 to 7 are performed when the processor runs the computer program stored by the memory.
10. A computer-readable storage medium having stored thereon a plurality of computer instructions for causing a computer to perform the method of any one of claims 1 to 7.
CN202210422038.2A 2022-04-21 2022-04-21 Two-dimensional scalar field interpolation method and device based on discrete point representation and computer equipment Pending CN114818309A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210422038.2A CN114818309A (en) 2022-04-21 2022-04-21 Two-dimensional scalar field interpolation method and device based on discrete point representation and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210422038.2A CN114818309A (en) 2022-04-21 2022-04-21 Two-dimensional scalar field interpolation method and device based on discrete point representation and computer equipment

Publications (1)

Publication Number Publication Date
CN114818309A true CN114818309A (en) 2022-07-29

Family

ID=82504716

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210422038.2A Pending CN114818309A (en) 2022-04-21 2022-04-21 Two-dimensional scalar field interpolation method and device based on discrete point representation and computer equipment

Country Status (1)

Country Link
CN (1) CN114818309A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116127792A (en) * 2023-04-17 2023-05-16 北京世冠金洋科技发展有限公司 Interpolation method and device for scattered data

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116127792A (en) * 2023-04-17 2023-05-16 北京世冠金洋科技发展有限公司 Interpolation method and device for scattered data
CN116127792B (en) * 2023-04-17 2023-07-04 北京世冠金洋科技发展有限公司 Interpolation method and device for scattered data

Similar Documents

Publication Publication Date Title
Shi et al. Adaptive simplification of point cloud using k-means clustering
Park et al. Discrete sibson interpolation
US20090058853A1 (en) Method for meshing a curved surface
CN111831660B (en) Method and device for evaluating metric space division mode, computer equipment and storage medium
Skytt et al. Locally refined spline surfaces for representation of terrain data
CN115357849B (en) Method and device for calculating wall surface distance under Cartesian grid
AU2005241463A1 (en) System and method for approximating an editable surface
CN101751695A (en) Estimating method of main curvature and main direction of point cloud data
Kaul et al. Computing Minkowski sums of plane curves
CN105654483A (en) Three-dimensional point cloud full-automatic registration method
JP2006031561A (en) High-dimensional texture mapping device, method and program
CN108364331A (en) A kind of isopleth generation method, system and storage medium
Lewis et al. Scattered data interpolation and approximation for computer graphics
CN114818309A (en) Two-dimensional scalar field interpolation method and device based on discrete point representation and computer equipment
CN115345988A (en) Secondary error measurement edge folding BIM lightweight method based on vertex importance
Li et al. An improved Poisson surface reconstruction algorithm
CN113593043B (en) Point cloud three-dimensional reconstruction method and system based on generation countermeasure network
Hu et al. NSGA-II approach for proper choice of nodes and knots in B-spline curve interpolation
Huang et al. Meshode: A robust and scalable framework for mesh deformation
CN106875458B (en) Parallelization two-dimensional flow field multi-metadata dynamic visualization system
CN108731616B (en) Self-adaptive distribution method for tooth surface measuring points of spiral bevel gear based on cloud model
LU102643B1 (en) An Inverse-distance Weighting Blending Interpolation Method Based on Data Science Visualization
Li et al. Contracting medial surfaces isotropically for fast extraction of centred curve skeletons
Du et al. Adaptive out-of-core simplification of large point clouds
Nagakura et al. Automatic quadrilateral mesh generation for FEM using dynamic bubble system

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