Ellipsoidal vector diagram drawing method and system based on cubic polynomial spline

The ellipsoid vector map is drawn by the cubic polynomial spline method, which solves the problem of drawing the ellipsoid in existing rendering technology, realizes efficient and flexible vector map generation, preserves occlusion information and improves computational efficiency.

CN120689461AActive Publication Date: 2025-09-23SHANDONG UNIV
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202511202774.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-27
Publication Date
2025-09-23
Estimated Expiration
2045-08-27

AI Technical Summary

Technical Problem

Existing rendering technologies make it difficult to efficiently draw an ellipsoid. There are problems such as difficulty in balancing bitmap space cost and clarity, inability to restore occlusion information, low computational efficiency, difficulty in element modification, and loss of geometric information.

Method used

A method based on cubic polynomial splines is used to calculate the projection of the ellipsoid outline on the plane, construct the intersection sampling points, convert them into cubic Bezier curves, fill the closed area, and generate the plane vector diagram of the ellipsoid.

Benefits of technology

It achieves efficient drawing of vector graphics, retains occlusion information, flexible editing, lossless scaling, high computational efficiency, and complete geometric information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120689461A_ABST
    Figure CN120689461A_ABST
Patent Text Reader

Abstract

The invention provides an ellipsoid vector diagram drawing method and system based on cubic polynomial splines, and relates to the technical field of computer graphics, any point outside an ellipsoid is used as an observation point, and the observed ellipsoid is drawn into a vector diagram on a plane. Calculating a plane equation where the observed ellipsoid contour is located; constructing an implicit equation of a projection ellipse according to an ellipsoid equation and the plane equation; segmenting and converting the projection ellipse into cubic spline curves through an implicit equation of the projection ellipse; and based on a cubic polynomial spline method, filling a closed region enclosed by cubic spline curves to obtain a planar projection of the ellipsoid, and completing drawing of the vector diagram on the plane. According to the method, the three-dimensional ellipsoid can be drawn into the two-dimensional vector diagram, the related technology can be applied to development of three-dimensional drawing software with a vector diagram exporting function, and the method plays an important role in manufacturing of high-quality illustrations of books, documents and courseware.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of computer graphics, and in particular to a method and system for drawing an ellipsoid vector diagram based on a cubic polynomial spline. Background Art

[0002] The ellipsoid is a common quadratic surface in three-dimensional space. It can be regarded as a variation of a sphere and has many optical properties. It is not only widely used in geometric modeling, optical instrument design and other fields, but also frequently appears in teaching materials and technical documents.

[0003] The mathematical representation of an ellipsoid is usually an implicit equation, which contains a 3×3 symmetric matrix Q that determines its shape and orientation, a vector u that determines its position, and a constant that determines its size. c , the equation of the ellipsoid can be written as:

[0004] Although three-dimensional objects such as ellipsoids can be drawn using computer graphics rendering techniques, the final drawing result is a rasterized bitmap. This bitmap rendering technology has the following problems, making it unsuitable for efficient and complete drawing of ellipsoids: 1. Existing rendering technologies usually convert three-dimensional objects such as ellipsoids into bitmaps composed of pixels, which makes it difficult to strike a balance between the spatial cost and clarity of bitmaps.

[0005] 2. The bitmaps generated by existing rendering technologies only retain the information of the object closest to the observation point for each pixel, and the obscured information cannot be restored.

[0006] 3. Existing rendering technology requires calculating the color value of each pixel, which is time-consuming and computationally inefficient.

[0007] 4. The bitmaps drawn by existing rendering technologies cannot guarantee the independence of the drawn elements, so it is very difficult to add, delete and modify elements.

[0008] 5. The bitmaps drawn by existing rendering technologies completely lose the geometric information in the geometric figures, making it impossible to add new elements based on the geometric figures in the image. Summary of the Invention

