Three-dimensional parameterized graph generation method and related device

By converting the latitude and longitude coordinates into world coordinates, calculating the graphic size parameters, and drawing and transforming the graphic under the local coordinate system, the problem of transformation of the three -dimensional parameterized graphic graphics in the geographic coordinate system realizes use.

CN119379939APending Publication Date: 2025-01-28BEIJING ZHONGKE JUNTU INFORMATION TECH CO LTD +5
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411475441.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

Under the geographical coordinate system, the physical length represented by the first degree longitude and the first degree latitude are not equal, resulting in deformation of the three-dimensional parameterized graphics generated using the longitude coordinates, which cannot meet the user's graphics usage needs in three-dimensional scenes.

Method used

By converting the latitude and longitude coordinates of multiple graphics to the three -dimensional parameterized graphic in geographical coordinate system, the latitude and longitude coordinates of the geographical coordinate system are converted into a world coordinate under the world coordinate system, calculated the graphic size parameters, and used the center point and the center point and the local coordinate system of the xoy side. The graphic size parameter draws the plane figure, and then rotates and moves in a local coordinate system to obtain three -dimensional parameterized graphics.

Benefits of technology

Effectively solve the problem of three -dimensional parameterized graphic deformation, ensure the accurate display and use of graphics in the three -dimensional scene, and meet the user's graphic needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119379939A_ABST
    Figure CN119379939A_ABST
Patent Text Reader

Abstract

The invention discloses a three-dimensional parameterized graph generation method and a related device, and the method comprises the steps: obtaining the latitude and longitude coordinates of a plurality of graph key points of a to-be-generated three-dimensional parameterized graph in a geographic coordinate system, and converting the latitude and longitude coordinates into world coordinates in a world coordinate system; the method comprises the following steps: acquiring a plurality of graphic key points, acquiring graphic size parameters in a world coordinate system according to world coordinates corresponding to the plurality of graphic key points, drawing a corresponding plane graph by utilizing a central point and the graphic size parameters in a local coordinate system of an XOY surface, and rotating and translating the plane graph in the local coordinate system to obtain a three-dimensional parameterized graph. According to the method, the longitude and latitude coordinates are converted into the world coordinates, the problem of unequal physical lengths is solved, the graph size parameters in the world coordinate system are calculated, the plane graph corresponding to the graph size parameters is drawn in the local coordinate system of the XOY plane, rotation and translation are performed, the problem of deformation of the three-dimensional parameterized graph is solved, and the method is suitable for the three-dimensional parameterized graph. And therefore, the graphic use requirements of the user in the three-dimensional scene are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of graphics drawing technology, and more specifically, to a method for generating three-dimensional parameterized graphics and a related device. Background Art

[0002] A 3D parametric graphic is a 3D graphic generated by a parametric method. The shape, size, position and other characteristics of the 3D graphic are controlled by a set of parameters. At present, 3D parametric graphics are usually generated in a 3D dynamic plotting system. The 3D dynamic plotting system supports a variety of graphic objects. When generating 3D parametric graphics in a 3D dynamic plotting system, the graphics are mainly drawn based on the longitude and latitude coordinates of the key points of the graphics in the geographic coordinate system. For example, a circle on the surface of a 3D sphere is generated based on the longitude and latitude coordinates of the center point of the circle and a point on the circle.

[0003] However, in the geographic coordinate system, the physical lengths represented by one degree of longitude (except the equator) and one degree of latitude are not equal, resulting in deformation of three-dimensional parametric graphics generated using longitude and latitude coordinates as parameters, which cannot meet the user's graphics usage needs in three-dimensional scenes. Summary of the invention

[0004] In view of this, the present invention discloses a method for generating three-dimensional parameterized graphics and related devices to solve the problem of deformation of three-dimensional parameterized graphics, thereby meeting the user's demand for graphics use in three-dimensional scenes.

[0005] A method for generating a three-dimensional parameterized graphic, comprising:

[0006] Acquire the latitude and longitude coordinates of a plurality of key graphic points of the to-be-generated three-dimensional parametric graphic in a geographic coordinate system, wherein the plurality of key graphic points include: a center point;

[0007] Convert each of the latitude and longitude coordinates into world coordinates in a world coordinate system;

[0008] In the world coordinate system, obtaining a graphic size parameter according to the world coordinates corresponding to the multiple graphic key points;

[0009] In the local coordinate system of the XOY plane, using the center point and the graphic size parameters to draw the corresponding plane graphic;

[0010] The plane figure is rotated and translated in the local coordinate system to obtain a three-dimensional parameterized figure.

[0011] Optionally, rotating and translating the plane figure in the local coordinate system to obtain a three-dimensional parameterized figure includes:

[0012] In the local coordinate system, the normal vector of the XOY plane is rotated to the vector in the direction of the line connecting the center point of the plane figure and the sphere center of the three-dimensional scene to obtain a rotation matrix;

[0013] Multiplying all points on the plane figure by the rotation matrix to complete the rotation of the plane figure in the local coordinate system;

[0014] The rotated plane figure is translated from the center of the sphere to the position where the center point is located, and a translation transformation is performed to obtain the three-dimensional parameterized figure.

