Ellipsoid vector map drawing method and system based on cubic polynomial spline

By using a method based on cubic polynomial splines, the intersection line between the ellipsoid and the observation point is calculated, and a vector diagram of the ellipsoid is generated. This solves the problem of drawing ellipsoids in existing rendering techniques and achieves efficient and flexible ellipsoid drawing effects.

CN120689461BActive Publication Date: 2025-12-16SHANDONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing rendering techniques struggle to efficiently render ellipsoids, resulting in issues such as difficulty in balancing spatial cost and clarity, inability to recover occluded information, low computational efficiency, difficulty in modifying elements, and loss of geometric information.

Method used

A method based on cubic polynomial splines is adopted. By calculating the intersection of the ellipsoid and the observation point, the implicit equation of the projected ellipse is constructed. The geometric information of the ellipse is then used to transform it into a cubic spline curve. The closed region enclosed by the cubic spline curve is filled to generate the planar projection of the ellipsoid.

Benefits of technology

It realizes vector drawing of ellipsoids, which has the advantages of low space cost, arbitrary scaling, preservation of occlusion information, high computational efficiency and flexible editing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120689461B_ABST
    Figure CN120689461B_ABST
Patent Text Reader

Abstract

The disclosure provides an ellipsoid vector mapping method and system based on cubic polynomial splines, and relates to the technical field of computer graphics, which takes any point outside the ellipsoid as an observation point, maps the observed ellipsoid into a vector graph on a plane, and comprises the following steps: based on the ellipsoid equation to be mapped and the coordinates of the observation point, the plane equation on which the observed ellipsoid contour is located is calculated; according to the ellipsoid equation and the plane equation, the implicit equation of the projection ellipse is constructed; the projection ellipse is segmented and converted into a cubic spline curve through the implicit equation of the projection ellipse; based on the cubic polynomial spline method, the closed area surrounded by the cubic spline curve is filled to obtain the plane projection of the ellipsoid, and the vector graph on the plane is completed. The disclosure can map a three-dimensional ellipsoid into a two-dimensional vector graph, and the related technology can be applied to the development of three-dimensional drawing software with a derived vector graph function, and plays an important role in the production 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, in particular to an ellipsoid vector diagram drawing method and system based on cubic polynomial splines. BACKGROUND

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

[0003] Generally, the mathematical representation of an ellipsoid uses an implicit equation, which contains a 3x3 symmetric matrix Q that determines its shape and direction, 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]

[0005] Although ellipsoid, an object in three-dimensional space, can be drawn using computer graphics rendering technology, the final drawing result is a rasterized bitmap. This rendering bitmap technology has the following problems, which makes it unsuitable for efficient and complete drawing of ellipsoids:

[0006] 1. Existing rendering techniques usually convert three-dimensional objects such as ellipsoids into bitmaps composed of pixels, and the spatial cost and clarity of bitmaps are difficult to balance.

[0007] 2. The bitmap obtained by the existing rendering technology only retains the object information closest to the observation point for each pixel, and the occluded information cannot be restored.

[0008] 3. The existing rendering technology needs to calculate the color value of each pixel, so it takes a long time and has low computational efficiency.

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

[0010] 5. The bitmap drawn by the existing rendering technology completely loses the geometric information in the geometric figure, making it impossible to add new elements with the geometric figure in the figure as a reference. SUMMARY

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

[0012] According to some embodiments, the present disclosure adopts the technical solutions as follows:

[0013] An ellipsoid vector diagram drawing method based on cubic polynomial spline, taking any point outside the ellipsoid as an observation point, draws the observed ellipsoid into a vector diagram on a plane, comprising:

[0014] Based on the ellipsoid equation to be drawn and the coordinates of the observation point, the plane equation on which the observed ellipsoid contour is located is calculated;