[0009] In order to solve the above problems, the present invention proposes a method and system for drawing an ellipsoid vector diagram based on cubic polynomial splines, which can draw a three-dimensional ellipsoid into a two-dimensional vector diagram. The relevant technology can be applied to the development of three-dimensional drawing software with the function of exporting vector diagrams, and plays an important role in the production of high-quality illustrations for books, documents, and courseware.

[0010] According to some embodiments, the present disclosure adopts the following technical solutions: A method for drawing an ellipsoid vector map based on a cubic polynomial spline, taking any point outside the ellipsoid as an observation point, and drawing the observed ellipsoid into a vector map on a plane, including: Based on the equation of the ellipsoid to be drawn and the coordinates of the observation point, calculate the equation of the plane where the observed ellipsoid outline lies; According to the ellipsoid equation and the plane equation, the sampling points of the intersection line are constructed, and according to the projection of the sampling points on the plane where the screen is located, the implicit equation of the projected ellipse is constructed; The geometric information of the ellipse is calculated through the implicit equation of the projected ellipse, and the geometric information of the ellipse is used to transform the projected ellipse into cubic spline curves. Based on the cubic polynomial spline method, the closed area enclosed by the cubic spline curve is filled to obtain the plane projection of the ellipsoid and complete the drawing of the vector diagram on the plane.

[0011] According to some embodiments, the present disclosure adopts the following technical solutions: A cubic polynomial spline-based ellipsoid vector graphics system uses any point outside the ellipsoid as an observation point and draws the observed ellipsoid into a vector graphics on a plane, including: The plane calculation module is configured to: calculate the plane equation of the observed ellipsoid contour based on the ellipsoid equation to be drawn and the coordinates of the observation point; The projection construction module is configured to: construct sampling points of the intersection line according to the ellipsoid equation and the plane equation, and construct an implicit equation of the projected ellipse according to the projection of the sampling points on the plane where the screen is located; The curve conversion module is configured to: calculate the geometric information of the ellipse through the implicit equation of the projected ellipse, and use the geometric information of the ellipse to convert the projected ellipse into a cubic spline curve in sections; The area filling module is configured to fill the closed area enclosed by the cubic spline curve based on the cubic polynomial spline method, obtain the plane projection of the ellipsoid, and complete the drawing of the vector map on the plane.

[0012] According to some embodiments, the present disclosure adopts the following technical solutions: A computer program product includes a computer program. When the computer program is executed by a processor, the computer program realizes the method for drawing an ellipsoid vector diagram based on a cubic polynomial spline.

[0013] According to some embodiments, the present disclosure adopts the following technical solutions: A non-transitory computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by a processor, the method for drawing an ellipsoid vector diagram based on a cubic polynomial spline is implemented.

[0014] According to some embodiments, the present disclosure adopts the following technical solutions: An electronic device comprises: a processor, a memory and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to implement the method for drawing an ellipsoid vector diagram based on a cubic polynomial spline.

[0015] Compared with the prior art, the present invention has the following beneficial effects: 1. To address the problem of difficulty in balancing the space cost and clarity of bitmaps, the present invention converts the ellipsoid into a vector image, which has the advantages of low space cost and arbitrary scaling.

[0016] 2. To address the problem that the obscured information in the bitmap cannot be restored, the vector primitives converted by the present invention retain the complete information of the obscured object, and thus can be edited more freely and flexibly.

[0017] 3. To address the problem of time-consuming existing rendering technologies, the present invention only requires some geometric calculations, thus having faster computational efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings, which constitute a part of the present disclosure, are used to provide a further understanding of the present disclosure. The exemplary embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation to the present disclosure.

[0019] Figure 1 This is a flow chart of Example 1 for drawing a three-dimensional ellipsoid as a plane vector diagram.

[0020] Figure 2 This is an example diagram of the intersection line between the plane where the three-dimensional ellipsoid contour line is located and the ellipsoid as viewed from the observation point in Example 1.

