Characteristic control point-based curve adjustment method, device and equipment, medium and product
Through the method based on feature control points, the control parameters of the plane cubic Bezier curve are optimized by using the shape parameters a and G2 continuity constraints, which solves the problem of poor continuity of the curve at the inflection point, and achieves high-quality curve continuity and aesthetic effects.
Patent Information
- Application Number
- CN202510575872.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2025-08-15
AI Technical Summary
The continuity of the existing curve adjustment method at the inflection point can only reach G1, resulting in poor continuity of the curve and large errors, making it difficult to meet the high-quality continuity requirements of industrial manufacturing and aesthetic design.
Using a method based on feature control points, a planar cubic Bezier curve is constructed by introducing shape parameter a, and feature point interpolation is performed, and the curve segments are spliced based on G2 continuity constraints, and the control parameters are optimized using linear equation systems to ensure the high-quality continuity of the curve at the inflection point.
The almost G2 continuity of the curve at the inflection point is achieved, the error is reduced, the continuity and aesthetic quality of the curve are improved, and the flexibility and aesthetic effect of the curve design are enhanced.
Smart Images

Figure CN120493525A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer-aided geometric design, and in particular to a curve adjustment method, device, equipment, medium and product based on feature control points. Background Art
[0002] In the field of computer-aided geometric design, the smoothness, continuity, and locality of curves have long attracted considerable attention. In industrial manufacturing, the smoothness and continuity of curves are crucial to product quality. For example, the streamlined shape of a car relies on these properties to reduce wind resistance and enhance both performance and aesthetics.
[0003] In computer graphics, curve locality helps construct complex graphics. For example, in animation, fine-tuning a curve locally can make character movements more delicate and scenes more realistic. In fact, many distinct geometric features (such as cusps, loops, and inflection points) are also popular among designers in aesthetic design. These geometric features give curves distinct visual characteristics and can create visually impactful and attractive patterns, such as the unique cusp design of the Sydney Opera House. However, precisely controlling and manipulating these geometric features during curve construction remains a challenging task.
[0004] Early Catmull-Rom and subdivision curves in C 2 / G 2 In the continuous case, when the distances between control points vary greatly enough, cusps and self-intersections may occur, but they are unexpected and not controllable. 1 For continuous Catmull-Rom curves, centripetal parameterization avoids cusps and self-intersections between continuous control points (Reference 1: Cem Yuksel, Scott Schaefer, and John Keyser. 2009b. On the Parameterization of Catmull-Rom Curves. In 2009 SIAM / ACM Joint Conference on Geometric and Physical.). The generalized circular mixed interpolation method without parameterization can only generate G 1 Continuous curves, using trigonometric blending functions to generate curves that improve continuity to G 2Continuous (Reference 2: Szilvási-Nagy, Márta, and Teréz P. Vendel. "Generating curves and swept surfaces by blended circles." Computer Aided Geometric Design 17.2 (2000): 197-206.), these two methods are beneficial to accurately reproduce the circle, but are prone to self-intersection and cusps. They do not want to generate these feature points and deliberately eliminate them. In addition, C is constructed by mixing conic functions and trigonometric functions. 2 Continuous interpolation curve, and avoid the appearance of cusp features (Reference 3: Sun, Chuan, and Huanxi Zhao. "Generating fair, C2 continuous splines by blending conics." Computers & Graphics 33.2 (2009): 173-180. Reference 4: Yuksel, Cem. "A class of C2 interpolating splines." ACM Transactions on Graphics (TOG) 39.5 (2020): 1-14.). The k-Curves method in 2017 generates piecewise quadratic Bezier curves through global optimization iteration, which can achieve G everywhere. 2 Continuous, but at the inflection point G 1 , and the local curvature maximum is located at the control point, but the global support feature makes it difficult to achieve complete linear segmentation, and the global optimization process is complicated (Reference 5: Zhipei Yan, Stephen Schiller, Gregg Wilensky, Nathan Carr, and Scott Schaefer. 2017. K-curves: Interpolation at Local Maximum Curvature. ACM Transactions on Graphics (Proceedings of SIGGRAPH 2017) 36, 4, Article 129 (2017).). The ∈κ-Curves in 2022 uses parametric cubic Bezier curves and uses high-order primitive functions to introduce additional degrees of freedom to control the local maximum curvature. However, it relies on global optimization technology, lacks locality, and cannot guarantee global G 2Continuity (Reference 6: Miura, Kenjiro T., et al. "∈κ-Curves: controlled local curvature extrema." The Visual Computer 38.8 (2022): 2723-2738.).
[0005] The latest pκ-Curves method consists of high-order piecewise Bezier curves, each of which approximates a parabola with its curvature extremes at interpolation points. This method can meet various continuity requirements and exhibits good locality. It also optimizes the curve shape and curvature distribution through a customized energy function (Reference 7: Wang, Zhihao, et al. "pκ-Curves: Interpolatory curves with curvature approximating a parabola." Computer Aided Geometric Design 111(2024).). However, these methods all focus on curve continuity and curvature extremes, striving to produce smooth and aesthetically pleasing curves. However, they deliberately eliminate significant curve features such as cusps, loops, and inflection points, which are uniquely attractive and valuable in aesthetic design.
[0006] As early as 1989 and 2001, there were related studies focusing on characteristic points, on how to determine whether a curve has a cusp, loop, inflection point, and the geometric conditions for having an extreme value of curvature (Reference 8: Stone, Maureen C., and Tony D. DeRose. "A geometric characterization of parametric cubic curves." ACM Transactions on Graphics (TOG) 8.3 (1989): 147-163. Reference 9: Walton, DJ, and D.S. Meek. "Curvature extrema of planar parametric polynomial cubic curves." Journal of computational and applied mathematics 134.1-2 (2001): 69-83.). The interpolation curve modeling with feature points control (FPC)-Curves interpolation curve proposed in 2019 can construct a cubic FPC curve that is almost continuous everywhere and interpolate the input data points. At the same time, it provides control over the position and type of geometric feature points. The FPC curve can ensure the continuity of the curve joints while constructing geometric feature points. It is an innovative method (Reference 10: Chen, Zhonggui, et al. "Interpolatory curve modeling with feature points control." Computer-Aided Design 114 (2019): 155-163.). In addition, few studies have focused on the feature points of the curve, and the continuity of the existing curve adjustment methods at the inflection points can only reach G 1 , the error is large, resulting in poor continuity of the curve. Summary of the Invention
[0007] The purpose of this application is to provide a curve adjustment method, device, equipment, medium and product based on characteristic control points to solve the problem of poor curve continuity.
[0008] To achieve the above objectives, this application provides the following solutions:
[0009] In a first aspect, the present application provides a curve adjustment method based on feature control points, comprising:
[0010] Introduce shape parameter a and construct a planar cubic Bezier curve with shape parameter;
[0011] According to design requirements, interpolation processing is performed on the characteristic points of the planar cubic Bezier curve to determine the curve segments with characteristic points;
[0012] Based on the continuity constraint, all curve segments with characteristic points are spliced together; the splicing between two curve segments with characteristic points satisfies G 2 The equivalence conditions for continuity are having common endpoints, common unit tangent vectors, and equal curvatures;
[0013] Initializing adjustment parameters according to the curve type, feature point type, and interpolation position of the planar cubic Bezier curve; the adjustment parameters include shape parameters, control points, curvature, and relative positions of points on the curve over the entire length of the curve; the curve is the planar cubic Bezier curve;
[0014] According to the initialized adjustment parameters, the control points of each curve segment with characteristic points are calculated to construct a linear equation system;
[0015] The control parameters are optimized according to the linear equations, and the curve shape is adjusted according to the optimized control parameters.
[0016] In a second aspect, the present application provides a curve adjustment device based on feature control points, comprising:
[0017] The curve construction module is used to introduce the shape parameter a and construct a planar cubic Bezier curve with the shape parameter;
[0018] An interpolation processing module, configured to perform interpolation processing on the characteristic points of the planar cubic Bezier curve according to design requirements to determine the curve segments having the characteristic points;
[0019] The splicing module is used to splice all curve segments with feature points based on continuity constraints; the splicing between two curve segments with feature points satisfies G 2 The equivalence conditions for continuity are having common endpoints, common unit tangent vectors, and equal curvatures;
[0020] an adjustment parameter initialization module, configured to initialize adjustment parameters according to the curve type, feature point type, and interpolation position of the planar cubic Bezier curve; the adjustment parameters including shape parameters, control points, curvature, and relative positions of points on the curve over the entire length of the curve; the curve being the planar cubic Bezier curve;
[0021] A linear equation system construction module is used to calculate the control points of each curve segment with characteristic points according to the initialized adjustment parameters and construct a linear equation system;
[0022] The curve shape adjustment module is used to optimize the control parameters according to the linear equation group and adjust the curve shape according to the optimized control parameters.
[0023] In a third aspect, the present application provides a computer device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any one of the above-described curve adjustment methods based on feature control points.
[0024] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any one of the above-mentioned curve adjustment methods based on feature control points.
[0025] In a fifth aspect, the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements any one of the above-mentioned curve adjustment methods based on feature control points.
[0026] According to the specific embodiments provided in this application, this application discloses the following technical effects:
[0027] This application introduces the shape parameter a, interpolates the characteristic points of the constructed planar cubic Bezier curve based on design requirements, and then splices multiple curve segments with characteristic points. The linear equations are constructed by initializing the adjustment parameters, and the control parameters are optimized to adjust the curve shape. The adjustment parameters include the shape parameters, control points, curvature, and the relative positions of the points on the curve along the entire curve length. The control parameters include the curvature at the splicing point and the control points to control the curvature at the inflection point, so that the continuity at the inflection point can almost reach G 2 , reducing the error and improving the curve continuity. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0029] Figure 1 Flowchart of the curve adjustment method based on feature control points provided in this application;
[0030] Figure 2Schematic diagram of the constrained cubic Bezier curve used by the FCa curve provided in this application;
[0031] Figure 3 This is an example diagram of a ring generated by different a values provided in this application; wherein, Figure 3 (a)-(d) are example graphs of rings generated when a=2.5, a=3, a=4, and a=5, respectively;
[0032] Figure 4 This is an example graph of curves of different types of feature points generated by different a values provided in this application; wherein, Figure 4 (a)-(l) in the figure are example graphs of curves generated when a=0.3, a=2 / 3, a=0.85, a=1, a=1.1, a=1.4, a=1.6, a=1.7, a=2, a=2.5, a=3, and a=4 respectively;
[0033] Figure 5 This is the continuity change diagram of the FCa curve provided in this application; Figure 5 (a)-(d) are the continuity change diagrams of the FCa curve when a=2 / 3, a=0.75, a=0.95, and a=1.1 at the blue point;
[0034] Figure 6 This is the first partial schematic diagram of the car waistline design provided in this application;
[0035] Figure 7 This is the second partial schematic diagram of the car waistline design provided in this application;
[0036] Figure 8 This is the third partial schematic diagram of the car waistline design provided in this application;
[0037] Figure 9 This is a schematic diagram of the artistic pattern design provided in this application. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0039] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0040] The embodiment of the present application provides a curve adjustment method based on feature control points, which is executed by a computer device, specifically a computer device such as a terminal or a server, or a terminal and a server. In the embodiment of the present application, Figure 1 As shown, the method includes the following steps.
[0041] S1: Introduce the shape parameter a and construct a planar cubic Bezier curve with the shape parameter.
[0042] S2: According to design requirements, interpolation processing is performed on the characteristic points of the planar cubic Bezier curve to determine curve segments with characteristic points.
[0043] S3: Based on the continuity constraint, all curve segments with characteristic points are spliced together; the splicing between two curve segments with characteristic points satisfies G 2 The equivalence conditions for continuity are having common endpoints, a common unit tangent vector, and equal curvature.
[0044] S4: Initializing adjustment parameters based on the curve type, feature point type, and interpolation position of the planar cubic Bezier curve; the adjustment parameters include shape parameters, control points, curvature, and relative positions of points on the curve along the entire length of the curve; the curve is the planar cubic Bezier curve. The interpolation position is the position of the feature point.
[0045] S5: According to the initialized adjustment parameters, the control points of each curve segment with characteristic points are calculated to construct a linear equation system.
[0046] S6: Optimizing control parameters according to the linear equation group, and adjusting the curve shape according to the optimized control parameters.
[0047] In an exemplary embodiment, Figure 2 As shown, a is the segmentation ratio, that is, the shape parameter, v i is the interpolation point, i = 0, 1, 2, 3. Assume that FCa-Curves is a series of planar cubic Bezier curves with constraints. The planar cubic Bezier curve with shape parameters is the FCa curve, and its expression is:
[0048] c(t;a)
[0049] =(1-t) 3 c0+3(1-t) 2 t[(1-a)c0+ac1]+3(1-t)t 2 [ac1+(1-a)c2]+t 3 c2
[0050] Among them, c(t; a) is a planar cubic Bezier curve with a shape parameter; t is the relative position of a point on the curve along the entire curve length, t ∈ [0, 1]①; c0 is the first control point; c1 is the second control point; c2 is the third control point.
[0051] In an exemplary embodiment, the curvature k(t) of the planar cubic Bezier curve with a shape parameter is:
[0052]
[0053] Among them, Δ is the directed area of the triangle; r and s are simplified formulas, r = c1 - c0, s = c2 - c1; analyzing the curvature k(t) of the curve, it can be seen that whether the curve has characteristic points depends on the discriminant Δ = (3a - 2)(2 - a) of F(t) in the formula.
[0054] Based on the curvature k(t), let F(t) = -(3a - 2)t 2 +(3a - 2)t+(1 - a), combined with Δ = (3a - 2)(2 - a) and the range of the variable t, determine the value range of the shape parameter a corresponding to different characteristic points, specifically including:
[0055] When 0 < a < 1, determine that the characteristic point is a normal point;
[0056] When 1 < a < 2, determine that the curve has two inflection points;
[0057] When a > 2, determine that the curve has a loop;
[0058] When a = 2, determine that the curve has a cusp;
[0059] The characteristic points include normal points, inflection points, loops, and cusps.
[0060] In an exemplary embodiment, according to the design requirements, perform interpolation processing at the characteristic points of the planar cubic Bezier curve to determine the curve segment with characteristic points, specifically including:
[0061] The design requirements include requiring the curve to have a cusp, requiring the curve to have a loop, requiring the curve to have an inflection point, and requiring the curve to have a normal point.
[0062] If the design requirement is to require the curve to have a cusp, let a = 2 and Perform interpolation processing at the cusp of the planar cubic Bezier curve to determine the curve segment with a cusp;
[0063] If the design requirement is to require the curve to have a loop, let a > 2, Interpolate at the cusp of the planar cubic Bézier curve to determine a curve segment with a cusp; where, and are two unequal roots; α * = β * ∈(0, 1 / 2),
[0064] If the design requirement is that the curve has an inflection point, let 1 < a < 2, interpolate at the inflection point of the planar cubic Bézier curve to determine a curve segment with an inflection point; or
[0065] If the design requirement is that the curve has a regular point, let 0 < a < 1, assign a value to t by selecting any random number, and interpolate at the regular point of the planar cubic Bézier curve to determine a curve segment with a regular point; at this time, t can be selected as any appropriate value, such as the t when the curvature is the largest.
[0066] In practical applications, the following are the geometric conditions at the interpolation point v that make the v point a cusp, loop, inflection point, and regular point.
[0067] 1. Cusp: If the curve is to have a cusp, F(t) if and only if Δ = 0, that is, a = 2. Assume that it is a cusp at t* ∈ (0, 1), then F(t*) = 0, and we get At this time, the curve is a cusp here, as Figure 4 shown. When a = 2, the curve has a cusp.
[0068] 2. Loop: If the curve is to have a loop, it means there are two unequal roots such that At the interpolation point v, it satisfies:
[0069]
[0070] Actually, from the symmetry axis of F(t) being we can let From ② - ③ we get
[0071] μ1c0 + μ2[(1 - a)c0 + ac1] + μ3[ac1 + (1 - a)c2] + μ4c2 = 0, where μ1, μ2,
[0072] μ3, μ4 are all constants.
[0073] To more simply control the size of the loop, let α * = β * ∈(0, 1 / 2), and we can get and a > 2. As a increases, the generated loop becomes larger, as shown in Figure 3 and Figure 4 (the third row), which reflects the control effect of the shape parameter a on the loop size.
[0074] For the loop generated using FCa-Curves, Figure 3 the values of a from left to right in it are 2.5, 3, 4, 5 respectively, Figure 4 and the values of a in the third row in it are 2.5, 3, 4.
[0075] 3. Inflection point: If the curve is to have an inflection point, then Δ > 0, that is At this time, F(t) has two roots symmetric about and F(0) = F(1) = 1 - a. If there is an inflection point within the interval [0, 1], then 1 - a must be less than 0, that is 1 < a < 2. In this way, the curve has two inflection points. From F(t * ) = 0, we can get As shown in Figure 4 the second row in it, from a = 1.1 to a = 1.7, the two red inflection points of the curve get closer and closer, and the characteristic points of the curve also get closer to the cusp as a gets closer to 2.
[0076] 4. Normal point: Finally, if the interpolation point is to be a normal point, then F(t) needs to satisfy that it opens downward and the value of t within [0, 1] is greater than 0, that is That is At this time, t can be taken as the axis of symmetry of F(t) Here, t can be chosen as any value considered appropriate, such as the t when the curvature is the largest. In addition, when the curve is a quadratic curve. As shown in Figure 4 the first row in it, from a = 0.3 to a = 1, the curve changes from relatively gentle to gradually increasing bending degree and continuously increasing bending angle.
[0077] In summary, when 1 < a < 2, the curve has two inflection points; when a = 2, there is one cusp; when a > 2, the curve has one loop point.
[0078] In an exemplary embodiment, continuity constraint: Assume that the FCa curve consists of a series of constrained cubic Bezier curves. The curve interpolates the input points, and the expression of the control point c is obtained by solving the equation. i,1 The equivalent condition for two consecutive curves to satisfy G 2 continuity at the splicing point is to have a common end point, a common unit tangent vector, and equal curvatures. By establishing equations through these conditions, the expression of the relevant parameter λ i is obtained to ensure high-quality continuity of curve splicing.
[0079] The control points are:
[0080]
[0081] c i,0 is the first control point of the i-th curve segment, c i,1 is the second control point of the i-th curve segment, c i,2 is the third control point of the i-th curve segment; v i is the interpolation point; is the relative position of the point on the i-th curve in the entire curve length; a i is the shape parameter of the i-th segment curve.
[0082] In an exemplary embodiment, the control points are calculated as follows: Based on the initialization parameters, the control points c of each segment of the curve are calculated by the following formula: i,0 and c i,2 In the calculation process, the curve interpolation equation and G 2 Continuous constraints, establish and solve the linear equations, and find c i,0 .
[0083] The control points are:
[0084] c i,2 =c i+1,0 =(1-λ i )c i,1 +λ i c i+1,1
[0085] Among them, c i+1,0 is the first control point of the i+1th curve segment; is the control parameter; c i+1,1 is the second control point of the i+1th curve segment.
[0086] Taking a closed curve as an example, let the control point vector be c1=[c 1,1 , c 2,1 ,...,c N,1 ] T , the known vector is p=[p1,p2,...,p N ] T , then the linear equations are:
[0087] Where p=v.
[0088] In practical applications, after generating curves with corresponding feature points, it is necessary to consider splicing them together and ensuring continuity at the splicing points. The following considers the conditions for constructing closed curves. The technical solution of this application is also applicable to constructing open curves. Assume that FCa-Curves is composed of a series of constrained cubic Bezier curves:
[0089] c i (t;a i )=(1-t) 3 c i,0 +3(1-t) 2 t[(1-a i )c i,0 +a i c i,1 ]+3(1-t)t 2 [a i c i,1 +(1-a i )c i,2 ]+t 3 c i,2 ④
[0090] Among them, a i is the shape parameter of the i-th segment curve, c i,j Indicates the j-th control point of the i-th curve.
[0091] The curve is interpolated at the input N points v i (i=1,2,...,N), we can get
[0092]
[0093] Solving equation ⑤ we can get
[0094]
[0095] Two continuous curve segments c i (t) and c i+1 (t) satisfies G at the splicing 2 Continuous if and only if they have common endpoints, common unit tangent vectors, and equal curvature. The equivalent conditions are:
[0096] There is a constant λ i (0<λ i <1) makes
[0097] c i,2 =c i+1,0 =(1-λ i )c i,1 +λ i c i+1,1 ⑦
[0098] The curvature is equal at the connection point κ i (1; a i )=κ i+1 (0; a i+1 )
[0099]
[0100] in
[0101] From the equal curvature at the splicing point, we can get:
[0102]
[0103] Due to a i ,a i+1 are all positive numbers, so 0<λ i <1 and is a real number.
[0104] In an exemplary embodiment, the iterative optimization process is entered, and λ is continuously calculated according to the optimization algorithm process. i 、c i,0 、c i,1 and c i,2 , until the convergence condition is met, and in each iteration, the curve shape is recalculated according to the updated parameters.
[0105] In practical applications, in the global optimization phase, the intermediate control point c is calculated by solving a set of linear equations. i,1 , when the parameter and λ i When fixed, by substituting formula ⑦ into formula ⑤, we can get:
[0106]
[0107] Solve the above formula to get c i,1 .
[0108] The FCa-Curves optimization algorithm is as follows:
[0109]
[0110]
[0111] The difference from FPC is that at the inflection point, since the constraint condition at the inflection point requires F(t) to have Δ>0, that is, F(t) has two roots. In order to make the curve more beautiful, different roots can be selected as needed. Here, the one selected is Of course you can also choose
[0112] This application also shows good locality. It can be seen that when an interpolation point is moved, only the two adjacent segments of the curve are changed, and the rest remain unchanged. This is especially important in art design, as designers can easily fine-tune the curve.
[0113] like Figure 5As shown in the figure, the continuity of the FCa curve changes as the shape parameter a changes, the continuity of the curve at the splicing point changes, and the effect of adjusting the shape parameter a at a specific point on the curvature of the splicing point, verifying the effective control of the curve continuity of this application. From left to right, the values of a are 2 / 3, 0.75, and 0.95 respectively. In the fourth figure, the value of a at the blue point is 1.1, while for the rest of the points, the value of a is 0.75. Compare the fourth figure with the second figure and note the change in curvature within the red rectangle. The enlarged view of the inflection point curvature is shown in the box in the upper right corner of each sub-figure.
[0114] In an exemplary embodiment, result verification and adjustment: The generated curve is verified to check whether the curve meets the requirements of feature points, continuity, and locality. The parameter a can be adjusted and recalculated and optimized until a curve that meets the design requirements is obtained.
[0115] In practical applications, the value of parameter a can be solved by the discriminant to control the type of feature points, t * It is also related to parameter a. You only need to adjust parameter a to change parameter t. * , which makes it easier to control the type and position of curve feature points.
[0116] In practical applications, the continuity of the joint of two curves needs to satisfy G 2 , solve λ through equivalent conditions i , and when the interpolation point is a normal point, the parameter a∈[2 / 3, 1] can be adjusted to make the curve splicing point closer and closer to G 2 continuous.
[0117] In another exemplary embodiment, for a given ordered point set, namely, feature point v i ∈R2(i=0,1,...,N), which contains cusps, rings, inflection points, and normal points. Based on the technical solution of this application, a G interpolation line is constructed on these data points. 2 curves, and these control points can be directly controlled and locally edited by the user.
[0118] Determine the curve and feature point type: clarify the feature points v required in curve design i The type (cusp, loop, inflection point, normal point) and its location determine whether the curve is open or closed.
[0119] 1. Curve construction.
[0120] Use piecewise parametric cubic Bezier curves to construct curves with geometric feature points, introduce an additional shape parameter a, and construct the parameterized planar cubic Bezier curve formula:
[0121] c(t;a)
[0122] =(1-t) 3 c0+3(1-t) 2 t[(1-a)c0+ac1]+3(1-t)t 2 [ac1+(1-a)c2]+t 3 c2
[0123] By analyzing the curvature formula of the curve:
[0124]
[0125] Initialization parameters: Initialize shape parameters a and control points c according to the curve type and feature point requirements i,1 ,λ i as well as Equal parameters (c i,1 and λ i Calculated by the following formula).
[0126]
[0127] 2. Feature point interpolation.
[0128] For different feature points, set the corresponding geometric conditions. If the curve has a cusp, as long as a=2 and If you want the curve to have a ring, by setting the appropriate t value, α * =β * ∈(0, 1 / 2), where For the inflection point, at Δ>0,1 <a<2, Select the appropriate t* according to the value of a. For normal points, Here * You can choose any suitable value, such as t where the curvature is maximum.
[0129] 3. Continuity constraints.
[0130] Assume that the FCa curve consists of a series of cubic Bezier curves with constraints. The curve is interpolated at the input points and the intermediate control points c are obtained by solving the equation i,1 The two continuous curves satisfy G at the joint. 2 The continuity equivalence conditions are common endpoints, common unit tangent vectors, and equal curvatures. These conditions are used to establish equations and solve for the relevant parameter λ. i expression to ensure high-quality continuity of curve splicing.
[0131] The following actual application scenarios illustrate the technical solution of this application.
[0132] 1. Automobile styling design.
[0133] Application scenario: automobile waistline design.
[0134] Technical advantages: By precisely controlling the position of the sharp point through the shape parameter a, a sharp turning feature can be added to the door waistline while ensuring aerodynamic performance; 2 Continuity ensures a natural transition between curved surfaces and enhances the overall streamlined feel of the vehicle body. For example, a certain brand’s concept car sets a sharp point feature at the junction of the A-pillar and the hood, which not only reduces wind resistance but also enhances visual impact. Figure 6-Figure 8 shown.
[0135] Car waistline design: Traditional NURBS requires adding 3-5 control points to achieve a similar cusp effect, while FCa only requires adjusting parameter a.
[0136] 2. Artistic pattern design.
[0137] Application scenarios: textile printing, glass art installations.
[0138] Technical advantages: Generate decorative geometric patterns through feature point control. For example, a high-end brand of silk scarves uses an abstract pattern designed with FCa curves. The designer embeds inflection points and loop features in the flower pattern by adjusting parameter a. Figure 9 As shown, the rings marked with red lines form a unique visual sense of hierarchy.
[0139] This application has the following advantages:
[0140] 1. Precise control of feature points: The corresponding relationship between parameter a and feature points is derived through theoretical analysis. Users can simply and intuitively adjust parameter a to precisely control the generation of different types of feature points, flexibly realizing unique geometric shapes in design.
[0141] 2.G 2 Continuity: It can ensure that the curve reaches G at the splicing point 2 Continuity meets the strict requirements of industrial design and aesthetic design on curve continuity, and improves the aesthetic quality and practicality of curves.
[0142] 3. Good locality: The generated curve has good locality. Changing one interpolation point only affects the shapes of two adjacent curve segments, making it easy for designers to fine-tune the curve. This is particularly advantageous in artistic design and greatly enhances the flexibility of curve design.
[0143] 4. Effectively control curvature: The maximum curvature of the curve occurs near the interpolation point (normal point). By adjusting the shape parameter a, the curvature of the curve can be changed. While ensuring continuity, the local curvature changes are made as smooth as possible, optimizing the overall visual effect of the curve and better meeting the requirements of aesthetic design.
[0144] 5. Efficiency and ease of use: Compared to existing methods, such as FPC curves, the optimization process of this invention is simple and efficient. When achieving curve shaping of the same complexity, fewer control points and parameters are required, reducing the user's operational complexity and workload.
[0145] Based on the same inventive concept, embodiments of the present application further provide a feature control point-based curve adjustment device for implementing the feature control point-based curve adjustment method described above. The solution provided by this device is similar to the solution described in the method described above. Therefore, the specific limitations of the one or more feature control point-based curve adjustment device embodiments provided below can be found in the limitations of the feature control point-based curve adjustment method described above and will not be further elaborated here.
[0146] In an exemplary embodiment, a curve adjustment device based on feature control points is provided, comprising:
[0147] The curve construction module is used to introduce a shape parameter a and construct a planar cubic Bezier curve with the shape parameter.
[0148] The interpolation processing module is used to perform interpolation processing on the characteristic points of the planar cubic Bezier curve according to design requirements to determine the curve segments with characteristic points.
[0149] The splicing module is used to splice all curve segments with feature points based on continuity constraints; the splicing between two curve segments with feature points satisfies G 2 The equivalence conditions for continuity are having common endpoints, a common unit tangent vector, and equal curvature.
[0150] An adjustment parameter initialization module is used to initialize adjustment parameters according to the curve type, feature point type and interpolation position of the planar cubic Bezier curve; the adjustment parameters include shape parameters, control points, curvature and the relative positions of points on the curve over the entire curve length; the curve is the planar cubic Bezier curve.
[0151] The linear equation group construction module is used to calculate the control points of each curve segment with characteristic points according to the initialized adjustment parameters and construct the linear equation group.
[0152] The curve shape adjustment module is used to optimize the control parameters according to the linear equation group and adjust the curve shape according to the optimized control parameters.
[0153] This application can accurately control the position and type of geometric feature points such as cusps, loops, inflection points, and normal points in curve design, and ensure that feature points only appear at interpolation points.
[0154] This application ensures that the curve reaches G at the splicing point 2 Continuity meets the requirements of industrial design and aesthetic design for high-quality continuity of curves and improves the aesthetic quality of curves.
[0155] This application makes the generated curve have good locality. Changing one interpolation point only affects the shapes of two adjacent curve segments, which makes it easier for designers to fine-tune the curve and enhances the flexibility of curve design.
[0156] This application achieves effective control of the curve curvature by adjusting the shape parameters so that the maximum curvature of the curve appears near the interpolation point (normal point), and while satisfying the continuity of the curve, makes the local curvature change as smooth as possible to optimize the overall visual effect of the curve.
[0157] In an exemplary embodiment, a computer device is provided, which may be a server or a terminal. The computer device includes a processor, a memory, an input / output (I / O) interface, and a communication interface. The processor, memory, and I / O interface are connected via a system bus, and the communication interface is connected to the system bus via the I / O interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is configured to store curve adjustment data based on feature control points. The I / O interface of the computer device is configured to exchange information between the processor and an external device. The communication interface of the computer device is configured to communicate with an external terminal via a network connection. When executed by the processor, the computer program implements a curve adjustment method based on feature control points.
[0158] In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the above method when executing the computer program.
[0159] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the above method when executed by a processor.
[0160] In an exemplary embodiment, a computer program product is provided, including a computer program, which implements the above method when executed by a processor.
[0161] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0162] In this application, all actions to obtain signals, information or data are carried out in compliance with the relevant data protection laws and policies of the country where they are located and with the authorization given by the owner of the corresponding device.
[0163] The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may include, but are not limited to, general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic units, data processing logic units based on quantum computing, and the like.
[0164] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0165] This document uses specific examples to illustrate the principles and implementation methods of this application. The description of the above examples is only intended to help understand the method and core concept of this application. At the same time, for those skilled in the art, based on the concept of this application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A curve adjustment method based on characteristic control points, characterized in that: Comprising: Introduce the shape parameter a and construct a planar cubic Bezier curve with the shape parameter; According to the design requirements, perform interpolation processing at the characteristic points of the planar cubic Bezier curve to determine the curve segments with characteristic points; Based on the continuity constraint, all curve segments with characteristic points are spliced together; the splicing between two curve segments with characteristic points satisfies G 2 The equivalence conditions for continuity are having common endpoints, common unit tangent vectors, and equal curvatures; Initialize the adjustment parameters according to the curve type, characteristic point type, and interpolation position of the planar cubic Bezier curve; the adjustment parameters include the shape parameter, control points, curvature, and the relative position of the points on the curve along the entire curve length; the curve is the planar cubic Bezier curve; Calculate the control points of each curve segment with characteristic points according to the initialized adjustment parameters and construct a linear equation system; Optimize the control parameters according to the linear equation system and adjust the curve shape according to the optimized control parameters.
2. The curve adjustment method based on feature control points according to claim 1, characterized in that: The planar cubic Bezier curve with the shape parameter is: c(t;a)=(1-t) 3 c0+3(1-t) 2 t[(1-a)c0+ac1]+3(1-t)t 2 [ac1+(1-a)c2]+t 3 c2; Where c(t; a) is the planar cubic Bezier curve with the shape parameter; t is the relative position of the points on the curve along the entire curve length, t ∈ [0, 1]; c0 is the first control point; c1 is the second control point; c2 is the third control point.
3. The curve adjustment method based on feature control points according to claim 2, characterized in that: The curvature k(t) of the planar cubic Bezier curve with the shape parameter is: Where Δ is the directed area of the triangle; r and s are simplified formulas, r = c1 - c0, s = c2 - c1; Based on the curvature k(t), let F(t) = -(3a-2)t 2 +(3a-2)t+(1-a), combined with Δ=(3a-2)(2-a), determine the value range of the shape parameter a corresponding to different feature points, specifically including: When 0 < a < 1, determine the characteristic point as a normal point; When 1 < a < 2, determine that the curve has two inflection points; When a > 2, determine that the curve has a loop; When a = 2, determine that the curve has a cusp; the characteristic points include normal points, inflection points, loops, and cusps.
4. The curve adjustment method based on feature control points according to claim 3, characterized in that: According to the design requirements, perform interpolation processing at the characteristic points of the planar cubic Bezier curve to determine the curve segments with characteristic points, specifically including: The design requirements include requiring the curve to have a cusp, requiring the curve to have a loop, requiring the curve to have an inflection point, and requiring the curve to have a normal point; If the design requirement is to require the curve to have a cusp, let a = 2 and performing interpolation processing on the cusp of the planar cubic Bezier curve to determine a curve segment having the cusp; If the design requirement is to require the curve to have a ring, let a>2, Interpolation processing is performed on the cusp of the planar cubic Bezier curve to determine a curve segment with a cusp; wherein, and are two unequal roots; α * =β * ∈(0, 1 / 2), If the design requirement is to require the curve to have an inflection point, let 1 < a < 2, perform interpolation processing at the inflection point of the planar cubic Bezier curve to determine the curve segment with an inflection point; If the design requirement is to require the curve to have a normal point, let 0 < a < 1, assign a value to t by selecting any random number, and perform interpolation processing at the normal point of the planar cubic Bezier curve to determine the curve segment with a normal point.
5. The curve adjustment method based on characteristic control points according to claim 4, characterized in that: The control points are: c i,0 is the first control point of the i-th curve segment, c i,1 is the second control point of the i-th curve segment, c i,2 is the third control point of the i-th curve segment; v i is the interpolation point; is the relative position of the point on the i-th curve in the entire curve length; a i is the shape parameter of the i-th segment curve.
6. The curve adjustment method based on characteristic control points according to claim 5, characterized in that: The control points are: c i,2 =c i+1,0 =(1-λ i )c i,1 +λ i c i+1,1 Among them, c i+1,0 is the first control point of the i+1th curve segment; i is the control parameter; c i+1,1 is the second control point of the i+1th curve segment.
7. A curve adjustment device based on characteristic control points, characterized in that: Comprising: A curve construction module for introducing the shape parameter a and constructing a planar cubic Bezier curve with the shape parameter; An interpolation processing module for performing interpolation processing at the characteristic points of the planar cubic Bezier curve according to the design requirements to determine the curve segments with characteristic points; The splicing module is used to splice all curve segments with feature points based on continuity constraints; the splicing between two curve segments with feature points satisfies G 2 The equivalence conditions for continuity are having common endpoints, common unit tangent vectors, and equal curvatures; An adjustment parameter initialization module for initializing the adjustment parameters according to the curve type, characteristic point type, and interpolation position of the planar cubic Bezier curve; the adjustment parameters include the shape parameter, control points, curvature, and the relative position of the points on the curve along the entire curve length; the curve is the planar cubic Bezier curve; A linear equation system construction module is used to calculate the control points of each curve segment with characteristic points according to the initialized adjustment parameters and construct a linear equation system; The curve shape adjustment module is used to optimize the control parameters according to the linear equation group and adjust the curve shape according to the optimized control parameters.
8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the curve adjustment method based on feature control points according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the curve adjustment method based on feature control points according to any one of claims 1 to 6 is implemented.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the curve adjustment method based on feature control points according to any one of claims 1 to 6 is implemented.