[0015] According to the ellipsoid equation and the plane equation, the sampling points of the intersection line are constructed, and the implicit equation of the projection ellipse is constructed according to the projection of the sampling points on the plane on which the screen is located;

[0016] The geometric information of the ellipse is calculated through the implicit equation of the projection ellipse, and the projection ellipse is segmented into cubic spline curves using the geometric information of the ellipse;

[0017] Based on the cubic polynomial spline method, the closed area surrounded by the cubic spline curves is filled to obtain the plane projection of the ellipsoid, and the drawing of the vector diagram on the plane is completed.

[0018] According to some embodiments, the present disclosure adopts the technical solutions as follows:

[0019] An ellipsoid vector diagram drawing system based on cubic polynomial spline, taking any point outside the ellipsoid as an observation point, draws the observed ellipsoid into a vector diagram on a plane, comprising:

[0020] The plane calculation module is configured to calculate the plane equation on which the observed ellipsoid contour is located based on the ellipsoid equation to be drawn and the coordinates of the observation point;

[0021] The projection construction module is configured to construct the sampling points of the intersection line according to the ellipsoid equation and the plane equation, and construct the implicit equation of the projection ellipse according to the projection of the sampling points on the plane on which the screen is located;

[0022] The curve conversion module is configured to calculate the geometric information of the ellipse through the implicit equation of the projection ellipse, and segment the projection ellipse into cubic spline curves using the geometric information of the ellipse;

[0023] The area filling module is configured to fill the closed area surrounded by the cubic spline curves based on the cubic polynomial spline method to obtain the plane projection of the ellipsoid, and complete the drawing of the vector diagram on the plane.

[0024] According to some embodiments, the present disclosure adopts the technical solutions as follows:

[0025] The computer program product comprises a computer program, and the computer program is executed by a processor to implement the ellipsoid vector mapping method based on a cubic polynomial spline.

[0026] According to some embodiments, the present disclosure adopts the technical solutions as follows:

[0027] A non-transitory computer readable storage medium for storing computer instructions, the computer instructions being executed by a processor to implement the ellipsoid vector mapping method based on a cubic polynomial spline.

[0028] According to some embodiments, the present disclosure adopts the technical solutions as follows:

[0029] An electronic device comprising a processor, a memory and a computer program; wherein the processor is connected with 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 implements the ellipsoid vector mapping method based on a cubic polynomial spline.

[0030] Compared with the prior art, the present disclosure has the beneficial effects that:

[0031] 1. In view of the problem that the space cost and clarity of a bitmap are difficult to balance, the present application converts an ellipsoid into a vector graph, which has the advantages of small space cost and arbitrary scaling.

[0032] 2. In view of the problem that the information of an occluded object in a bitmap cannot be restored, the vector graph converted by the present application retains the complete information of the occluded object, so that it can be edited more freely and flexibly.

[0033] 3. In view of the problem that the existing rendering technology is time-consuming, the present application only needs to perform some geometric calculations, so that it has faster calculation efficiency in time. BRIEF DESCRIPTION OF DRAWINGS

[0034] The drawings accompanying the specification constitute part of this disclosure and serve to further illustrate the illustrative embodiments of the present disclosure and the description thereof, and do not constitute an improper limitation on the present disclosure.

[0035] Figure 1 The flowchart for drawing a three-dimensional ellipsoid as a planar vector graph in Example 1.

[0036] Figure 2 The example diagram of the intersection line of the plane where the profile line of the three-dimensional ellipsoid is located and the ellipsoid from the viewpoint in Example 1.

[0037] Figure 3 The example diagram of the conjugate direction of the ellipsoid profile line in Example 1.

[0038] Figure 4 Conic curve example diagram of five points on the plane of example 1.

[0039] Figure 5 Extraction example diagram of the center, major axis direction and length of the ellipse on the plane of example 1.

[0040] Figure 6 Cubic Bezier curve fitting example diagram of the circular arc on the unit circle of example 1.