[0015] Optionally, the step of obtaining the latitude and longitude coordinates of a plurality of key graphic points of the to-be-generated three-dimensional parametric graphic in a geographic coordinate system includes:

[0016] The latitude and longitude coordinates of the multiple graphic key points of the perfect circle to be generated on the surface of the three-dimensional spherical surface in the geographic coordinate system are obtained, and the multiple graphic key points include: points on the circle and the center of the circle as the center point.

[0017] Optionally, obtaining the graphic size parameters according to the world coordinates corresponding to the multiple graphic key points in the world coordinate system includes:

[0018] In the world coordinate system, the spherical distance between any two points on the sphere is determined according to the world coordinates corresponding to the center of the circle and the world coordinates corresponding to the point on the circle, and the spherical distance is determined as the actual circle radius value.

[0019] Optionally, drawing the corresponding plane graphic using the world coordinates of the center point and the graphic size parameters in the local coordinate system of the XOY plane includes:

[0020] In the local coordinate system, based on the world coordinates of the circle center and the actual circle radius value, a fitting point method is used to draw a corresponding plane circle.

[0021] Optionally, rotating and translating the plane figure in the local coordinate system to obtain a three-dimensional parameterized figure includes:

[0022] In the local coordinate system, the vector of the center of the plane circle and the center of the sphere of the three-dimensional scene in the direction of the line is rotated to the direction of the normal vector of the XOY plane to obtain a target rotation matrix;

[0023] Multiply all points on the plane circle by the target rotation matrix to complete the rotation of the plane circle in the local coordinate system;

[0024] The rotated plane circle is translated from the center of the sphere to the position where the center of the circle is located, and a translation transformation is performed to obtain a perfect circle on the surface of the three-dimensional sphere.

[0025] A device for generating three-dimensional parameterized graphics, comprising:

[0026] A coordinate acquisition unit, used to acquire the latitude and longitude coordinates of a plurality of key graphic points of the to-be-generated three-dimensional parametric graphic in a geographic coordinate system, wherein the plurality of key graphic points include: a center point;

[0027] A coordinate conversion unit, used for converting each of the latitude and longitude coordinates into a world coordinate in a world coordinate system;

[0028] A graphics size acquisition unit, configured to obtain graphics size parameters according to the world coordinates corresponding to the multiple graphics key points in the world coordinate system;

[0029] A plane graphics drawing unit, used for drawing a corresponding plane graphics using the center point and the graphics size parameters in a local coordinate system of the XOY plane;

[0030] The parameterized graphics generating unit is used to rotate and translate the plane graphics in the local coordinate system to obtain a three-dimensional parameterized graphics.

[0031] Optionally, the parameterized graphics generating unit includes:

[0032] A rotation matrix generating subunit, used for rotating the normal vector of the XOY plane to the vector in the direction of the line connecting the center point of the plane figure and the sphere center of the three-dimensional scene in the local coordinate system to obtain a rotation matrix;

[0033] A graphics rotation subunit, used for multiplying all points on the plane graphics by the rotation matrix to complete the rotation of the plane graphics in the local coordinate system;

[0034] The graphic translation subunit is used to translate the rotated plane graphic from the center of the sphere to the position where the center point is located, perform a translation transformation, and obtain the three-dimensional parameterized graphic.

[0035] A computer storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, the method for generating three-dimensional parameterized graphics described above is implemented.

[0036] An electronic device, comprising: a memory and a processor;

[0037] The memory is used to store at least one instruction;

[0038] The processor is used to execute the at least one instruction to implement the above-mentioned method for generating three-dimensional parameterized graphics.

[0039] As can be seen from the above technical solutions, the present invention discloses a method for generating three-dimensional parametric graphics and related devices, obtains the longitude and latitude coordinates of multiple key graphic points of the three-dimensional parametric graphics to be generated in the geographic coordinate system, converts each longitude and latitude coordinate into the world coordinates in the world coordinate system, obtains the graphic size parameters according to the world coordinates corresponding to the multiple key graphic points in the world coordinate system, draws the corresponding plane graphics using the center point and the graphic size parameters in the local coordinate system of the XOY plane, and obtains the three-dimensional parametric graphics by rotating and translating the plane graphics in the local coordinate system. The present application solves the problem of unequal physical lengths by converting the longitude and latitude coordinates into world coordinates, calculates the graphic size parameters in the world coordinate system, and rotates and translates the plane graphics corresponding to the graphic size parameters after drawing them in the local coordinate system of the XOY plane, which can effectively solve the problem of deformation of the three-dimensional parametric graphics, thereby meeting the user's graphic usage needs in three-dimensional scenes. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the disclosed drawings without paying creative work.

[0041] Figure 1 A flow chart of a method for generating a three-dimensional parameterized graphic disclosed in an embodiment of the present invention;

[0042] Figure 2 A flow chart of a method for rotating and translating a plane figure in a local coordinate system to obtain a three-dimensional parameterized figure disclosed in an embodiment of the present invention;

[0043] Figure 3 (a) shows a circle drawn directly in the latitude and longitude coordinate system using the traditional solution;