[0021] Figure 3 This is an example diagram of the conjugate direction of the ellipsoid contour line in Example 1.

[0022] Figure 4 This is an example diagram of a conic section passing through five points on a plane in Example 1.

[0023] Figure 5 This is an example diagram of extracting the center, major and minor semi-axis directions, and lengths of the ellipse on the plane of Example 1.

[0024] Figure 6 This is an example diagram of cubic Bezier curve fitting of an arc on the unit circle in Example 1.

[0025] Figure 7 This is an example effect diagram of drawing an ellipsoid in Example 1. DETAILED DESCRIPTION

[0026] The present disclosure will be further described below with reference to the accompanying drawings and embodiments.

[0027] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of the present disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present disclosure belongs.

[0028] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present disclosure. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "comprising" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.

[0029] Example 1 In one embodiment of the present disclosure, a method for drawing an ellipsoid vector diagram based on a cubic polynomial spline is provided. The method uses any point outside the ellipsoid as an observation point and draws the observed ellipsoid into a vector diagram on a plane, including: Step S1: Based on the equation of the ellipsoid to be drawn and the coordinates of the observation point, calculate the equation of the plane where the observed ellipsoid outline lies; Step S2: constructing sampling points of the intersection line according to the ellipsoid equation and the plane equation, and constructing the implicit equation of the projected ellipse according to the projection of the sampling points on the plane where the screen is located; Step S3: Calculate the geometric information of the ellipse by using the implicit equation of the projected ellipse, and use the geometric information of the ellipse to convert the projected ellipse into a cubic spline curve in sections; Step S4: Based on the cubic polynomial spline method, fill the closed area enclosed by the cubic spline curve to obtain the plane projection of the ellipsoid, and complete the drawing of the vector map on the plane.

[0030] As described in the background technology, a bitmap is essentially a group of pixels with a grid structure. Although it can express various color gradient effects, it has a fatal weakness - it cannot be arbitrarily scaled. When the bitmap is enlarged to a certain ratio, the pixels will become a mosaic effect, seriously affecting the visual experience of the bitmap. Although increasing the resolution of the bitmap can increase the allowable magnification of the bitmap, this also causes a contradiction: a higher resolution bitmap will take up more storage space, which increases the storage space cost and transmission time cost of the file containing the bitmap.

[0031] In order to make up for the shortcomings of bitmaps, vector graphics were invented; vector graphics divide the geometric figures in plane graphics into line primitives and surface primitives; line primitives include straight line segments and curves, where straight line segments record the coordinates of their starting points, and curves are represented by polynomial splines, which only require recording a few control points. These primitives can be directly drawn with a specified color and specified width of line type; surface primitives include boundaries and interiors, where the boundaries can be regarded as consisting of a series of closed line primitives, and the interior can be filled with a specified color.

[0032] These two types of graphics require much less information to store than the pixel color information of a bitmap, which makes vector graphics usually very storage-space-efficient and reduces storage and transmission costs. Regardless of the resolution of the display device, straight line or curve generation algorithms, as well as filling algorithms, can be used to rasterize vector graphics into a bitmap display that adapts to the display device. This means that vector graphics have the advantage of being arbitrarily scalable.

[0033] The cubic polynomial spline is the most widely used spline. It represents the curve by constructing two cubic functions to represent the horizontal and vertical coordinates of the points on the curve. It can achieve C 2 Continuous splicing can also represent the inflection points of a curve. There are many forms of cubic polynomial splines, including cubic Hermite splines, cubic B-splines, and cubic Bezier splines. They are equivalent in the sense of linear transformation and can be converted into each other. Among them, cubic Bezier splines are the most common form. Almost all vector graphics formats support the drawing of this type of curve. Cubic Bezier splines are composed of the following four basis functions: B 0( t ) = (1 – t ) 3 B 1( t ) = 3(1 – t ) 2 t B 2( t ) = 3(1 – t ) t 2 B 3 (t) = t 3 in, t are the parameters of the spline.