[0041] Figure 7 Ellipsoid drawing example effect diagram of example 1. DETAILED DESCRIPTION

[0042] The present disclosure will be further described below in conjunction with the accompanying drawings and examples.

[0043] It should be noted that the following detailed description is exemplary in nature and is intended to provide further description of the present disclosure. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs.

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

[0045] Example 1

[0046] In an embodiment of the present disclosure, a method for drawing an ellipsoid vector diagram based on a cubic polynomial spline is provided, in which any point outside the ellipsoid is taken as an observation point, and the observed ellipsoid is drawn into a vector diagram on a plane, comprising:

[0047] Step S1: Based on the ellipsoid equation to be drawn and the coordinates of the observation point, the equation of the plane on which the observed ellipsoid contour is located is calculated;

[0048] Step S2: 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 on which the screen is located, the implicit equation of the projection ellipse is constructed;

[0049] Step S3: The geometric information of the ellipse is calculated through the implicit equation of the projection ellipse, and the projection ellipse is segmented into cubic spline curves using the geometric information of the ellipse;

[0050] Step S4: Based on the cubic polynomial spline method, fill the closed area surrounded by the cubic spline curve to obtain the planar projection of the ellipsoid, and complete the drawing of the vector map on the plane.

[0051] As described in the background art, the essence of a bitmap is a set of pixels with a grid structure, although it can represent various color gradient effects, it has a fatal weakness - it cannot be arbitrarily scaled; when the bitmap is enlarged to a certain scale, the pixels will become mosaic effect, which seriously affects the visual experience of the bitmap; although the resolution of the bitmap can be increased to increase the allowed magnification of the bitmap, this also causes a contradiction: a bitmap with larger resolution will occupy more storage space, increasing the storage space cost and transmission time cost of the file containing the bitmap.

[0052] In order to make up for the shortcomings of bitmaps, vector graphics were invented; vector graphics divide the geometric figures in the plane figure into line-type primitives and face-type primitives; among them, the line-type primitives include straight line segments and curves, and the straight line segments record the coordinates of their starting points, and the curves use polynomial splines to represent them, only a few control points need to be recorded, these primitives can be directly drawn with a specified color and a specified width of line type; the face-type primitives include boundaries and interiors, the boundaries can be regarded as being composed of a series of closed line-type primitives, and the interiors can be filled with a specified color.

[0053] The information required to store these two types of primitives is much less than the pixel color information of a bitmap, which makes vector graphics usually very space-saving, reducing storage and transmission costs; no matter how high the resolution of the display device is, it can be rasterized into a bitmap suitable for the display device by using straight line or curve generation algorithms and filling algorithms, which means that vector graphics have the advantage of being able to be arbitrarily scaled.

[0054] The cubic polynomial spline is the most widely used spline at present, its idea of representing a curve is to construct two cubic functions to represent the horizontal and vertical coordinates of the points on the curve, it can realize C 2 Continuous splicing, and can represent the inflection point of the curve; the cubic polynomial spline has various forms, including cubic Hermite spline, cubic B-spline, and cubic Bezier spline, which are equivalent in the sense of linear transformation, and can be converted into each other, among them, the cubic Bezier spline is the most common form, almost all vector graphics formats support the drawing of this curve, the cubic Bezier spline is composed of the following four basis functions:

[0055] B 0( t ) = (1 – t ) 3

[0056] B 1( t ) = 3(1 – x) t ) 2 t

[0057] B 2( t ) = 3(1 – x) t ) t 2

[0058] B 3 (t) = t 3

[0059] where, t is the parameter of the spline.

[0060] Setting different coefficients for the 4 base functions and making linear combination, the equation of the spline curve can be obtained:

[0061] x ( t ) = x 0 B 0( t ) + x 1 B 1( t ) + x 2 B 2( t ) + x 3 B 3( t )

[0062] y ( t ) = y 0 B 0( t ) + y 1 B 1( t ) + y 2 B 2( t ) + y 3 B 3( t )