[0044] FIG3 (b) is a circle drawn in the world coordinate system using the solution of the present invention;

[0045] Figure 4 A schematic diagram of the structure of a device for generating a three-dimensional parameterized graphic disclosed in an embodiment of the present invention;

[0046] Figure 5 A schematic diagram of the structure of a parameterized graphics generation unit disclosed in an embodiment of the present invention;

[0047] Figure 6 The present invention is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] The embodiment of the present invention discloses a method for generating a three-dimensional parametric graphic and a related device, which obtains the longitude and latitude coordinates of multiple key graphic points of the three-dimensional parametric graphic to be generated in the geographic coordinate system, converts each longitude and latitude coordinate into the world coordinate in the world coordinate system, obtains the graphic size parameters according to the world coordinates corresponding to the multiple key graphic points in the world coordinate system, draws the corresponding plane graphic using the center point and the graphic size parameters in the local coordinate system of the XOY plane, and obtains the three-dimensional parametric graphic by rotating and translating the plane graphic in the local coordinate system. The present application solves the problem of unequal physical lengths by converting the longitude and latitude coordinates into the world coordinates, calculates the graphic size parameters in the world coordinate system, and rotates and translates the plane graphic corresponding to the graphic size parameters after drawing them in the local coordinate system of the XOY plane, which can effectively solve the problem of deformation of the three-dimensional parametric graphic, thereby meeting the user's graphic usage needs in three-dimensional scenes.

[0050] See also Figure 1 , a flow chart of a method for generating a three-dimensional parameterized graphic disclosed in an embodiment of the present invention, the method is applied to a three-dimensional dynamic plotting system, the method comprising:

[0051] Step S101, obtaining the longitude and latitude coordinates of a plurality of key points of a three-dimensional parametric graphic to be generated in a geographic coordinate system.

[0052] The basis of the 3D dynamic plotting system is the Geographic Information System, and the basic data of the Geographic Information System is usually the geographic coordinate system. Based on this, when the 3D dynamic plotting system generates a 3D parametric graphic, the application obtains the latitude and longitude coordinates of multiple key points of the 3D parametric graphic to be generated in the geographic coordinate system.

[0053] Among them, the multiple graphic key points include: a center point.

[0054] Taking multiple key graphic points as examples, the key graphic points of a circle include: a center point (i.e., the center of the circle) and a point on the circle; the key graphic points of an ellipse include: a center point, a major semi-axis point, and a minor semi-axis point.

[0055] Step S102: convert each of the latitude and longitude coordinates into world coordinates in a world coordinate system.

[0056] Longitude and latitude are spherical coordinate systems for locations on the surface of the earth, with longitude representing the east-west direction and latitude representing the north-south direction. The longitude and latitude coordinates are on the sphere, so the physical lengths (such as distances) of different locations are not equal, especially in high-latitude areas. That is, in the geographic coordinate system, the physical lengths represented by one degree of longitude (except the equator) and one degree of latitude are not equal, causing deformation in the three-dimensional parametric graphics generated using longitude and latitude coordinates as parameters. Based on this, this application converts the longitude and latitude coordinates of the key points of the graphics in the geographic coordinate system into world coordinates in the world coordinate system.

[0057] The world coordinate system is a reference or absolute coordinate system used to determine the position of a point in space. It describes the position of any point in space by establishing a fixed reference system.

[0058] World coordinates usually refer to a rectangular coordinate system in a plane or three-dimensional space, in which physical lengths (such as distances) are usually uniform, making them easy to measure and calculate.

[0059] Therefore, after converting the latitude and longitude coordinates to world coordinates, the problem of unequal physical lengths can be solved.

[0060] Step S103: in the world coordinate system, obtaining a graphic size parameter according to the world coordinates corresponding to the multiple graphic key points.

[0061] In the world coordinate system, the distance between two key points of a graphic is calculated to obtain the graphic size parameters, such as the radius of a circle, the major semi-axis of an ellipse, the minor semi-axis of an ellipse, the length and width of a rectangle, and the side length of a square.

[0062] Step S104: In the local coordinate system of the XOY plane, a corresponding plane figure is drawn using the center point and the figure size parameters.

[0063] The plane figure drawn is the plane figure corresponding to the three-dimensional parameterized figure.

[0064] The XOY plane generally refers to a plane formed by the X-axis and the Y-axis in a three-dimensional rectangular coordinate system.

[0065] The local coordinate system takes the center of the object as the coordinate origin, and the object's rotation, translation and other operations are all performed around this local coordinate system.

[0066] In the local coordinate system of the XOY plane, the present application uses the center point of the graphic on the XOY plane as the coordinate origin, and draws the plane graphic corresponding to the three-dimensional parameterized graphic in combination with the graphic size parameters.

[0067] Step S105: rotating and translating the plane figure in the local coordinate system to obtain a three-dimensional parameterized figure.

[0068] The present application obtains a three-dimensional parameterized graphic by rotating and translating the platform graphic in the local coordinate system, converting the non-deformed graphic drawn in the local coordinate system to the position of the center point in the three-dimensional scene for display.

