Energy-driven method for generating three-dimensional Chinese character cup model
By fusing multiple contours into an energy functional extremum solution through an energy-driven approach, and combining an adaptive expansion controller and numerical discretization processing, the problems of topological distortion and dynamic inconsistency in the generation of 3D Chinese character models are solved, achieving high-precision and high-fidelity 3D model generation while preserving the cultural characteristics of Chinese characters.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-12
- Publication Date
- 2026-03-27
Smart Images

Figure CN121290769B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of additive manufacturing, in particular to a method for generating a three-dimensional Chinese character cup model based on energy driving. BACKGROUND
[0002] In recent years, three-dimensional modeling technology has become the core driving force for the digital design and intelligent manufacturing of cultural and creative products. Especially in the development of cultural and creative products with Chinese characters as design elements (such as customized "Chinese character cups"), the technology not only needs to convert two-dimensional stroke outlines into three-dimensional geometric models, but also requires the model to faithfully restore the cultural charm and artistic beauty of Chinese characters in form, and to have sufficient mechanical rationality and additive manufacturing feasibility in structure. This process involves complex mapping from planar vector paths to three-dimensional solid models, and the technical key lies in how to realize the organic integration of multi-stroke outlines under complex structures (nesting, coupling and overlapping), and generate a manufacturing three-dimensional model with complete structure, smooth surface and uniform wall thickness.
[0003] At present, one of the mainstream solutions is to adopt a technical path based on geometric optimization and variational modeling. This method defines a differentiable energy functional containing smoothness constraints and data fitting terms, and iteratively solves in the latent space or the output geometry through variational methods or numerical optimization techniques, to find a solution that not only meets all the constraint conditions, but also highly matches the model's learned data distribution. The iterative process is the process of driving the initial outline to evolve towards the target shape, and the evolution result meets the smoothness requirement. However, when dealing with complex structures such as Chinese characters that naturally contain nested, coupled or overlapping stroke outlines, this method has significant limitations. In addition, since its evolution process highly depends on the setting of the initial outline and parameter adjustment, and the energy function lacks coordinated control of the topological relationship between multiple outlines and global scale evolution, the model is prone to kinetic incoordination during the evolution process: that is, the model expands rapidly as a whole in the early stage, the global scale converges too early, and only local details are slowly adjusted in the later stage. This "global saturation and local delay" feature leads to non-physical mutations in the spatiotemporal evolution trajectory, making the generated model's form discontinuous in the time dimension, resulting in loss of local details, unstable boundaries and insufficient smoothness, and further causing deviations between the overall form and the target design intent. This defect seriously restricts the application of such methods in the generation of high-fidelity, manufacturing three-dimensional models for cultural and creative products. SUMMARY
[0004] To solve the above technical problems, the present application provides a method for generating a three-dimensional Chinese character cup model based on energy driving, to solve the topological structure distortion problem caused by unnatural fusion of complex stroke outlines in the prior art, and the problems of non-physical mutations, detail loss and poor manufacturing adaptability caused by kinetic incoordination in the evolution process.
[0005] A three-dimensional Chinese character cup model generation method based on energy-driven manufacturing, comprising the following steps:
[0006] S1: input definition and target establishment, receive multi-contour initial region and single target contour, construct smooth time sequence evolution path, and fuse multi-contour into single target contour;
[0007] S2: define calculation domain, level set function, smooth approximation function and adaptive control factor;
[0008] S3: construct vector signed distance function for representing geometric information of contour;
[0009] S4: construct energy functional, and model multi-contour fusion process as energy minimization problem;
[0010] S5: design adaptive inflation controller for dynamically and adaptively adjusting inflation coefficient;
[0011] S6: obtain level set evolution equation through variational derivation;
[0012] S7: perform numerical discretization and stabilization processing;
[0013] S8: additively stack two-dimensional evolution sequence along time axis into three-dimensional volume field, and perform three-dimensional reconstruction;
[0014] S9: perform thick shell processing on three-dimensional grid to generate thin shell structure suitable for 3D printing.
[0015] Preferably, in the step S1, the construction of the time sequence evolution path comprises:
[0016] evolving the multi-contour initial region into single target contour step by step;
[0017] constructing three-dimensional space-time body model based on the path, and outputting printable three-dimensional Chinese character cup model through thick shell processing.
[0018] Preferably, the step S3 comprises:
[0019] mapping discrete grid coordinate system to continuous geometric space;
[0020] splitting input closed region into line segment set, and batch calculating minimum distance from pixel point to line segment;
[0021] using global even-odd rule to judge whether pixel point is located inside polygon to process complex contour containing hole or nested structure.
[0022] Preferably, in the step S4, the energy functional is:
[0023]
[0024] including a curve length regularization term , an inflation term and a shape prior term .
[0025] Preferably, in the step S5, the adaptive inflation coefficient is defined as:
[0026]
[0027] wherein, is an area difference, is a shape error, is a boundary length, , is a weight coefficient.
[0028] Preferably, in the step S6, the level set evolution equation is:
[0029]
[0030] wherein is a curvature.
[0031] Preferably, the step S9 comprises:
[0032] obtaining an outer surface mesh through an iso-surface extraction and a constrained inner offset technique, and performing self-intersection detection;
[0033] constructing a pair of rings at the opening and performing a stitching bridge;
[0034] performing mesh simplification using a thickness-constrained progressive error metric to control the tolerance within 5% of the wall thickness.
[0035] A system for implementing the above method, comprising:
[0036] an input module for receiving a multi-contour initial region and a target contour;
[0037] a processing module for performing level set evolution, energy functional optimization and three-dimensional reconstruction;
[0038] an output module for generating a 3D printable three-dimensional mesh file.
[0039] A non-transitory computer-readable storage medium storing a computer program, the program implementing the above method when executed by a processor.
[0040] Compared with the prior art, the present application has the following beneficial effects:
[0041] (1) Technological innovation: improving the accuracy and stability of three-dimensional reconstruction
[0042] By converting the multi-contour fusion problem into an energy functional extremum solution, and introducing a dynamic coupled adaptive inflation control mechanism, the model can balance the global shape coordination and local detail high fidelity during the evolution process. Further, it effectively overcomes the common dynamic incoordination problems such as contour misplacement, shape distortion, and "global saturation and local delay" in traditional methods, and the generated two-dimensional evolution path is continuous and stable in topological structure, laying a solid foundation for subsequent high-quality three-dimensional reconstruction;
[0043] (2) Cultural heritage: restore the charm of Chinese characters, help cultural landing
[0044] Through the precise controllable contour evolution and structure preservation ability, the unique shape beauty, stroke rhythm and frame structure of Chinese characters and other core cultural elements can be accurately converted into the modeling language of three-dimensional models; Further, it avoids the common semantic deviation and loss of artistic charm in the digital process, realizes the high-quality conversion of cultural symbols from two-dimensional plane to three-dimensional entity, and provides a reliable technical bridge for the modernization and embodiment expression of traditional cultural IP. BRIEF DESCRIPTION OF DRAWINGS
[0045] Figure 1 The method flowchart of the present application is shown in the figure;
[0046] Figure 2 The physical mutation (left) and expected effect (right) of the inflation item of the present application are shown in the figure;
[0047] Figure 3 The three-dimensional model output by the method of the present application and the 3D printing result are shown in the figure. DETAILED DESCRIPTION
[0048] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0049] Embodiment:
[0050] As shown in Figure 1 A method for generating a three-dimensional Chinese character cup model based on energy driving, comprising the following steps:
[0051] S1. Input definition and target establishment:
[0052] The user gives a multi-outline initial region and a single target outline, and clearly defines the core target as constructing a smooth time evolution path to realize the "fusion" of the initial region into the single target outline during the evolution process. The result at each moment on the evolution path is called an intermediate region or a parallel region (a set of multiple outlines) and satisfies the continuity of the intermediate region in shape topology, scale ratio, and geometric characteristics with adjacent time steps, thereby realizing time smoothness. Based on the evolution path, a three-dimensional space-time body model is further constructed, and the two-dimensional intermediate region is added along the time axis to form a volume field, and finally a printable three-dimensional Chinese character cup model is output by using the thick shell algorithm. Further define the input and target levels as follows:
[0053] Input level: Clearly set "multi-outline initial region" and "single target outline" as the starting input data of the technical process, providing a basis for the construction of the subsequent evolution path.
[0054] Target level: Focus on the construction of a smooth time evolution path, which realizes the orderly transition from multiple initial outlines to a single target outline, rather than simple morphological superposition or replacement.
[0055] S2. Related parameter and function definition
[0056] S2.1. Calculation domain and level set function setting: define the calculation domain as , and the level set (LeveSet) function is used to describe the evolution curve, and the zero level set corresponds to the curve position at time ; the target outline (closed curve) is represented by the signed distance function , and its zero level set is the target outline.
[0057] S2.2. Smooth approximation function and curvature calculation: adopt the smooth Heaviside function and Dirac function to ensure numerical stability and differentiability, and calculate the curvature by difference approximation method.
[0058] S2.3. Adaptive control factor: the invention introduces a time-dependent adaptive inflation control factor , which dynamically adjusts the driving force strength. On the basis of the smoothness of the curve constrained by the geometric regularization term, it balances the area residual and shape error in the evolution process, and ensures the convergence stability and physical reasonableness of the curve approximation to the target outline.
[0059] S3. Vector signed distance function (SDF)
[0060] S3.1. Construction of Core and Mathematical Form: Focusing on multiple smooth contour curves represented by vectors, the calculation is simplified using Discrete SDF while preserving geometric accuracy. Its mathematical form is as follows: ;in, Let Euclidean distance be the distance from the point to the nearest boundary. This is an indicator function for determining the sign of a point.
[0061] S3.2. Key Process: First, the discrete grid coordinate system is mapped to a continuous geometric space to ensure that the distance calculation is consistent with the original contour; then, the input closed region is split into a set of line segments, and the minimum distance from the pixel to the line segment is calculated in batches in a matrix manner, and the memory overflow is avoided by using a block evaluation strategy; finally, following the global even-odd rule, the parity of the intersection of the ray and the line segment is statistically analyzed to determine whether the pixel is located inside the polygon, so as to accurately handle complex contours with holes or nested structures.
[0062] S4. Constructing Energy Functionals
[0063] Multi-contour profiles are gradually merged into a single target contour. The process is modeled as a problem coupled with energy minimization and level set evolution. Evolutionary partial differential equations are obtained through energy functional construction and variational derivation, achieving continuous contour deformation and smooth transition. Based on curve evolution theory, the energy functional is defined as shown in Equation 1 below:
[0064]
[0065] The above energy functional It includes three core constraints:
[0066] (1) Curve length regularization term Adjusting the curvature ensures a smooth curve and suppresses distortions such as sharp points and burrs;
[0067] (2) Expansion / Area Item :pass Adjust the expansion or contraction behavior of the contour curve (see Adaptive Expansion Controller).
[0068] (3) Shape prior / target constraint : Drives the current curve to gradually approach the target contour No additional external force is required.
[0069] S5. Adaptive Expansion Controller
[0070] Existing methods often suffer from dynamic inconsistencies in controlling scale expansion. Figure 2 (Left), therefore, this invention designs an expansion coefficient that adaptively adjusts over time. Introducing regional area differences Three types of quantities—area difference, shape error, and boundary length—form a dynamically coupled control mechanism. The calculation is shown in Formula 2.
[0071]
[0072] in Indicates the area of the target region. Indicates the first The current area of the region at any given moment. (Through...) Controlling the expansion or contraction of the contour curve, if If the area is large, expansion is required; otherwise, contraction is necessary. In this invention, the target region is significantly larger than the current region, so only expansion needs to be considered. The area can be represented by the following integral:
[0073]
[0074] The above formula is based on the convention that level set functions are "negative inside and positive outside": Represents the outline boundary. Corresponding to the outer region of the boundary, This represents the internal region (i.e., the region where the "area information" is located). Definition symbol. For a unit step function, when Its value is 1 at this time, a setting that facilitates subsequent description of the area increment during the contour expansion process. Shape error Defined as the area of the symmetric difference between the target and the current region:
[0075]
[0076] The profile length L(t) can be expressed by the following integral:
[0077]
[0078] Therefore, the adaptive expansion coefficient can be defined as:
[0079]
[0080] in, and These are the weighting coefficients for area-driven and shape-driven approaches, respectively. A regularization parameter is introduced to avoid numerical instability. Compared to the two-stage dynamics exhibited by the traditional balloon term, the first term ensures the area difference... The first term is a radial linear expansion term that converges exponentially to the uniform scaling factor of the second stage. The second term is a shape error term that maintains a certain driving force when the area difference is close to zero but the shape error still exists, so that the inflation term does not disappear too early, thus avoiding the model stopping the scaling too early. In addition, to avoid numerical oscillation and improve the stability of evolution, this paper performs exponential weighted smoothing on the time:
[0081]
[0082] where is the smoothing factor, represents the new parameter value or observation value calculated at time . This strategy can eliminate the violent fluctuations of the inflation term in the iteration process without affecting the overall convergence speed, ensuring the continuity of the spacetime surface and the stable evolution of the geometric curvature. Finally, in the evolution equation, replaces the constant coefficient of the original area term, as shown in equation 8.
[0083]
[0084] Through the above design, the area difference and the shape error are dynamically coupled and controlled during the evolution process: when is large, the inflation term is mainly driven by the area difference; when is small but still exists, the shape term continues to provide additional contraction or expansion force, so that the size and shape converge synchronously on the time axis. This method effectively eliminates the physical mutation phenomenon of the original model in the transition stage, making the overall geometric change process smoother, and the reconstruction result presents a natural transition as Figure 2 right.
[0085] The traditional sign function is not differentiable at zero, which easily leads to numerical instability. Therefore, a smoothed version is introduced, such as
[0086]
[0087] which remains consistent with when far away from zero, and provides a continuous and differentiable transition within the neighborhood. In addition, to ensure the stability of numerical calculation, the upper and lower bound constraints are imposed on the inflation speed parameter :
[0088]
[0089] This constraint can effectively suppress the phenomenon of too fast expansion due to too rough contour region in the initial stage. Fast expansion may cause numerical divergence or instability, thus affecting the convergence of the entire evolution process.
[0090] S6. Variational derivation and level set evolution equation
[0091] In the level set method based on energy functional, the evolution process of the contour region can be formalized as an energy minimization problem. To obtain the optimal solution, the idea of gradient descent is usually adopted, that is, by controlling the time evolution of the level set function ϕ, it is constantly approximated to the stable state along the direction of energy descent. Specifically, the evolution equation can be expressed as
[0092]
[0093] where represents the energy functional of the variational derivative of the level set function . By expanding each term in the energy and taking the variation, the following form can be obtained:
[0094] (1) Curve length term:
[0095] (2) Expansion term:
[0096] (3) Shape prior term:
[0097] In the above terms, the curve length term realizes the constraint of geometric smoothness by introducing the curvature operator, which is defined as
[0098]
[0099] Its essence is the average curvature of the level set surface, which can suppress the high-frequency oscillation of the local boundary and ensure the smoothness of the curve or surface. The expansion term controls the speed of interface expansion or contraction through the adjustment of the factor , thus determining the overall scale evolution trend. The shape prior term realizes the difference between the current interface and the target shape , so that the evolution process is not only constrained by geometry, but also guided by global shape information. Combining the above variational results, the complete level set evolution equation can be obtained:
[0100]
[0101] where is the weight coefficient of curvature smoothing term, which is used to regulate the smoothness of local geometry; is the dilation term control factor, which controls the expansion or contraction of the overall scale; is the strength coefficient of shape prior constraint, which is used to balance the consistency of geometric smoothness and target shape. Formula 16 simultaneously considers the local geometric smoothness, dilation constraint term and global target constraint, so as to smoothly fuse multiple initial contours into a single target curve during the evolution process.
[0102] S7. Numerical Discretization and Stabilization Strategy
[0103] To ensure numerical stability and differentiability, the smooth function and function approximation are used, respectively, and , are represented. In numerical calculation, the continuous domain is discretized into a two-dimensional pixel grid, and the spatial step size is taken . The gradient adopts finite difference approximation, and the curvature term can be calculated by the second-order difference formula. The time discretization adopts explicit iteration:
[0104]
[0105] where The value needs to meet the stability condition, and usually , is the iteration result of formula 16. To ensure that the level set function satisfies the properties of signed distance function (i.e. ), the Sussman algorithm is usually used to perform reinitialization regularly.
[0106] S8. Additive Superposition and Three-dimensional Reconstruction
[0107] In the process of three-dimensional reconstruction, the two-dimensional level set function sequence is stacked along the time axis into a three-dimensional volume field , where is the sampling time. Then, the frame sequence is converted into a tensor, and optional Gaussian filtering (standard deviation ) is used to smooth the noise and improve the smoothness. Subsequently, the Marching Cubes algorithm is used to generate the vertex and face index of the space-time surface, realizing the output of the three-dimensional model.
[0108] S9. Three-dimensional Grid Thick Shell Processing Step
[0109] To realize intelligent manufacturing, the obtained three-dimensional mesh also needs to be "thickened inward" for 3D printing (such as Figure 3 ). The present application adopts mesh domain thickening, first extracts the outer surface mesh from the isosurface, and performs constrained inner offset based on the consistent normal on the millimeter scale; self-intersection or collision detection is performed and local rollback reconstruction is implemented. In order to maintain the open shape, a pair of rings is constructed at the cup mouth and a suture bridge is implemented, so that the outer wall and the inner wall are continuously connected at the mouth edge, thereby forming a thin shell suitable for 3D printing. The difficulty lies in the normal direction, thin wall simplification and topological robustness.
[0110] Finally, in the simplification stage, a progressive error metric with thickness constraint is adopted, the boundary vertices are locked, cross-wall welding is prohibited, and the quantitative tolerance is controlled within 5% of the wall thickness; combined with connected component retention and non-manifold detection, the model not only meets the manufacturing requirements in terms of millimeter-level dimensional accuracy and structural integrity, but also significantly reduces storage and transmission costs.
[0111] The embodiments of the present application are given for example and description, although the embodiments of the present application have been shown and described above, it can be understood that the above-mentioned embodiments are exemplary and cannot be understood as limiting the present application, and the changes, modifications, replacements and modifications of the above-mentioned embodiments made by those skilled in the art within the scope of the present application shall be included in the protection scope of the present application.
Claims
1. An energy-driven manufacturing method for generating a three-dimensional Chinese character cup model, characterized in that, The method comprises the following steps: S1: input definition and goal setting, receive multi-contour initial region and single target contour, construct smooth time evolution path, and fuse multi-contour into single target contour; S2: define calculation domain, level set function, smooth approximation function, and adaptive control factor; S3: construct vector signed distance function for representing geometric information of contour; S4: construct energy functional, and model multi-contour fusion process as energy minimization problem; S5: design adaptive inflation controller for dynamically and adaptively adjusting inflation coefficient; S6: obtain level set evolution equation through variational derivation; S7: perform numerical discretization and stabilization processing; S8: add two-dimensional evolution sequence along time axis to three-dimensional volume field, and perform three-dimensional reconstruction; S9: perform thick shell processing on three-dimensional grid to generate thin shell structure suitable for 3D printing; The adaptive control factor refers to an adaptive inflation control factor introducing time dependence The dynamic adaptive adjustment of the driving force intensity balances the area residual and shape error in the evolution process on the basis of the geometric regular term constraint curve smoothness, and ensures the convergence stability and physical rationality of the curve approximation target contour. The adaptive inflation controller is an inflation coefficient that is self-adaptively adjusted over time , area difference of introduced region , shape error and boundary length, forming a dynamic coupling control mechanism The inflation coefficient mathematical expression is: ; wherein, is a difference between the target area and the current area, is a shape symmetric difference area, is a current boundary length, , is a weight coefficient, is a regularization parameter, is a smoothed sign function; In the step S4, the energy functional is: ; including a curve length regularization term , an inflation term and a shape prior term ; to smooth the weight coefficients, for controlling the curvature smoothness strength of the contour boundary; time-varying adaptive dilation coefficients for dynamically regulating dilation or contraction behavior of the contours; Target shape constraint weight coefficients are for controlling the strength of the current contour's approximation to the target contour.
2. The method of claim 1, wherein, In the step S1, the construction of the time evolution path comprises: evolving the multi-contour initial region into single target contour; constructing three-dimensional space-time body model based on the path, and outputting printable three-dimensional Chinese character cup model through thick shell processing.
3. The method of claim 1, wherein, The step S3 comprises: mapping discrete grid coordinate system to continuous geometric space; splitting input closed region into line segment set, and batch calculating minimum distance from pixel point to line segment; using global even-odd rule to judge whether the pixel point is located inside the polygon, so as to process complex contour containing hole or nested structure.
4. The method of claim 1, wherein, In the step S6, the level set evolution equation is: ; wherein, denotes the local curvature of the contour described by the level set function, used to control the smoothness of the boundary; is a differentiable approximation of the standard Dirac function used to handle the evolution of the boundaries stably in numerical calculations; is a differentiable approximation of the unit step function used to distinguish between the inner and outer regions of the profile; Geometric information for describing a target shape.
5. The method of claim 1, wherein, The step S9 comprises: obtaining outer surface grid through isosurface extraction and constrained inside offset technology, and performing self-intersection detection; constructing matching ring at opening and performing suture bridging; performing grid simplification through thickness-constrained progressive error metric, and controlling tolerance within 5% of wall thickness.
6. A system for generating a model of a three-dimensional Chinese character cup, comprising: The system is used for implementing the method of any one of claims 1-5, and comprises: input module for receiving multi-contour initial region and target contour; processing module for performing level set evolution, energy functional optimization, and three-dimensional reconstruction; output module for generating three-dimensional grid file suitable for 3D printing.
7. A non-transitory computer readable storage medium storing a computer program, the program implementing the method of any one of claims 1-5 when executed by a processor.
Citation Information
Patent Citations
ACM (Active Contour Model) image rapid segmentation method based on gray scale morphological energy method
CN106570867A
Narrowband constraint-based local segmentation method for geometric activity contour model image
CN107993237A