[0063] wherein the coefficients of the spline about x and y constitute 4 two-dimensional coordinates, namely points P 0( x 0, y 0), P 1( x 1, y 1), P 2(x 2, y 2), P 3( x 3, y 3) These control points form a polygonal line, called the control polygon. According to relevant theory, the first control point... P 0 and the last control point P 3. The two endpoints of the spline curve are formed, and the spline curve is in... P The tangent at point 0 passes through the point. P 1. In P The tangents at points 3 pass through point 1. P 2. Cubic polynomial splines cannot accurately represent circular or elliptical arcs, but by reasonably identifying control points, it is possible to fit circular or elliptical arcs with minimal error, thereby drawing an ellipsoid.

[0064] To draw a two-dimensional vector diagram corresponding to a three-dimensional ellipsoid, several problems need to be solved, including extracting the outline of the ellipsoid and the intersection of the ellipsoid with the plane, calculating the projection of the intersection on the two-dimensional plane, i.e., the projected ellipse, and converting the projected ellipse into a cubic Bezier curve.

[0065] To address the aforementioned problem of drawing vector graphics for a 3D ellipsoid, this embodiment proposes a drawing process and provides detailed solutions to the problems that need to be solved within the process. Following this process, for any ellipsoid in 3D space, using any point outside the ellipsoid as the observation point, the observed ellipsoid can be drawn as a vector graphic on a plane, ultimately yielding a 2D vector graphic of the 3D ellipsoid. This embodiment uses a cubic Bezier spline as an example, and the drawing process includes the following steps: Figure 1 As shown:

[0066] Step 1: Calculate the equation of the plane containing the ellipsoid's outline based on the equation of the ellipsoid and the coordinates of the observation point.

[0067] ellipsoid to be drawn σ The equation can be expressed as:

[0068]

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

[0070] Figure 2 This is a diagram showing the intersection of the plane containing the contour line of a 3D ellipsoid and the ellipsoid itself when viewed from the observation point. Green represents the ellipsoidal surface σ, blue represents the portion of the plane τ containing the ellipsoidal contour line that lies within the ellipsoid, red represents the cone formed by the lines connecting the observation point to the ellipsoidal contour line, and yellow represents the portion of the ellipsoidal surface covered by the cone. For example... Figure 2 As shown, for the observation point ( x 0,y 0, z 0), using the property of the ellipsoidal polar plane, the profile of the ellipsoid seen from the observation point falls on a plane, and the equation of the plane on which the profile falls is derived as: σ

[0071]

[0072] If the ellipsoid needs to be drawn under parallel projection, there is no observation point, but there is a line-of-sight direction, and the vector representing the line-of-sight direction is denoted as (n, p), the profile of the projection of the ellipsoid along the line-of-sight direction also falls on a plane, and then, according to the line-of-sight direction, the equation of the plane on which the profile falls is derived as: x t , y t , z t

[0073]

[0074] The intersection of the plane on which the profile line falls and the ellipsoid equation is calculated to obtain the profile line of the ellipsoid; however, the profile line is given by an implicit equation in three-dimensional space, and its projection on the plane is difficult to calculate, so this embodiment adopts a sampling point projection-based method to solve the calculation problem of the projection of the profile line on the plane.

[0075] Step 2. According to the equation of the ellipsoid and the equation of the given plane, the sampling points of the intersection are constructed.

[0076] For a given ellipsoid with the following equation: σ

[0077]

[0078] and a given plane τ with the following equation:

[0079]

[0080] where n is the normal vector of the plane τ, and p is the signed distance from the origin to the plane τ. The plane τ can be the plane on which the profile line falls obtained in step 1, used to draw the profile line of the ellipsoid, or the symmetry plane of the ellipsoid, or the coordinate plane, used to draw the intersection of these planes and the ellipsoid.