[0069] In summary, the present invention discloses a method for generating a three-dimensional parametric graphic, obtaining the longitude and latitude coordinates of multiple key graphic points of the three-dimensional parametric graphic to be generated in the geographic coordinate system, converting each longitude and latitude coordinate into the world coordinate in the world coordinate system, obtaining the graphic size parameters according to the world coordinates corresponding to the multiple key graphic points in the world coordinate system, drawing the corresponding plane graphic using the center point and the graphic size parameters in the local coordinate system of the XOY plane, and obtaining the three-dimensional parametric graphic by rotating and translating the plane graphic in the local coordinate system. The present application solves the problem of unequal physical lengths by converting the longitude and latitude coordinates into the world coordinates, and can effectively solve the problem of deformation of the three-dimensional parametric graphic by calculating the graphic size parameters in the world coordinate system, and rotating and translating the plane graphic corresponding to the graphic size parameters after drawing them in the local coordinate system of the XOY plane, thereby meeting the user's graphic usage needs in three-dimensional scenes.

[0070] In one embodiment, see Figure 2 , a flow chart of a method for rotating and translating a plane figure in a local coordinate system to obtain a three-dimensional parameterized figure disclosed in an embodiment of the present invention, the method comprising:

[0071] Step S201: In the local coordinate system of the XOY plane, the normal vector of the XOY plane is rotated to the vector in the direction of the line connecting the center point of the plane figure and the center of the sphere of the three-dimensional scene to obtain a rotation matrix.

[0072] The normal vector of the XOY plane refers to the vector perpendicular to the XOY plane, that is, the Z-axis direction.

[0073] A rotation matrix is ​​a matrix that, when multiplied by a vector, changes the direction of the vector without changing its magnitude, and preserves the "handedness" of the vector (i.e., does not change a right-handed coordinate system to a left-handed coordinate system, or vice versa).

[0074] The column vectors and row vectors of the rotation matrix are both unit vectors and are orthogonal to each other.

[0075] Step S202: multiply all points on the plane figure by the rotation matrix to complete the rotation of the plane figure in the local coordinate system.

[0076] After obtaining the rotation matrix, the present application completes the rotation of the plane figure in the local coordinate system by multiplying all points on the plane figure by the rotation matrix, that is, each point of the plane figure undergoes the same rotation transformation according to the rotation matrix.

[0077] Step S203: translate the rotated plane figure from the center of the sphere to the position where the center point is located, perform translation transformation, and obtain a three-dimensional parameterized figure.

[0078] The three-dimensional parameterized figure is obtained by translating the rotated plane figure from the center of the sphere to the position where the center point of the plane figure is located and performing a translation transformation.

[0079] In summary, the present invention displays the indeformed plane graphics drawn in the local coordinate system of the XOY plane by rotation and translation to the position of the center point of the graphics in the three-dimensional scene, thereby meeting the user's graphics usage needs in the three-dimensional scene.

[0080] Taking the three-dimensional parameterized graphic as a perfect circle on the surface of a three-dimensional sphere as an example, step S101 may specifically include:

[0081] The latitude and longitude coordinates of multiple key graphic points of the perfect circle on the surface of the three-dimensional spherical surface to be generated in the geographic coordinate system are obtained, wherein the multiple key graphic points include: points on the circle and the center of the circle as the center point.

[0082] Correspondingly, step S102 may specifically include:

[0083] Convert the longitude and latitude coordinates of the point on the circle and the center of the circle into world coordinates in the world coordinate system.

[0084] Correspondingly, step S103 may specifically include:

[0085] In the world coordinate system, the spherical distance between any two points on the sphere is determined according to the world coordinates corresponding to the center of the circle and the world coordinates corresponding to the point on the circle, and the spherical distance is determined as the actual circle radius value.

[0086] The spherical distance refers to the length of the shortest line between two points on the sphere, which is the length of the minor arc of the great circle passing through the two points (i.e., the circle obtained by cutting the sphere with a plane passing through the center of the sphere). In other words, the spherical distance is the length of the great arc between the two points. The spherical distance in this application is the spherical distance between the center of the circle and a point on the circle.

[0087] The specific calculation process of the spherical distance can be found in existing mature solutions and will not be repeated here.

[0088] Correspondingly, step S104 may specifically include:

[0089] In the local coordinate system of the XOY plane, based on the world coordinates of the center of the circle and the actual circle radius value, a fitting point method is used to draw the corresponding plane circle.

[0090] In practical applications, the number of fitting points used to draw a plane circle is determined according to actual needs. For example, the number of fitting points may be 18, 36, 72 or more.

[0091] The fewer the number of fitting points, the less smooth the circle drawn, and the more the number of fitting points, the smoother the circle drawn. However, when the number of fitting points is too large, it is easy to cause a waste of resources.

[0092] Preferably, in the local coordinate system of the XOY plane, based on the world coordinates of the circle center and the actual circle radius value, 72 fitting points are used to draw the corresponding plane circle.

[0093] The process of determining the 72 fitting points is as follows: when drawing a plane circle, the center of the circle and the actual radius of the circle are known, and the points on the circle are solved. The circumference of the circle is 360 degrees. This application finds a point on the circle every 5 degrees, and obtains 72 points on the circle, that is, 72 fitting points. By connecting the 72 fitting points, the corresponding plane circle is drawn.