[0034] By setting different coefficients for these four basis functions and performing linear combinations, we can obtain the equation of the spline curve: x ( t ) = x 0 B 0( t ) + x 1 B 1( t ) + x 2 B 2( t ) + x 3 B 3( t ) y ( t ) = y 0 B 0( t ) + y 1 B 1( t ) + y 2 B 2( t ) + y 3 B 3( t ) Among them, the spline is about x and y The coefficients of form four two-dimensional coordinates, namely the point P 0( x 0, y 0), P 1( x 1, y 1), P 2( x 2, y 2), P 3( x 3, y 3), they form a polyline, called a control polygon. According to relevant theories, the first control point P 0 and the last control point P 3, forming the two endpoints of the spline curve, and the spline curve is P The tangent line at 0 passes through the point P 1. In P The tangent line at 3 passes through the point P 2. Cubic polynomial splines cannot accurately represent circular arcs or elliptical arcs, but with a reasonable understanding of the control points, circular arcs or elliptical arcs can be fitted with minimal error, thereby drawing an ellipsoid.

[0035] To draw a two-dimensional vector map corresponding to a three-dimensional ellipsoid, there are several problems that need to be solved, including extracting the contour line of the ellipsoid and the intersection line between the ellipsoid and the plane, calculating the projection of the intersection line on the two-dimensional plane, that is, the projected ellipse, and converting the projected ellipse into a cubic Bezier curve.

[0036] In response to the above-mentioned problem of drawing a vector diagram of a three-dimensional ellipsoid, this embodiment proposes a drawing process and provides technical details for solving the problems that need to be solved in the process. According to this process, for any ellipsoid in three-dimensional space, any point outside the ellipsoid can be used as an observation point, and the observed ellipsoid can be drawn as a vector diagram on a plane, and finally a two-dimensional vector diagram of the three-dimensional ellipsoid is drawn. This embodiment takes cubic Bezier splines as an example, and the drawing process includes the following steps: Figure 1 As shown: Step 1: Calculate the equation of the plane where the ellipsoid outline lies based on the equation of the ellipsoid and the coordinates of the observation point.

[0037] The ellipsoid to be drawn σ The equation is expressed as:

[0038] Among them, Q is a symmetric matrix, u is the vector that determines the position of the ellipse, and c is a constant that determines the size of the ellipse.

[0039] Figure 2 This is the intersection of the plane where the contour line is located and the ellipsoid when looking at the three-dimensional ellipsoid from the observation point. Among them, green represents the ellipsoid surface σ, blue represents the part of the plane where the ellipsoid contour line is located that falls inside the ellipsoid, red represents the cone surface formed by the line from the observation point to the ellipsoid contour line, and yellow represents the part of the ellipsoid surface covered by the cone surface. Figure 2 As shown, for the observation point ( x 0, y 0, z 0), using the properties of the ellipsoid polar plane, the ellipsoid seen from the observation point σ The contour falls on a plane, and the equation of the plane where the contour lies is derived as:

[0040] If you need to draw the ellipsoid under parallel projection, there is no observation point, but there is a viewing direction. The vector representing the viewing direction is calculated as ( x t , y t , z t ), the contour of the projection of the ellipsoid along the line of sight also falls on a plane, then, according to the line of sight, the equation of the plane where the contour lies is:

[0041] The intersection line of the plane where the contour line lies and the ellipsoid equation is calculated to obtain the contour line of the ellipsoid. However, the contour line is given by an implicit equation in three-dimensional space, and its projection on the plane is difficult to calculate. Therefore, this embodiment adopts a method based on sampling point projection to solve the calculation problem of the projection of the contour line on the plane.

[0042] Step 2: Construct the sampling points of the intersection line according to the equation of the ellipsoid and the equation of the given plane; For the given ellipsoid with the following equation σ :