[0081] Three-dimensional sampling points are constructed on the intersection of the plane τ and the ellipsoid σ This is a major difficult problem solved by this embodiment, and the strategy of quadratic form conjugate diameter is adopted to construct three vectors r0, r1, r2 that are pairwise conjugate to the quadratic form Q in the equation of the ellipsoid, to achieve sampling on the intersection, as shown in σ ​​​​

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

[0083]

[0084] Then, construct from the ellipsoid τ center C To the ellipsoid τ With plane τ Center of intersection D ( x D , y D , z D Given a vector r0, we want r0 to be parallel to the plane. τ Any vector on the form Q is conjugate with respect to the quadratic form Q, which can be derived by calculation:

[0085]

[0086] In plane τ Construct two vectors v1 and v2 on the plane. To ensure the stability of the construction, we need to consider the plane. τ The three components of the normal vector n n x , n y and n z The absolute values ​​are compared separately, and the specific construction method is as follows:

[0087]

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

[0089] Using vector v1, vector v2 can be constructed:

[0090] v2=n×v1

[0091] Based on vectors v1 and v2, construct vectors w1 and w2 such that both w1 and w2 are conjugate with respect to r0 with respect to Q, and w1 and w2 are also conjugate with respect to each other with respect to Q:

[0092]

[0093]

[0094] The constructed conjugate vectors r1 and r2 are parallel to w1 and w2 respectively, and if their initial ends are moved to the center of the intersection line of the two planes τ with the plane σ , their terminal ends fall on the intersection line, the expressions of r1 and r2 are derived by solving the constraint: D

[0095]

[0096] Thus the parametric equation of the intersection line can be written as:

[0097]

[0098] where t is the parameter, by choosing different parameters t we can get the sampling points t ( E , x , y , z ) on the intersection line, in order to ensure the stability of subsequent calculations, the interval of the sampling points needs to be kept, here the parameter t is uniformly sampled from the interval t 0, t 0+ 2 π , and 5 values of t are obtained, where t is an arbitrary real number, and the uniformly sampled values of t are expressed by the formula: t

[0099]

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

[0101] Step 3, according to the projection of the sampling points on the plane where the screen is located, the implicit equation of the projection ellipse is constructed;

[0102] Based on the 5 three-dimensional sampling points E 1、 E 2、 E 3、 E 4、 E 5, Using parallel projection transformation and perspective projection transformation in computer graphics to map to the plane, 5 plane points P 1、 P 2、 P 3、 P 4、 P 5 are formed, as shown in​​​τ As shown, construct a conic curve of the 5 points, which is the projection ellipse that needs to be drawn.

[0103] In theory, the equation of the projection ellipse can be derived directly by constructing a 6 × 6 determinant, that is, the conic curve:

[0104]

[0105] Along the first row, calculate the 6 5 × 5 determinants to obtain the 6 coefficients of the conic curve, which are the algebraic cofactors of the elements in the first row. However, experiments show that in numerical calculation, determinants with high degrees are prone to subtract two large real numbers, causing precision loss.

[0106] In order to derive the conic curve coefficients with higher precision, the embodiment adopts the strategy of "first constructing a straight line and then constructing a conic curve with the straight line", which realizes high-precision calculation of the conic curve.

[0107] 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 ), P j x j , y j ), then the equation of the straight line passing through the two points can be written as:

[0108]

[0109] The determinant is expanded along the first row, that is, the equation of the straight line is obtained, and the highest degree of each coefficient in the equation is only 2, so the error can be effectively controlled.

[0110] In order to avoid large real numbers in subsequent calculations, the coefficient of the linear term of the equation of the straight line is normalized, that is, for the straight line with the equation as follows:

[0111] Figure 3 + σ + C = 0

[0112] The equation is transformed into:

[0113]

[0114] ​​For a given five points P i , i = 1, 2, 3, 4, 5, first construct straight line P 1 P 2, P 3 P 4, P 1 P 4 and P 2 P 3, through P i P j The straight line equation is written as:

[0115] l ij ( x , y ) = 0

[0116] Then the conic curve equation passing through five points can be written as:

[0117] l 14 ( x 5, y5) l 23 ( x 5, y 5) l 12 ( x , y ) l 23 ( x , y ) + l 12 ( x 5, y 5) l 23 ( x 5, y 5) l 14 ( x , y ) l 23 ( x , y ) =0

[0118] Simplify the above conic curve equation passing through five points, get the implicit equation of the projection ellipse, expressed as:

[0119] a 11 x 2 + 2 a12 σ + a 22 y 2 + 2 b 1 x + 2 b 2 y + c = 0

[0120] In order to avoid the calculation error problem in subsequent processing, the sum of the square term coefficients in the finally obtained plane projection ellipse equation is 1, that is, the coefficients satisfy a 11 + a 22 = 1.

[0121] The implicit equation coefficients of the projection ellipse provide key information for the drawing of the ellipse.

[0122] Step 4, calculating the geometric information of the ellipse according to the implicit equation of the projection ellipse;

[0123] Although there is a corresponding geometric transformation theory that can extract geometric information according to the implicit equation of the plane conic curve (i.e. the projection ellipse), in order to avoid the complex transformation formula in the geometric transformation theory, the embodiment directly calculates the geometric information of the ellipse, that is, the center coordinates and the major and minor semi-axis vectors of the ellipse, as shown in τ , and specifically:

[0124] For a conic curve with the equation as follows:

[0125] a 11 x 2 + 2 a 12 τ + a 22 y 2 + 2 b 1 x + 2 b 2 y + c = 0

[0126] Regarding the left side as a binary quadratic function, the center position of the projection ellipse is directly derived by using the extreme value:

[0127]

[0128] By using the extreme value of the function along different directions, the direction expression of the symmetry axis of the projection ellipse is derived:

[0129]

[0130] where atan2( y , x ) is the radian angle of the line connecting the origin and the point ( x , y ) in the plane coordinate system. Substitute the center and the direction along the symmetry axis into the equation, and derive the semi-axis expression of the projection ellipse:

[0131]

[0132] The above τ i Although there are infinite values, the obtained in the same direction on the same line is actually the same, so only two values r 1 and r 2 are obtained in two directions perpendicular to each other, which correspond to the major and minor semi-axes respectively.

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

[0134] Step 5, according to the ellipse geometric information obtained in step 4, the projection ellipse is segmented and converted into a cubic Bezier curve.

[0135] Using the expressions of x 0, y 0, τ 1, Figure 4 2, r 1 and r 2, the implicit equation of the projection ellipse can be converted into a parametric form:

[0136]

[0137] To draw this ellipse into a vector graph, it also needs to be converted into a cubic Bezier curve, and the coordinates of the control points of the cubic Bezier curve are calculated using x 0, y 0, Ax 1, By 2, r 1 and r 2.

[0138] In particular, in step 5, the single ellipse needs to be divided into 4 segments of ellipse arcs, and 6 segments of ellipse arcs if necessary, each of which can be considered as an affine transformation of a unit circle arc; this embodiment uses the major and minor axes of the ellipse as the reference of the argument, and calculates the argument of the point on the projected ellipse corresponding to the point on the unit circle arc. For a point on the ellipse P ( x P , y P ), its argument θ is calculated as:

[0139]

[0140] The above formula does not have division and uses the atan2( y , x ) function, thus having excellent robustness. For the ellipse arc falling between the arguments xy 1 and Figure 5 2, the unit circle arc can be constructed using the following control points, as shown in Fig. 1: xy

[0141]

[0142] wherein l reflects the lengths of the two sides of the control polygon, and its expression is:

[0143]

[0144] This expression is derived from the fact that the areas enclosed by the cubic curve and the unit circle arc are equal.