[0094] Correspondingly, step S105 may specifically include:

[0095] In the local coordinate system of the XOY plane, the normal vector of the XOY plane is rotated to the vector in the direction of the line connecting the center of the plane circle and the center of the sphere of the three-dimensional scene to obtain a target rotation matrix;

[0096] Multiply all points on the plane circle by the target rotation matrix to complete the rotation of the plane circle in the local coordinate system;

[0097] The rotated plane circle is translated from the center of the sphere to the position where the center of the circle is located, and a translation transformation is performed to obtain a perfect circle on the surface of the three-dimensional sphere.

[0098] Take the case of drawing a plane circle with 72 fitting points as an example. Specifically:

[0099] In the local coordinate system of the XOY plane, the normal vector of the XOY plane (ie, the Z axis) is rotated to the vector in the direction of the line connecting the center of the plane circle and the center of the sphere of the three-dimensional scene to obtain the target rotation matrix.

[0100] In order to reduce the amount of data processing, when all points on the plane circle are multiplied by the target rotation matrix for plane circle rotation, the 72 fitting points can be multiplied by the target rotation matrix for plane circle rotation to complete the rotation of the plane circle in the local coordinate system.

[0101] The rotated plane circle is translated from the center of the sphere to the position where the center of the circle is located, and a translation transformation is performed to obtain a perfect circle on the surface of the three-dimensional sphere.

[0102] In order to verify that the three-dimensional parameterized graphics generation method disclosed in the present invention can obtain a perfect circle on the surface of a three-dimensional sphere compared to the existing scheme, this experiment uses the same center of the circle and the point on the circle to construct a circular figure. Figure 3 (a) is a circle drawn directly in the longitude and latitude coordinate system using the traditional scheme, and Figure 3 (b) is a circle drawn in the world coordinate system using the scheme of the present invention. By comparing Figure 3 (a) and Figure 3 (b), it can be seen that the present invention can draw a non-deformed circle, thereby solving the problem of circle deformation.

[0103] It should be noted that when drawing a plane circle, the present application actually draws a plane circle with the actual circle radius value in the local coordinate system of the XOY plane with the sphere as the center, that is, the Z axis is the normal vector of the plane circle. The true normal vector of the circle drawn on the sphere is the vector formed by the line connecting the center of the sphere and the center of the circle. Therefore, it is necessary to rotate the Z axis to the vector direction of the line connecting the center of the sphere and the center of the circle to obtain a rotation matrix. Therefore, the result of multiplying each fitting point by the rotation matrix is ​​a circle parallel to the circle drawn on the sphere and centered at the center of the sphere.

[0104] In summary, the present invention calculates the actual circle radius value in the world coordinate system, and draws a plane circle in the local coordinate system of the XOY plane, obtains a target rotation matrix by rotating the normal vector of the XOY plane to the vector in the direction of the line connecting the center of the plane circle and the center of the sphere of the three-dimensional scene, and then multiplies all points on the plane circle by the target rotation matrix to complete the rotation of the plane circle in the local coordinate system, translates the rotated plane circle from the center of the sphere to the position where the center of the circle is located, performs a translation transformation, and realizes the conversion of the undeformed plane circle drawn in the local coordinate system to the position where the center of the circle is located in the three-dimensional scene, and obtains a perfect circle on the surface of the three-dimensional sphere, thereby solving the problem of circle deformation and meeting the user's graphic usage needs in three-dimensional scenes.

[0105] Corresponding to the above method embodiment, the present invention also discloses a device for generating three-dimensional parameterized graphics.

[0106] See also Figure 4 , a schematic diagram of the structure of a device for generating a three-dimensional parameterized graphic disclosed in an embodiment of the present invention, the device is applied to a three-dimensional dynamic plotting system, and the device includes:

[0107] The coordinate acquisition unit 301 is used to acquire the longitude and latitude coordinates of a plurality of key points of a three-dimensional parametric graphic to be generated in a geographic coordinate system.

[0108] The basis of the 3D dynamic plotting system is the Geographic Information System, and the basic data of the Geographic Information System is usually the geographic coordinate system. Based on this, when the 3D dynamic plotting system generates a 3D parametric graphic, the application obtains the latitude and longitude coordinates of multiple key points of the 3D parametric graphic to be generated in the geographic coordinate system.

[0109] Among them, the multiple graphic key points include: a center point.

[0110] Taking multiple key graphic points as examples, the key graphic points of a circle include: a center point (i.e., the center of the circle) and a point on the circle; the key graphic points of an ellipse include: a center point, a major semi-axis point, and a minor semi-axis point.

[0111] The coordinate conversion unit 302 is used to convert each of the latitude and longitude coordinates into a world coordinate in a world coordinate system.

[0112] Longitude and latitude are spherical coordinate systems for locations on the surface of the earth, with longitude representing the east-west direction and latitude representing the north-south direction. The longitude and latitude coordinates are on the sphere, so the physical lengths (such as distances) of different locations are not equal, especially in high-latitude areas. That is, in the geographic coordinate system, the physical lengths represented by one degree of longitude (except the equator) and one degree of latitude are not equal, causing deformation in the three-dimensional parametric graphics generated using longitude and latitude coordinates as parameters. Based on this, this application converts the longitude and latitude coordinates of the key points of the graphics in the geographic coordinate system into world coordinates in the world coordinate system.