[0043] And the plane τ is given by the following equation:

[0044] Where n is the normal vector of plane τ, p is the signed distance from the origin to plane τ, and τ can be either the plane where the contour line is obtained in step 1, used to draw the contour line of the ellipsoid, or the symmetry plane of the ellipse, or the coordinate plane, used to draw the intersection of these planes and the ellipsoid.

[0045] On the plane τ With ellipsoid σ Constructing three-dimensional sampling points on the intersection line is a major problem solved by this embodiment. The strategy of quadratic conjugate diameter is adopted to construct three vectors r0, r1, and r2 that are conjugate to the quadratic form Q in the ellipsoid equation, so as to realize sampling on the intersection line. Figure 3 shown.

[0046] First, calculate the center of the ellipsoid based on the coefficients of the ellipsoid C ( x C , y C , z C ):

[0047] Then, construct the ellipsoid σ Center C to the ellipsoid σ With plane τ Center of intersection D ( x D , y D , z D ) vector r0, requiring r0 to be parallel to the plane τ Any vector on is conjugate with respect to the quadratic form Q, which can be derived by calculation:

[0048] On the plane τ Construct two vectors v1 and v2 on the plane. In order to ensure the stability of the construction, τ The three components of the normal vector n n x 、 n y and n z The absolute values ​​of the two are compared respectively. The specific construction method is as follows:

[0049] This construction ensures that as long as there is at least one non-zero vector v1 that is perpendicular to n, a non-zero vector v1 can be derived, thus enhancing the robustness of the algorithm.

[0050] Using vector v1, you can construct vector v2: v2=n×v1 Based on vectors v1 and v2, construct vectors w1 and w2 so that w1 and w2 are conjugate to r0 with respect to Q, and w1 and w2 are also conjugate to each other with respect to Q:

[0051]

[0052] The conjugate vectors r1 and r2 to be constructed are parallel to w1 and w2 respectively, and if their initial ends are moved to the ellipsoid σ With plane τ Center of intersection D , their ends fall on the intersection line, and this constraint is used to solve the expressions of r1 and r2:

[0053] The parametric equation of the intersection line can be written as:

[0054] in, t is a parameter, by choosing different parameters t You can get the sampling points on the intersection line E ( x , y , z ), in order to ensure the stability of subsequent calculations, it is necessary to maintain the spacing of the sampling points. Here, from the interval [ t 0, t 0+ 2 π ] for parameters t Perform uniform sampling and get 5 t The value of is an arbitrary real number, and the uniformly sampled t value is expressed as:

[0055] Using the 5 t values, 5 three-dimensional sampling points are calculated respectively E 1. E 2. E 3. E 4. E 5.

[0056] Step 3: Construct the implicit equation of the projected ellipse based on the projection of the sampling point on the plane where the screen is located; Based on 5 3D sampling points E 1. E 2. E 3. E 4. E 5, Use the parallel projection transformation and perspective projection transformation in computer graphics to map it onto the plane to form 5 plane points P 1. P 2. P 3. P 4. P 5. Such as Figure 4 As shown, a conic section passing through these five points is constructed. This conic section is the projected ellipse that needs to be drawn.

[0057] Theoretically, the equation of the projected ellipse, i.e. the conic section, can be directly derived by constructing a 6 × 6 determinant:

[0058] Expanding along the first row and calculating six 5×5 determinants yields the six coefficients of the conic section, which are the algebraic cofactors of the elements in the first row. However, experiments have shown that in numerical calculations, higher-degree determinants are prone to subtracting two large real numbers, resulting in a loss of precision.

[0059] In order to derive conic section coefficients with higher precision, this embodiment adopts the strategy of "first constructing a straight line and then using the straight line to construct a conic section" to achieve high-precision calculation of the conic section.

[0060] For the given 5 plane points P 1. P 2. P 3. P 4. P 5. Take two different points P i ( x i , y i ), Pj ( x j , y j ), then the equation of the line passing through these two points can be written as:

[0061] Expanding the determinant along the first row gives the equation of the line, where the coefficients have a maximum order of 2, and the error can be effectively controlled.

[0062] In order to avoid large real numbers in subsequent calculations, the coefficients of the first-order terms of the equation of the line are normalized, that is, for the line with the following equation: Ax + By + C = 0 The equation is transformed into:

[0063] For the given five points P i , i = 1, 2, 3, 4, 5, first construct the straight line P 1 P 2, P 3 P 4, P 1 P 4 and P 2 P 3. Over P i P j The equation of the line is abbreviated as: l ij ( x , y ) = 0 Then the equation of the conic section passing through five points can be written as: l 14 ( x 5, y5) l 23 ( x 5, y 5) l 12 ( x , y ) l 23 ( x , y ) + l 12 ( x5, y 5) l 23 ( x 5, y 5) l 14 ( x , y ) l 23 ( x , y ) =0 Simplifying the above conic section equations passing through five points, we can obtain the implicit equation of the projected ellipse, which can be expressed as: a 11 x 2 + 2 a 12 xy + a 22 y 2 + 2 b 1 x + 2 b 2 y + c = 0 In order to avoid calculation errors in subsequent processing, the sum of the square coefficients in the final plane projection ellipse equation is 1, that is, the coefficients satisfy a 11 + a 22 = 1.

[0064] The coefficients of the implicit equation of the projected ellipse provide key information for drawing the ellipse.

[0065] Step 4: Calculate the geometric information of the ellipse according to the implicit equation of the projected ellipse; Although there is a corresponding geometric transformation theory that can extract geometric information based on the implicit equation of the plane conic section (i.e., the projected ellipse), in order to avoid the complex transformation formula in the geometric transformation theory, this embodiment directly calculates the geometric information of the ellipse, i.e., the center coordinates and the major and minor semi-axis vectors of the ellipse, as shown in the following example: Figure 5 As shown, specifically: For a conic section with the following equation: a 11 x 2 + 2 a 12 xy + a 22 y2 + 2 b 1 x + 2 b 2 y + c = 0 Consider the left side as a two-variable quadratic function and use the extreme value to directly derive the center position of the projected ellipse:

[0066] Using the extreme values ​​of the function along different directions, the direction expression of the symmetry axis of the projected ellipse is derived:

[0067] Among them, atan2( y , x ) function, is to calculate the point in the plane coordinate system ( x , y ) and the origin. Substituting the center and the direction along the axis of symmetry into the equation, we derive the semi-axis expressions for the projected ellipse:

[0068] Above φ i Although there are countless values, in fact, the direction on the same straight line is obtained are the same, so only two directions perpendicular to each other get two values r 1 and r 2, corresponding to the major and minor semi-axes respectively.

[0069] Finally, the geometric information of the ellipse is obtained x 0. y 0. φ 1. φ 2. r 1 and r 2.

[0070] Step 5: According to the ellipse geometry information obtained in step 4, the projected ellipse is segmented and converted into a cubic Bezier curve; use x 0. y 0. φ 1. φ 2. r 1 and r 2, the implicit equation of the projected ellipse can be converted into a parametric form:

[0071] To draw this ellipse into a vector graph, it needs to be converted into a cubic Bezier curve. x 0.y 0. φ 1. φ 2. r 1 and r 2Calculate the coordinates of the control points of the cubic Bezier curve.

[0072] Specifically, in step 5, a single ellipse needs to be divided into 4 elliptical arcs, and can be divided into 6 elliptical arcs when necessary. Each elliptical arc can be regarded as an affine transformation of the unit arc. This embodiment uses the major and minor axis directions of the ellipse as the reference for the angle of argument to calculate the angle of argument of the point on the projected ellipse corresponding to the point on the unit arc. P ( x P , y P ), its argument θ is calculated as:

[0073] There is no division in the above formula, and atan2( y , x ) function, so it is very robust. θ 1 and θ 2, the unit arc can be constructed using the following control points, such as Figure 6 As shown:

[0074] in, l It reflects the length of the two sides of the control polygon, and its expression is:

[0075] This expression comes from the fact that the area enclosed by the cubic curve and the unit circle is equal.

[0076] These control points are converted into control points of the Bezier spline curve fitting the elliptical arc using the following mapping:

[0077] The control points of these elliptical arcs can be used as the cubic control parameters of the vector graph to construct a cubic Bezier curve spline, which is expressed as follows: x ( t ) = x C0 B 0( t ) + x C1 B 1( t ) + xC2 B 2( t ) + x C3 B 3( t ) y ( t ) = y C0 B 0( t ) + y C1 B 1( t ) + y C2 B 2( t ) + y C3 B 3( t ) The closed area is enclosed by splines and filled to obtain the plane projection of the ellipsoid, and finally the following is obtained: Figure 7 The ellipsoid drawing example shown in the figure shows that the three colored curves represent the intersection lines of the ellipsoid's symmetry plane and the ellipsoid.

[0078] Step 6: Based on the cubic polynomial spline method, fill the closed area enclosed by the cubic Bezier curve to obtain the plane projection of the ellipsoid, and complete the drawing and rendering of the vector image on the plane.

[0079] Example 2 In one embodiment of the present disclosure, a system for drawing an ellipsoid vector diagram based on a cubic polynomial spline is provided. The system uses any point outside the ellipsoid as an observation point and draws the observed ellipsoid into a vector diagram on a plane, including: The plane calculation module is configured to: calculate the plane equation of the observed ellipsoid contour based on the ellipsoid equation to be drawn and the coordinates of the observation point; The projection construction module is configured to: construct sampling points of the intersection line according to the ellipsoid equation and the plane equation, and construct an implicit equation of the projected ellipse according to the projection of the sampling points on the plane where the screen is located; The curve conversion module is configured to: calculate the geometric information of the ellipse through the implicit equation of the projected ellipse, and use the geometric information of the ellipse to convert the projected ellipse into a cubic spline curve in sections; The area filling module is configured to fill the closed area enclosed by the cubic spline curve based on the cubic polynomial spline method, obtain the plane projection of the ellipsoid, and complete the drawing of the vector map on the plane.

[0080] Example 3 In one embodiment of the present disclosure, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the computer program implements the method for drawing an ellipsoid vector diagram based on a cubic polynomial spline.

[0081] Example 4 In one embodiment of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by a processor, the method for drawing an ellipsoid vector diagram based on a cubic polynomial spline is implemented.

[0082] Example 5 In one embodiment of the present disclosure, an electronic device is provided, comprising: a processor, a memory, and a computer program; wherein the processor is connected to the memory, and the computer program is stored in the memory. When the electronic device is running, the processor executes the computer program stored in the memory, so that the electronic device executes the method for drawing an ellipsoid vector diagram based on a cubic polynomial spline.

[0083] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0084] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0085] Although the above describes the specific implementation methods of the present disclosure in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present disclosure. Those skilled in the art should understand that on the basis of the technical solution of the present disclosure, various modifications or variations that can be made by those skilled in the art without creative work are still within the scope of protection of the present disclosure.

Claims

1. A method for drawing an ellipsoid vector diagram based on a cubic polynomial spline, characterized in that: Take any point outside the ellipsoid as the observation point and draw the observed ellipsoid into a vector diagram on the plane, including: Based on the equation of the ellipsoid to be drawn and the coordinates of the observation point, calculate the equation of the plane where the observed ellipsoid outline lies; According to the ellipsoid equation and the plane equation, the sampling points of the intersection are constructed, and according to the projection of the sampling points on the plane where the screen is located, the implicit equation of the projected ellipse is constructed; The geometric information of the ellipse is calculated through the implicit equation of the projected ellipse, and the geometric information of the ellipse is used to transform the projected ellipse into cubic spline curves. Based on the cubic polynomial spline method, the closed area enclosed by the cubic spline curve is filled to obtain the plane projection of the ellipsoid and complete the drawing of the vector diagram on the plane.