[0145] These control points are transformed into the control points of the Bezier spline curve fitting the ellipse arc using the following mapping:

[0146]

[0147] These control points of the ellipse arc can be used as the cubic control parameters of the vector graph to construct the cubic Bezier curve spline, which is expressed as:

[0148] x ( t ) = x C0 B 0( t ) + x C1 B 1( t ) + x C2 B 2( t ) + x ​C3 B 3( t )

[0149] y ( t ) = y C0 B 0( t ) + y C1 B 1( t ) + y C2 B 2( t ) + y C3 B 3( t )

[0150] By filling the closed area surrounded by the spline, the planar projection of the ellipsoid is obtained, and finally the ellipsoid drawing example effect diagram as shown in φ is obtained, wherein the three colored curves represent the intersection lines of the symmetry planes and the ellipsoid.

[0151] Step 6, based on the cubic polynomial spline method, filling the closed area surrounded by the cubic Bezier curve, obtaining the planar projection of the ellipsoid, completing the rendering of the vector diagram on the plane.

[0152] Embodiment 2

[0153] In an embodiment of the present disclosure, a cubic polynomial spline-based ellipsoid vector diagram drawing system is provided, which takes any point outside the ellipsoid as an observation point, and draws the observed ellipsoid into a vector diagram on the plane, comprising:

[0154] The plane calculation module is configured to calculate the plane equation on which the observed ellipsoid contour is located based on the to-be-drawn ellipsoid equation and the coordinates of the observation point;

[0155] The projection construction module is configured to construct the sampling points of the intersection line according to the ellipsoid equation and the plane equation, and construct the implicit equation of the projection ellipse according to the projection of the sampling points on the plane on which the screen is located;

[0156] The curve conversion module is configured to calculate the geometric information of the ellipse by the implicit equation of the projection ellipse, and convert the projection ellipse into a cubic spline curve by using the geometric information of the ellipse;

[0157] The area filling module is configured to fill the closed area surrounded by the cubic spline curve based on the cubic polynomial spline method, obtain the planar projection of the ellipsoid, and complete the drawing of the vector diagram on the plane.

[0158] Embodiment 3

[0159] In an embodiment of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method for drawing ellipsoidal vector map based on cubic polynomial spline.

[0160] Embodiment 4

[0161] In an embodiment of the present disclosure, a non-transitory computer readable storage medium is provided, for storing computer instructions which, when executed by a processor, implement the method for drawing ellipsoidal vector map based on cubic polynomial spline.

[0162] Embodiment 5

[0163] In an embodiment of the present disclosure, an electronic device is provided, comprising a processor, a memory and a computer program; wherein the processor is connected with 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 implements the method for drawing ellipsoidal vector map based on cubic polynomial spline.

[0164] The present disclosure is described with reference to the flowcharts and / or block diagrams of the method, device (system) and computer program product according to the embodiments of the present disclosure. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to 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 computer or other programmable data processing device produce a device implemented process for implementing the flowcharts and / or block diagrams. φ The function of one or more flows or one or more blocks φ The device that implements the function specified in one or more flows or one or more blocks.

[0165] These computer program instructions can also be loaded onto a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable data processing device to produce a computer implemented process, so that the instructions executed by the computer or other programmable data processing device provide a process for implementing the flowcharts and / or block diagrams. φ The function of one or more flows or one or more blocks φ φ φ θ θ Figure 6 Figure 7 Figure 1 Figure 1 Figure 1 Figure 1 The steps of the device that implements the function specified in one or more flows or one or more blocks.

[0166] The specific embodiments of the present disclosure are described above with reference to the accompanying drawings, but are not intended to limit the protection scope of the present disclosure, and those skilled in the art should understand that various modifications or changes made on the basis of the technical solutions of the present disclosure without creative labor are still within the protection scope of the present disclosure.

Claims