[0113] The world coordinate system is a reference or absolute coordinate system used to determine the position of a point in space. It describes the position of any point in space by establishing a fixed reference system.

[0114] World coordinates usually refer to a rectangular coordinate system in a plane or three-dimensional space, in which physical lengths (such as distances) are usually uniform, making them easy to measure and calculate.

[0115] Therefore, after converting the latitude and longitude coordinates to world coordinates, the problem of unequal physical lengths can be solved.

[0116] The graphic size acquisition unit 303 is used to obtain a graphic size parameter according to the world coordinates corresponding to the multiple graphic key points in the world coordinate system.

[0117] In the world coordinate system, the distance between two key points of a graphic is calculated to obtain the graphic size parameters, such as the radius of a circle, the major semi-axis of an ellipse, the minor semi-axis of an ellipse, the length and width of a rectangle, and the side length of a square.

[0118] The plane graphic drawing unit 304 is used to draw the corresponding plane graphic using the center point and the graphic size parameters in the local coordinate system of the XOY plane.

[0119] The plane figure drawn is the plane figure corresponding to the three-dimensional parameterized figure.

[0120] The XOY plane generally refers to a plane formed by the X-axis and the Y-axis in a three-dimensional rectangular coordinate system.

[0121] The local coordinate system takes the center of the object as the coordinate origin, and the object's rotation, translation and other operations are all performed around this local coordinate system.

[0122] In the local coordinate system of the XOY plane, the present application uses the center point of the graphic on the XOY plane as the coordinate origin, and draws the plane graphic corresponding to the three-dimensional parameterized graphic in combination with the graphic size parameters.

[0123] The parameterized graphics generating unit 305 is used to rotate and translate the plane graphics in the local coordinate system to obtain a three-dimensional parameterized graphics.

[0124] The present application obtains a three-dimensional parameterized graphic by rotating and translating the platform graphic in the local coordinate system, converting the non-deformed graphic drawn in the local coordinate system to the position of the center point in the three-dimensional scene for display.

[0125] In summary, the present invention discloses a device for generating three-dimensional parametric graphics, which obtains the longitude and latitude coordinates of multiple key graphic points of the three-dimensional parametric graphics to be generated in the geographic coordinate system, converts each longitude and latitude coordinate into the world coordinates in the world coordinate system, obtains the graphic size parameters according to the world coordinates corresponding to the multiple key graphic points in the world coordinate system, draws the corresponding plane graphics using the center point and the graphic size parameters in the local coordinate system of the XOY plane, and obtains the three-dimensional parametric graphics by rotating and translating the plane graphics in the local coordinate system. The present application solves the problem of unequal physical lengths by converting the longitude and latitude coordinates into world coordinates, calculates the graphic size parameters in the world coordinate system, and rotates and translates the plane graphics corresponding to the graphic size parameters after drawing them in the local coordinate system of the XOY plane, which can effectively solve the problem of deformation of the three-dimensional parametric graphics, thereby meeting the user's graphic usage needs in three-dimensional scenes.

[0126] In one embodiment, see Figure 5 , a schematic diagram of the structure of a parameterized graphics generation unit disclosed in an embodiment of the present invention, the parameterized graphics generation unit may include:

[0127] The rotation matrix generating subunit 401 is used to rotate the normal vector of the XOY plane to the vector in the direction of the line connecting the center point of the plane figure and the sphere center of the three-dimensional scene in the local coordinate system to obtain a rotation matrix.

[0128] The normal vector of the XOY plane refers to the vector perpendicular to the XOY plane, that is, the Z-axis direction.

[0129] A rotation matrix is ​​a matrix that, when multiplied by a vector, changes the direction of the vector without changing its magnitude, and preserves the "handedness" of the vector (i.e., does not change a right-handed coordinate system to a left-handed coordinate system, or vice versa).

[0130] The column vectors and row vectors of the rotation matrix are both unit vectors and are orthogonal to each other.

[0131] The graphic rotation subunit 402 is used to multiply all points on the plane graphic by the rotation matrix to complete the rotation of the plane graphic in the local coordinate system.

[0132] After obtaining the rotation matrix, the present application completes the rotation of the plane figure in the local coordinate system by multiplying all points on the plane figure by the rotation matrix, that is, each point of the plane figure undergoes the same rotation transformation according to the rotation matrix.

[0133] The graphic translation subunit 403 is used to translate the rotated plane graphic from the center of the sphere to the position where the center point is located, perform a translation transformation, and obtain the three-dimensional parameterized graphic.

[0134] The three-dimensional parameterized figure is obtained by translating the rotated plane figure from the center of the sphere to the position where the center point of the plane figure is located and performing a translation transformation.

[0135] In summary, the present invention displays the indeformed plane graphics drawn in the local coordinate system of the XOY plane by rotation and translation to the position of the center point of the graphics in the three-dimensional scene, thereby meeting the user's graphics usage needs in the three-dimensional scene.

