A rose petal simulation algorithm
By combining the MCP incompatible mathematical formula and the minimum energy mechanism, and using the DCC method and a semi-implicit Euler time integrator, a petal solver was designed to achieve high-precision, real-time simulation of rose petal morphology. This solves the problems of high simulation complexity and low accuracy in existing technologies, and improves the realism and efficiency of the simulation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- KUNMING UNIV OF SCI & TECH
- Filing Date
- 2026-03-23
- Publication Date
- 2026-06-19
Smart Images

Figure CN122244380A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital image modeling, and more specifically to a rose petal simulation algorithm. Background Technology
[0002] In the development of products such as 3D virtual scene construction, real-time rendering, film and television special effects, game rendering, virtual reality, game special effects, and digital gardening, the simulation of natural plants is one of the core elements. As the most widely used flower model, the rose has a complex petal structure with features such as natural curvature, edge wrinkles, and dynamic flexible deformation, which places high demands on the realism, efficiency, and controllability of simulation algorithms in machine learning.
[0003] Traditional methods for simulating rose petals mainly include geometric parameter-based modeling methods and physics-based reinforcement learning simulation methods. Geometric parameter-based methods typically use parametric surfaces or spline curves to describe the shape of the petals, but this method struggles to accurately simulate the complex curling and tip features of the petal edges. While physics-based methods can simulate the dynamic growth process of petals, they are often computationally complex and fail to capture the evolutionary process of the petals.
[0004] In recent years, research has found that the unique morphology of rose petals originates from the MCP (Mainardi-Codazzi-Peterson) incompatibility. This geometric rule is the core mechanism for the formation of petal tips. However, existing technologies have not yet organically combined the mathematical formula of MCP incompatibility with the minimum energy mechanism, making it impossible to achieve high-precision and high-fidelity simulation of petal morphological evolution. Therefore, developing a rose petal image generation simulation algorithm based on physical and mathematical mechanisms that can completely simulate the petal evolution process and accurately predict tip features has become an urgent technical problem to be solved. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention provides a rose petal simulation algorithm.
[0006] To achieve the above technology, the specific steps are as follows:
[0007] S1. Set the parameters required for the rose petal simulation process to provide basic data for subsequent modeling;
[0008] S2. Construct the geometric and energy equations for the rose petals to generate the initial mesh;
[0009] S3. Based on S2, design a petal solver;
[0010] S4. Based on S3, simulate the evolution of petal morphology;
[0011] S5. Based on S4, simulate the physical effects of the petal edges to improve the realism of the petal simulation;
[0012] S6, based on S5, provides real-time visualization output;
[0013] S7. Based on S6, determine whether the preset number of iterations or the target shape has been reached. If not, return to S3; otherwise, output the final simulation result.
[0014] Furthermore, the parameters include physical parameters and geometric parameters. The physical parameters include Young's modulus, petal thickness, reference radius, and initial reference curvature. The simulation parameters include the number of spikes, edge enhancement coefficient, radial contraction coefficient, time step, and number of iterations, wherein the number of spikes is set to 5.
[0015] Furthermore, in S2, the geometric equation for the rose petals is expressed as:
[0016]
[0017] In the formula, This represents an MCP-incompatible tensor; Indicates along The derivative of the direction; Indicates along The derivative of the direction; Indicates about The second basic form; Indicates about The second basic form; Indicates the second basic form along Covariant derivative of direction; Indicates along Covariant derivative of direction;
[0018] when This indicates the presence of MCP incompatibility, providing a geometric basis for petal tip formation.
[0019] Furthermore, in S2, the equilibrium shape of the petals is determined by minimizing the total energy. The formula for calculating the petal energy equation is:
[0020]
[0021] In the formula, This represents Young's modulus, used to characterize the stiffness of petal materials; The petal thickness is represented by κ0; the reference curvature is represented by R0; and the petal reference radius is represented by R0. Let be the area of the petal element.
[0022] Furthermore, in S2, the differential coordinate calculation method (DCC) is used to discretize the petal surface, representing the continuous petal surface as a triangular mesh to improve the accuracy of the petal curling process.
[0023] Furthermore, in S3, a semi-implicit Euler time integrator is used to advance the time frame to ensure the stability and convergence of the simulation. Specific operations include:
[0024] Calculate the target stationary side length and dihedral angle based on the current petal state;
[0025] Update the global shape of the petals using an energy minimization method;
[0026] Record the coordinate changes of the petal apex, observe and test the dynamic changes in the petal shape and edges;
[0027] Iterative control logic: In each iteration, the proportional reference curvature κ0 is increased every preset iteration step, the total elastic energy of the current time step is calculated, and the vertex coordinates of the petal mesh are updated by the energy minimization method.
[0028] Furthermore, in S4, the formula for petal morphology evolution is as follows:
[0029]
[0030] The continuous changes in petal shape can be controlled by adjusting the κ0 value.
[0031] Petal shapes include:
[0032] Smooth phase: κ0 < 0.1; Saddle phase: 0.1 ≤ κ0 < 0.5; Acute angle phase: κ0 ≥ 0.5.
[0033] Furthermore, in S5, the physical effects of simulating the edges of petals include:
[0034] Tip effect: The tip effect of petal edges is achieved through a sinusoidal modulation mechanism, that is, introducing sinusoidal perturbations into the edge region to simulate the serrated characteristics of natural leaf edges, expressed as:
[0035]
[0036]
[0037] In the formula, and These represent the original vertex coordinates; and These represent the modulated vertex coordinates; and They represent and Amplitude parameters in the direction; Indicates wave number; Indicates the arc length parameter; Indicates phase shift; Indicates phase difference;
[0038] The number of spikes is set to 5 to generate 5 evenly spaced oscillations around the edges, improving the realism of the simulation;
[0039] Edge enhancement mechanism: Implemented through the exponentiation of normalized radial coordinates, the formula is as follows:
[0040]
[0041] In the formula, Indicates exponentiation; Normalized radial coordinates; The edge enhancement coefficient is used to control the growth rate of edge deformation through exponentiation.
[0042] Petal contraction effect:
[0043]
[0044] The petal contraction effect is used to simulate the contraction behavior of petals when they are dry or when the environment changes.
[0045] Furthermore, in S6, the visualization output is as follows: after each iteration, the coordinates of the deformed vertices are updated to the new mesh, the face normals and vertex normals are recalculated, and a morphological feature-based shading mode is adopted (colors are assigned according to curvature, and the greater the curvature, the more vivid the color), and the visualization results are output to show the petal morphological evolution process in real time.
[0046] Furthermore, in S6, the formula for calculating the surface normal is as follows:
[0047]
[0048] In the formula, Represents the surface normal; and Let A and B represent the sides from vertex A to vertex B and from vertex A to vertex C of the triangle, respectively.
[0049] For a triangular mesh, the normal to each face is calculated by the cross product of the two edge vectors, and then normalized. The calculation formula is as follows:
[0050]
[0051] In the formula, Indicates the number of adjacent faces. Indicates the adjacent face index; Represents the vertex normal; Indicates the first Normals of each face;
[0052] Vertex normals are obtained by averaging the normals of adjacent faces, ensuring the visual continuity of smooth surfaces.
[0053] Beneficial effects of the present invention
[0054] (1) High-precision recognition capability: By combining the MCP incompatible mathematical formula, minimum energy mechanism and DCC method, a high-precision simulation of rose petal morphology is achieved. The algorithm can accurately capture the complex curling and tip features of the petal edge. Compared with traditional geometric fitting and basic physical simulation methods, it has significantly improved simulation accuracy and recognizability. The simulation results are closer to the natural rose petal morphology.
[0055] (2) Algorithm for simulating the complete evolution of petals: The algorithm realizes the computer simulation of the complete evolution process of petals from smooth to saddle shape and then to acute angle. The algorithm can accurately predict the change of petal shape when the reference curvature κ0 changes. The evolution process from axisymmetric smooth shape to saddle shape and polygonal structure is continuous and conforms to the laws of nature.
[0056] (3) High computational performance: The DCC method is used to discretize the petal surface, and the time advancement strategy of the semi-implicit Euler time integrator is combined with the time-advancing strategy, which significantly improves the computational efficiency while ensuring high robustness. The system can realize real-time petal morphology simulation on general-purpose computer hardware.
[0057] (4) Realistic simulation of details: Through precise modeling of edge effects such as sinusoidal modulation, edge enhancement, and petal shrinkage, the natural details such as edge jaggedness, thickness variation, and radial shrinkage of rose petals are restored, further improving the realism and recognizability of the simulation. It can be widely applied to various scenarios that require high-fidelity rose petal simulation. Attached Figure Description
[0058] Figure 1 This is a flowchart of the steps of the present invention;
[0059] Figure 2 This is an overall flowchart of the present invention;
[0060] Figure 3 This is a diagram illustrating the petal re-meshing and normal update effects in an embodiment of the present invention; wherein, Figure 3 (a) is the original mesh; Figure 3 (b) is the updated grid; Figure 3 (c) shows the effect of normal update;
[0061] Figure 4 This is a diagram illustrating the color update effect in an embodiment of the present invention.
[0062] Figure 5 This is a schematic diagram illustrating the morphological evolution of rose petals in an embodiment of the present invention, wherein... Figure 5 (a) is a schematic diagram of the smoothing stage; Figure 5 (b) is a schematic diagram of the saddle-shaped stage; Figure 5(c) is a schematic diagram of the acute angle stage; Detailed Implementation
[0063] The present invention will be further described in detail below with reference to specific embodiments.
[0064] See Figure 1 and Figure 2 As shown, this invention provides a rose petal simulation algorithm based on the MCP incompatible mathematical formula, minimum energy mechanism, and DCC method. It accurately simulates the complete evolution of rose petals from a smooth shape to a saddle shape, and then to an acute-angled tip. This allows for dynamic adjustment of petal shape under varying reference curvature, improving the realism, recognizability, and computational efficiency of the petal simulation. It also possesses the ability to predict tip features. Specific steps include:
[0065] S1, parameter initialization;
[0066] Set the physical and geometric parameters required for the rose petal simulation process to provide basic data for subsequent modeling;
[0067] The physical parameters include: Young's modulus, petal thickness, reference radius, and initial reference curvature;
[0068] The simulation parameters include: number of spikes, edge enhancement coefficient, radial contraction coefficient, time step, and number of iterations.
[0069] S2, Basic Modeling;
[0070] This invention uses the MCP incompatibility mathematical formula as its theoretical basis, constructs the MCP incompatibility tensor, and establishes the total elastic energy equation by combining the minimum energy mechanism. The petal surface is discretized by the DCC method to generate an initial triangular mesh, and the differential coordinates of the mesh vertices are calculated to determine the petal mesh under the initial smooth morphology.
[0071] The MCP incompatibility, short for Mainardi-Codazzi-Peterson incompatibility, is a geometric incompatibility phenomenon. At its core, it refers to the fact that the reference metrics (defining the distance and angle between line elements) and the reference curvature (characterizing the change of normal vectors) describing a surface violate the constraints of the MCP equations, causing the surface to be unable to be smoothly embedded in three-dimensional Euclidean space, which in turn leads to system distortion and stress concentration.
[0072] Based on the MCP incompatibility mathematical formula, the rotation of the normal vector around the closed trajectory under the quantification reference state is specifically expressed as follows:
[0073]
[0074] In the formula, This represents an MCP-incompatible tensor; Describing the covariant derivative, , and These represent the coordinate directions of the surface, Indicates along The derivative of the direction, Indicates along The derivative of the direction; Indicates about The second basic form; Indicates about The second basic form; Indicates the second basic form along Covariant derivative of direction; Indicates along Covariant derivative of direction; when This indicates the existence of MCP incompatibility, providing a geometric basis for the formation of petal tips;
[0075] According to the minimum energy mechanism, the equilibrium shape of the petals is determined by minimizing the total energy. The formula for calculating the petal energy is:
[0076]
[0077] In the formula, This represents Young's modulus, used to characterize the stiffness of petal materials; The petal thickness is represented by κ0; the reference curvature is represented by R0; and the petal reference radius is represented by R0. The area of the petal element;
[0078] By combining the differential coordinate calculation method (DCC) to discretize the petal surface, the continuous petal surface is represented as a triangular mesh. The local geometric features (curvature, torsion, etc.) of the surface are described by calculating the differential coordinates of the mesh vertices, so as to achieve accurate modeling of the petal curling process.
[0079] S3, Petal Solver Design;
[0080] A petal solver based on physics and mathematics was developed, and a semi-implicit Euler time integrator was used to advance the time frame stepwise to ensure the stability and convergence of the simulation.
[0081] Timeframe progression, which involves performing the following operations sequentially within each time step:
[0082] Calculate the target stationary side length and dihedral angle based on the current petal state;
[0083] The global shape of the petals is updated using an energy minimization method to satisfy its constraints.
[0084] Record the coordinate changes of petal vertices (especially edge vertices), observe and test the dynamic changes of petal shape and edges, and provide data support for morphological evolution and feature prediction;
[0085] Iterative control logic: In each iteration, the reference curvature κ0 is dynamically increased (by 0.1 every 100 iterations), the total elastic energy of the current time step is calculated, the petal mesh vertex coordinates are updated by the energy minimization method, and the position changes of the edge vertices are recorded.
[0086] S4. Simulation of the petal morphological evolution process;
[0087] The petal shape is controlled by referencing the curvature κ0. When κ0 increases, the degree of curvature of the petal increases and the sharp points of the edges become sharper. By dynamically adjusting the value of κ0, the continuous change of the petal shape is controlled, thus achieving precise control over the petal shape evolution process.
[0088] The formula for the evolution of petal morphology is as follows:
[0089]
[0090] Dynamically adjusting the κ0 value to control continuous changes in petal morphology includes:
[0091] Smooth stage (κ0<0.1): In the early stage of petal development, the petal surface presents a relatively smooth shape. At this time, the petal edge is a smooth fan shape with uniform curvature. The petal morphology of the smooth stage is simulated by setting a small κ0 value and uniform growth parameters.
[0092] Saddle-shaped stage (0.1≤κ0<0.5): As the petals grow and develop, some areas begin to show opposite curvature signs, forming a saddle-shaped structure. The characteristic of this stage is that there are positive and negative curvature areas on the petal surface at the same time, similar to the shape of a saddle. The formation of the saddle-shaped structure can be simulated by adjusting the growth parameters and κ0 values of different areas.
[0093] Acute Angle Stage (κ0≥0.5): In the later stage of petal development, sharp angular structures begin to form in the edge region. The formation of these cusps is a direct manifestation of MCP incompatibility. The formation process of cusps can be simulated by setting a larger κ0 value and a special growth pattern in the edge region.
[0094] Meanwhile, as κ0 increases, the evolution of petals from an axisymmetric smooth shape to a saddle shape, a triangle, and a pentagon is simulated, with the number of peaks set to 5 to correspond to the 5 typical tips of a rose petal.
[0095] S5, Algorithm implementation of edge effect;
[0096] This invention simulates various physical effects at the edges of flower petals in detail to enhance the realism of the petal simulation, including:
[0097] Tip effect (sine modulation): The tip effect of the petal edge is achieved through a sinusoidal modulation mechanism. The system introduces high-frequency sinusoidal perturbations into the edge region to simulate the serrated characteristics of natural leaf edges. Specifically, periodic edge ripples are formed by superimposing sinusoidal function modulation on the coordinates of the edge points.
[0098]
[0099]
[0100] In the formula, and These represent the original vertex coordinates; and These represent the modulated vertex coordinates; and They represent and Amplitude parameters in the direction; Indicates wave number; Indicates the arc length parameter; Indicates phase shift; Indicates phase difference;
[0101] In practical applications, the number of spikes is set. =5, through Five evenly spaced oscillations are generated around the edge, and the modulation amplitude is scaled according to the peak formation rate to form a flower-shaped serrated edge that matches the edge features of a real rose petal.
[0102] Edge enhancement mechanism: Edge enhancement is achieved through nonlinear amplification of local curvature. The system sets a special curvature amplification factor in the edge region, which enhances the curvature of the edge relative to the inner region. This enhancement mechanism not only makes the edges more prominent but also simulates the thickness variation and texture features of real petal edges. Specifically, it is achieved through the power operation of normalized radial coordinates, as shown in the formula:
[0103]
[0104] In the formula, Indicates exponentiation; Normalized radial coordinates; The edge enhancement coefficient is used to control the growth rate of deformation near the edge through exponentiation, thereby achieving greater deformation in the boundary direction while maintaining relative smoothness in the central region.
[0105] Petal contraction effect: Petal contraction is achieved through anisotropic contraction parameters. The system sets different contraction rates for different regions of the petal to simulate the contraction behavior of the petal when it is drying or when the environment changes. During the contraction process, the overall shape of the petal remains unchanged, but its size is reduced proportionally, while the detailed features of the edges are preserved and enhanced. The specific formula is as follows:
[0106]
[0107] This formula simulates the slight radial inward contraction during deformation, restoring the natural phenomenon that petals not only curl upwards but also have their edges slightly contracting towards the center.
[0108] S6, Visual output;
[0109] After each iteration, the original mesh data is copied, the deformed vertex coordinates are updated to the new mesh, the face normals and vertex normals are recalculated, a morphological feature-based shading mode is adopted (colors are assigned according to curvature, the greater the curvature, the more vivid the color), and the image-enhanced visualization results are output to show the petal morphological evolution process in real time.
[0110] New Mesh Generation: The algorithm generates a new triangular mesh at each time step or during morphological changes. Mesh generation employs a constrained Delaunay triangulation method to ensure mesh quality and topological correctness. The new mesh not only reflects the changes in petal shape but also maintains topological consistency with the original mesh. In specific implementation, a copy of the original mesh is created to preserve its undeformed state, and the updated vertex positions after deformation are inserted into the mesh structure to ensure the original mesh remains intact. The result then includes the newly deformed geometry, such as... Figure 3 middle Figure 3 (a) Figure 3 (a) and Figure 3 As shown in (a);
[0111] Normal recalculation: The system automatically recalculates the normal vectors of all vertices and triangles. The formula for calculating the face normal is as follows:
[0112]
[0113] In the formula, Represents the surface normal; and Let A and B represent the sides from vertex A to vertex B and from vertex A to vertex C of the triangle, respectively.
[0114] For a triangular mesh, the normal to each face is calculated by the cross product of the two edge vectors, and then normalized. The calculation formula is as follows:
[0115]
[0116] In the formula, Indicates the number of adjacent faces. Indicates the adjacent face index; Represents the vertex normal; Indicates the first Normals of each face;
[0117] Vertex normals are obtained by averaging the normals of adjacent faces, ensuring the visual continuity of smooth surfaces;
[0118] Color Update Mechanism: Offers optional color update functionality, supporting both physically based coloring and morphologically based coloring modes. Physically based coloring considers the optical properties of the petals and lighting conditions, calculating brightness and darkness effects using the Phong lighting model. Morphologically based coloring automatically assigns colors based on the petals' curvature, thickness, position, and other characteristics, highlighting the petals' morphological features and evolutionary process, thus enhancing the realism of the visualization. Figure 4 As shown.
[0119] S7. Iteration control and termination judgment;
[0120] After each iteration, determine whether the preset number of iterations or the target shape has been reached: if not, return to step 3, continue advancing the time frame, and dynamically increase the reference curvature; if the target has been reached, output the final simulation result.
[0121] To verify this invention, a simulation was conducted in a hardware environment with an Intel Core i7 processor, 16GB of RAM, and a GTX 1660 graphics card.
[0122] like Figure 5 middle Figure 5 (a) Figure 5 (b) and Figure 5 As shown in section (c), the morphological evolution is verified as follows: when κ0=0.05 (smooth stage), the petals present an axially symmetric smooth fan shape; when κ0=0.3 (saddle-shaped stage), the petals form a typical saddle-shaped structure, with both positive and negative curvature regions; when κ0=0.6 (acute angle stage), the petal edges form 5 sharp tips, presenting a pentagonal structure; the evolution process is consistent with that of natural rose petals.
[0123] The computational efficiency is ≤0.02s per frame, enabling real-time visualization at over 50fps, meeting the needs of practical applications.
[0124] The simulated petals have a morphological similarity of ≥95% with real rose petals, and the accuracy of identifying edge details and tip features is ≥98%.
Claims
1. A rose petal simulation algorithm, characterized in that, Includes the following steps: S1. Set the parameters required for the rose petal simulation process to provide basic data for subsequent modeling; S2. Construct the geometric and energy equations for the rose petals to generate the initial mesh; The petal geometric equation is constructed based on the MCP incompatible mathematical formula; S3. Based on S2, design a petal solver; The petal solver is constructed using a semi-implicit Euler time integrator; S4. Based on S3, simulate the evolution of petal morphology; S5. Based on S4, simulate the physical effects of the petal edges to improve the realism of the petal simulation; S6, based on S5, provides real-time visualization output; S7. Based on S6, determine whether the preset number of iterations or the target shape has been reached. If not, return to S3; otherwise, output the final simulation result.
2. The rose petal algorithm of claim 1, wherein, The parameters include physical parameters and geometric parameters. The physical parameters include Young's modulus, petal thickness, reference radius, and initial reference curvature. The simulation parameters include the number of spikes, edge enhancement coefficient, radial contraction coefficient, time step, and number of iterations. The number of spikes is set to 5.
3. The rose petal algorithm of claim 2, wherein, In S2, the geometric equation of the rose petals is expressed as: ; wherein denotes the MCP incompatible tensor; denotes the derivative along the direction; denotes the derivative along the direction; denotes the second fundamental form with respect to ; denotes the second fundamental form with respect to ; denotes the covariant derivative of the second fundamental form along the direction; denotes the covariant derivative along the direction; When MCP incompatibility, providing a geometric basis for petal tip formation.
4. The rose petal algorithm of claim 3, wherein, In step S2, the equilibrium shape of the petals is determined by minimizing the total energy. The formula for calculating the petal energy equation is as follows: ; In the formula, represents the Young's modulus, used to characterize the petal material stiffness; represents the petal thickness; κ0 is the reference curvature; R0 is the petal reference radius; is the petal micro-element area.
5. The rose petal algorithm of claim 4, wherein, In step S2, the differential coordinate calculation method (DCC) is used to discretize the petal surface, representing the continuous petal surface as a triangular mesh to improve the accuracy of the petal curling process.
6. The rose petal algorithm of claim 5, wherein, In S3, a semi-implicit Euler time integrator is used to advance the time frame to ensure the stability and convergence of the simulation. Specific operations include: Calculate the target stationary side length and dihedral angle based on the current petal state; Update the global shape of the petals using an energy minimization method; Record the coordinate changes of the petal apex, observe and test the dynamic changes in the petal shape and edges; Iterative control logic: In each iteration, the proportional reference curvature κ0 is increased every preset iteration step, the total elastic energy of the current time step is calculated, and the vertex coordinates of the petal mesh are updated by the energy minimization method.
7. The rose petal simulation algorithm according to claim 6, characterized in that, In S4, the petal morphology evolution formula is as follows: ; The continuous change in petal shape is controlled by adjusting the κ0 value; Petal shapes include: Smooth phase: κ0 < 0.1; Saddle phase: 0.1 ≤ κ0 < 0.5; Acute angle phase: κ0 ≥ 0.
5.
8. The rose petal simulation algorithm according to claim 7, characterized in that, In S5, the physical effects simulating the edges of petals include: Tip effect: The tip effect of petal edges is achieved through a sinusoidal modulation mechanism, that is, introducing sinusoidal perturbations into the edge region to simulate the serrated characteristics of natural leaf edges, expressed as: ; ; In the formula, and These represent the original vertex coordinates; and These represent the modulated vertex coordinates; and They represent and Amplitude parameters in the direction; Indicates wave number; Indicates the arc length parameter; Indicates phase shift; Indicates phase difference; The number of spikes is set to 5 to generate 5 evenly spaced oscillations around the edges, improving the realism of the simulation; Edge enhancement mechanism: Implemented through the exponentiation of normalized radial coordinates, the formula is as follows: ; In the formula, Indicates exponentiation; Normalized radial coordinates; The edge enhancement coefficient is used to control the growth rate of edge deformation through exponentiation. Petal contraction effect: ; The petal contraction effect is used to simulate the contraction behavior of petals when they are dry or when the environment changes.
9. The rose petal simulation algorithm according to claim 8, characterized in that, In S6, the visualization output is performed as follows: after each iteration, the coordinates of the deformed vertices are updated to the new mesh, the face normals and vertex normals are recalculated, and a shading mode based on morphological features is used to output the visualization results, which show the petal morphological evolution process in real time.
10. The rose petal simulation algorithm according to claim 9, characterized in that, In S6, the formula for calculating the surface normal is as follows: ; In the formula, Represents the surface normal; and Let A and B represent the sides from vertex A to vertex B and from vertex A to vertex C of the triangle, respectively. For a triangular mesh, the normal to each face is calculated by the cross product of the two edge vectors, and then normalized. The calculation formula is as follows: ; In the formula, Indicates the number of adjacent faces. Indicates the adjacent face index; Represents the vertex normal; Indicates the first Normals of each face; Vertex normals are obtained by averaging the normals of adjacent faces, ensuring the visual continuity of smooth surfaces.