1. A method for drawing ellipsoidal vector diagrams based on cubic polynomial splines, characterized in that, Using any point outside the ellipsoid as the observation point, plot the observed ellipsoid as a vector diagram 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 containing the observed ellipsoid contour; Based on the equations of the ellipsoid and the plane, construct the sampling points of the intersection line, and based on the projection of the sampling points onto the plane of the screen, construct the implicit equation of the projected ellipse. The sampling points for constructing the intersection line are three-dimensional sampling points constructed on the intersection line of the plane and the ellipsoid. The strategy of quadratic conjugate diameter is adopted to construct three vectors that are pairwise conjugate with respect to the quadratic symmetric matrix, thereby realizing sampling on the intersection line. By using the implicit equation of the projected ellipse, the geometric information of the ellipse is calculated, and the geometric information of the ellipse is used to transform the projected ellipse into a cubic spline curve. Based on the cubic polynomial spline method, the closed region enclosed by cubic spline curves is filled to obtain the planar projection of the ellipsoid, thus completing the drawing of the vector map on the plane.

2. The method for drawing an ellipsoidal vector diagram based on cubic polynomial splines as described in claim 1, characterized in that, The equation of the plane containing the observed ellipsoidal profile is derived by utilizing the properties of the ellipsoid's polar plane. The ellipsoidal profile seen from the observation point falls on a plane, and the equation of this plane is then derived.

3. The method for drawing an ellipsoidal vector diagram based on cubic polynomial splines as described in claim 1, characterized in that, The implicit equation for constructing the projected ellipse is to first construct the equation of a straight line passing through any two sampling points, then use the straight line equation to construct the equation of a conic section passing through all sampling points, and finally use the conic section equation as the implicit equation of the projected ellipse.

4. The method for drawing an ellipsoidal vector diagram based on cubic polynomial splines as described in claim 1, characterized in that, Calculating the geometric information of an ellipse involves using the center position of the projected ellipse and the direction of its axis of symmetry to calculate the semi-axis expression of the ellipse, and then converting the implicit form of the ellipse into a parametric form to obtain the geometric information of the ellipse.

5. The method for drawing an ellipsoidal vector diagram based on cubic polynomial splines as described in claim 1, characterized in that, Transforming a segmented projected ellipse into a cubic spline curve involves using the major and minor axes of the ellipse as references for the argument. The argument of a point on the ellipse corresponds to a point on a unit arc. The argument is then used to construct a unit arc, and finally, a cubic spline curve is constructed from the unit arc.

6. A system for drawing ellipsoidal vector graphics based on cubic polynomial splines, characterized in that, Using any point outside the ellipsoid as the observation point, plot the observed ellipsoid as 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 equation of the ellipsoid 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 the implicit equation of the projection ellipse according to the projection of the sampling points on the plane of the screen. The sampling points for constructing the intersection line are three-dimensional sampling points constructed on the intersection line of the plane and the ellipsoid. The strategy of quadratic conjugate diameter is adopted to construct three vectors that are pairwise conjugate with respect to the quadratic symmetric matrix, thereby realizing sampling on the intersection line. The curve conversion module is configured to: calculate the geometric information of the projected 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 piecewise. The region filling module is configured to: fill the closed region enclosed by cubic spline curves based on the cubic polynomial spline method, obtain the planar projection of the ellipsoid, and complete the drawing of the vector map on the plane.

7. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the ellipsoid vector drawing method based on cubic polynomial splines as described in any one of claims 1-5.

8. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium is used to store computer instructions, which, when executed by a processor, implement the ellipsoid vector drawing method based on cubic polynomial splines as described in any one of claims 1-5.

9. An electronic device, characterized in that, include: The device includes 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 perform an ellipsoid vector drawing method based on cubic polynomial splines as described in any one of claims 1-5.

Citation Information

Patent Citations

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

    CN118332732A

  • Method for displaying curved surface

    JP1995262402A