[0136] Taking the three-dimensional parameterized graphic as a perfect circle on the surface of a three-dimensional sphere as an example, the coordinate acquisition unit 301 can be specifically used for:

[0137] The latitude and longitude coordinates of multiple key graphic points of the perfect circle on the surface of the three-dimensional spherical surface to be generated in the geographic coordinate system are obtained, wherein the multiple key graphic points include: points on the circle and the center of the circle as the center point.

[0138] Correspondingly, the coordinate conversion unit 302 can be specifically used for:

[0139] Convert the longitude and latitude coordinates of the point on the circle and the center of the circle into world coordinates in the world coordinate system.

[0140] Correspondingly, the graphic size acquisition unit 303 may be specifically used for:

[0141] In the world coordinate system, the spherical distance between any two points on the sphere is determined according to the world coordinates corresponding to the center of the circle and the world coordinates corresponding to the point on the circle, and the spherical distance is determined as the actual circle radius value.

[0142] The spherical distance refers to the length of the shortest line between two points on the sphere, which is the length of the minor arc of the great circle passing through the two points (i.e., the circle obtained by cutting the sphere with a plane passing through the center of the sphere). In other words, the spherical distance is the length of the great arc between the two points. The spherical distance in this application is the spherical distance between the center of the circle and a point on the circle.

[0143] The specific calculation process of the spherical distance can be found in existing mature solutions and will not be repeated here.

[0144] Correspondingly, the plane graphics drawing unit 304 can be specifically used for:

[0145] In the local coordinate system of the XOY plane, based on the world coordinates of the center of the circle and the actual circle radius value, a fitting point method is used to draw the corresponding plane circle.

[0146] In practical applications, the number of fitting points used to draw a plane circle is determined according to actual needs. For example, the number of fitting points may be 18, 36, 72 or more.

[0147] The fewer the number of fitting points, the less smooth the circle drawn, and the more the number of fitting points, the smoother the circle drawn. However, when the number of fitting points is too large, it is easy to cause a waste of resources.

[0148] Preferably, in the local coordinate system of the XOY plane, based on the world coordinates of the circle center and the actual circle radius value, 72 fitting points are used to draw the corresponding plane circle.

[0149] The process of determining the 72 fitting points is as follows: when drawing a plane circle, the center of the circle and the actual radius of the circle are known, and the points on the circle are solved. The circumference of the circle is 360 degrees. This application finds a point on the circle every 5 degrees, and obtains 72 points on the circle, that is, 72 fitting points. By connecting the 72 fitting points, the corresponding plane circle is drawn.

[0150] Correspondingly, the parameterized graph generating unit 305 can be specifically used for:

[0151] In the local coordinate system of the XOY plane, the normal vector of the XOY plane is rotated to the vector in the direction of the line connecting the center of the plane circle and the center of the sphere of the three-dimensional scene to obtain a target rotation matrix;

[0152] Multiply all points on the plane circle by the target rotation matrix to complete the rotation of the plane circle in the local coordinate system;

[0153] The rotated plane circle is translated from the center of the sphere to the position where the center of the circle is located, and a translation transformation is performed to obtain a perfect circle on the surface of the three-dimensional sphere.

[0154] Take the case of drawing a plane circle with 72 fitting points as an example. Specifically:

[0155] In the local coordinate system of the XOY plane, the normal vector of the XOY plane (ie, the Z axis) is rotated to the vector in the direction of the line connecting the center of the plane circle and the center of the sphere of the three-dimensional scene to obtain the target rotation matrix.

[0156] In order to reduce the amount of data processing, when all points on the plane circle are multiplied by the target rotation matrix for plane circle rotation, the 72 fitting points can be multiplied by the target rotation matrix for plane circle rotation to complete the rotation of the plane circle in the local coordinate system.

[0157] The rotated plane circle is translated from the center of the sphere to the position where the center of the circle is located, and a translation transformation is performed to obtain a perfect circle on the surface of the three-dimensional sphere.

[0158] Corresponding to the above-mentioned embodiment, the present invention further discloses a computer storage medium, which stores at least one instruction. When the at least one instruction is executed by a processor, the steps shown in the embodiment of the method for generating three-dimensional parameterized graphics are implemented.

[0159] Computer storage media may be tangible media that may contain or store programs for use by or in conjunction with an instruction execution system, device, or apparatus. Computer storage media may be machine-readable signal media or machine-readable storage media. Computer storage media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0160] Corresponding to the above embodiment, Figure 6 As shown, the present invention also provides an electronic device, which may include: a processor 1 and a memory 2;

[0161] The processor 1 and the memory 2 communicate with each other via a communication bus 3;

[0162] Processor 1, configured to execute at least one instruction;

[0163] Memory 2, used to store at least one instruction;

[0164] The processor 1 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.

[0165] The memory 2 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0166] The processor executes at least one instruction to implement the steps shown in the embodiment of the method for generating three-dimensional parameterized graphics.