2. The method for drawing an ellipsoid vector diagram based on a cubic polynomial spline according to claim 1, wherein: The equation of the plane on which the observed ellipsoid outline lies is calculated by utilizing the properties of the polar plane of the ellipsoid. The outline of the ellipsoid seen from the observation point falls on a plane, and the equation of this plane is derived.

3. The method for drawing an ellipsoid vector diagram based on a cubic polynomial spline according to claim 1, wherein: The sampling points of the intersection line are constructed by constructing three-dimensional sampling points on the intersection line of the plane and the ellipsoid. The strategy of the conjugate diameter of the quadratic form is adopted to construct three vectors that are conjugate to each other for the quadratic symmetric matrix to realize sampling on the intersection line.

4. The method for drawing an ellipsoid vector diagram based on a cubic polynomial spline according to claim 1, wherein: The implicit equation of the projected ellipse is constructed by first constructing the equation of a straight line passing through any two sampling points, then using the straight line equation to construct the equation of a conic section passing through all sampling points, and using the conic section equation as the implicit equation of the projected ellipse.

5. The method for drawing an ellipsoid vector diagram based on a cubic polynomial spline according to claim 1, wherein: To calculate the geometric information of an ellipse, the center position of the projected ellipse and the direction of the axis of symmetry are used to calculate the semi-axis expression of the ellipse, and then the implicit form of the ellipse is converted into a parametric form to obtain the geometric information of the ellipse.

6. The method for drawing an ellipsoid vector diagram based on a cubic polynomial spline according to claim 1, wherein: The projected ellipse segments are converted into cubic spline curves by using the major and minor axis directions of the ellipse as references for the angle of argument, calculating the angle of argument of the points on the ellipse corresponding to the points on the unit arc, constructing the unit arc using the angle of argument, and constructing the cubic spline curve through the unit arc.

7. An ellipsoid vector diagram drawing system based on cubic polynomial splines, characterized in that: Take any point outside the ellipsoid as the observation point and draw the observed ellipsoid into a vector diagram on the plane, including: The plane calculation module is configured to: calculate the plane equation of the observed ellipsoid contour based on the ellipsoid equation to be drawn and the coordinates of the observation point; The projection construction module is configured to: construct sampling points of the intersection line according to the ellipsoid equation and the plane equation, and construct an implicit equation of the projected ellipse according to the projection of the sampling points on the plane where the screen is located; The curve conversion module is configured to: calculate the geometric information of the ellipse through the implicit equation of the projected ellipse, and use the geometric information of the ellipse to convert the projected ellipse into a cubic spline curve in sections; The area filling module is configured to fill the closed area enclosed by the cubic spline curve based on the cubic polynomial spline method, obtain the plane projection of the ellipsoid, and complete the drawing of the vector map on the plane.

8. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method for drawing an ellipsoid vector diagram based on a cubic polynomial spline according to any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium, characterized in that The non-transitory computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by the processor, the method for drawing an ellipsoid vector diagram based on a cubic polynomial spline according to any one of claims 1 to 6 is implemented.

10. An electronic device, characterized in that: include: A processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to implement the method for drawing an ellipsoid vector diagram based on a cubic polynomial spline as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • High-efficient parallel vector data visualization method

    CN105046729A

  • Supersonic nozzle design method considering non-calorimetric complete gas specific heat ratio change

    CN118332732A

  • Three-dimensional ray drawing method and device

    CN119850813A

  • Method for displaying curved surface

    JP1995262402A

  • Vector image generating method for generating indoor 3D drawings and generating method for indoor 3D drawings

    KR102732289B1