[0167] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0168] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0169] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for generating a three-dimensional parameterized graphic, characterized in that: include: Acquire the latitude and longitude coordinates of a plurality of key graphic points of the to-be-generated three-dimensional parametric graphic in a geographic coordinate system, wherein the plurality of key graphic points include: a center point; Convert each of the latitude and longitude coordinates into world coordinates in a world coordinate system; In the world coordinate system, obtaining a graphic size parameter according to the world coordinates corresponding to the multiple graphic key points; In the local coordinate system of the XOY plane, using the center point and the graphic size parameters to draw the corresponding plane graphic; The plane figure is rotated and translated in the local coordinate system to obtain a three-dimensional parameterized figure.

2. The method for generating a three-dimensional parameterized graphic according to claim 1, characterized in that: The rotating and translating the plane figure in the local coordinate system to obtain a three-dimensional parameterized figure includes: In the local coordinate system, the normal vector of the XOY plane is rotated to the vector in the direction of the line connecting the center point of the plane figure and the sphere center of the three-dimensional scene to obtain a rotation matrix; Multiplying all points on the plane figure by the rotation matrix to complete the rotation of the plane figure in the local coordinate system; The rotated plane figure is translated from the center of the sphere to the position where the center point is located, and a translation transformation is performed to obtain the three-dimensional parameterized figure.

3. The method for generating a three-dimensional parameterized graphic according to claim 1 or 2, characterized in that: The step of obtaining the latitude and longitude coordinates of a plurality of key points of the three-dimensional parametric graphics to be generated in the geographic coordinate system includes: The latitude and longitude coordinates of the multiple graphic key points of the perfect circle to be generated on the surface of the three-dimensional spherical surface in the geographic coordinate system are obtained, and the multiple graphic key points include: points on the circle and the center of the circle as the center point.

4. The method for generating a three-dimensional parameterized graphic according to claim 3, characterized in that: The step of obtaining the graphic size parameters according to the world coordinates corresponding to the multiple graphic key points in the world coordinate system includes: In the world coordinate system, the spherical distance between any two points on the sphere is determined according to the world coordinates corresponding to the center of the circle and the world coordinates corresponding to the point on the circle, and the spherical distance is determined as the actual circle radius value.

5. The method for generating a three-dimensional parameterized graphic according to claim 4, characterized in that: Drawing the corresponding plane figure using the world coordinates of the center point and the figure size parameters in the local coordinate system of the XOY plane includes: In the local coordinate system, based on the world coordinates of the circle center and the actual circle radius value, a fitting point method is used to draw a corresponding plane circle.

6. The method for generating a three-dimensional parameterized graphic according to claim 5, characterized in that: The rotating and translating the plane figure in the local coordinate system to obtain a three-dimensional parameterized figure includes: In the local coordinate system, the vector of the center of the plane circle and the center of the sphere of the three-dimensional scene in the direction of the line is rotated to the direction of the normal vector of the XOY plane to obtain a target rotation matrix; Multiply all points on the plane circle by the target rotation matrix to complete the rotation of the plane circle in the local coordinate system; The rotated plane circle is translated from the center of the sphere to the position where the center of the circle is located, and a translation transformation is performed to obtain a perfect circle on the surface of the three-dimensional sphere.

7. A device for generating three-dimensional parameterized graphics, characterized in that: include: A coordinate acquisition unit, used to acquire the latitude and longitude coordinates of a plurality of key graphic points of the to-be-generated three-dimensional parametric graphic in a geographic coordinate system, wherein the plurality of key graphic points include: a center point; A coordinate conversion unit, used for converting each of the latitude and longitude coordinates into a world coordinate in a world coordinate system; A graphics size acquisition unit, configured to obtain graphics size parameters according to the world coordinates corresponding to the multiple graphics key points in the world coordinate system; A plane graphics drawing unit, used for drawing a corresponding plane graphics using the center point and the graphics size parameters in a local coordinate system of the XOY plane; The parameterized graphics generating unit is used to rotate and translate the plane graphics in the local coordinate system to obtain a three-dimensional parameterized graphics.

8. The device for generating three-dimensional parameterized graphics according to claim 7, characterized in that: The parameterized graphics generating unit comprises: A rotation matrix generating subunit, used for rotating the normal vector of the XOY plane to the vector in the direction of the line connecting the center point of the plane figure and the sphere center of the three-dimensional scene in the local coordinate system to obtain a rotation matrix; A graphics rotation subunit, used for multiplying all points on the plane graphics by the rotation matrix to complete the rotation of the plane graphics in the local coordinate system; The graphic translation subunit is used to translate the rotated plane graphic from the center of the sphere to the position where the center point is located, perform a translation transformation, and obtain the three-dimensional parameterized graphic.

9. A computer storage medium, characterized in that The computer storage medium stores at least one instruction, and when the at least one instruction is executed by the processor, the method for generating three-dimensional parameterized graphics as described in any one of claims 1 to 6 is implemented.

10. An electronic device, characterized in that: The electronic device comprises: a memory and a processor; The memory is used to store at least one instruction; The processor is used to execute the at least one instruction to implement the method for generating three-dimensional parameterized graphics as described in any one of claims 1 to 6.

Citation Information

Cited By

  • Elliptical graph generation method and system based on visual angle of three-dimensional camera

    CN120689543A