Virtual plant real-time bending shaping method based on adjustable stiffness weight

By using a real-time bending and shaping method for virtual plants based on adjustable stiffness weights, the problems of inconsistency with reality and physical instability in virtual plant simulation are solved, and progressive flexible bending of realistic branches under stress is achieved, thus improving rendering performance.

CN121145285AActive Publication Date: 2025-12-16HENAN WEIDA ELECTRONIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies for virtual plant simulation suffer from problems such as inconsistency with reality, physical instability, rigid shapes, and rendering performance bottlenecks, making it difficult to construct structurally realistic and morphologically lifelike 3D models and realize their interaction with the environment.

Method used

A real-time bending and shaping method for virtual plants based on adjustable stiffness weights is adopted. By configuring plant and environmental parameters, weighted inverse dynamic bending processing, interpolation processing and subdivision are performed. Combined with Catmull-Rom curve interpolation, the gradual stiffness and weak bending moment constraints of the plant structure are realized, ensuring that the bending shape of the virtual plant conforms to the stress of real branches.

Benefits of technology

The virtual plant's curved shape closely matches the stress on real branches, maintaining constraints from root to tip, presenting a progressive and flexible bend. This solves the problems of inconsistency with reality and physical instability in traditional simulations, and improves rendering performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121145285A_ABST
    Figure CN121145285A_ABST
Patent Text Reader

Abstract

The invention provides a virtual plant real-time bending shaping method based on an adjustable rigidity weight, parameter information of a virtual plant is configured, a parameterized plant model is generated, and the parameter information at least comprises plant parameter information, plant control parameter information and environment parameter information; when the interaction mode is activated and the tail end of the plant is dragged, obtaining and fixing the tail end of the plant model at a dragging target position; according to the dragged target position, weighted inverse dynamic bending processing and interpolation processing are carried out on the dragged virtual plant structure; according to the updated dragged virtual plant structure, synchronously updating other branch structures of the virtual plant; subdivision and Catmull-Rom curve interpolation processing are carried out on the virtual plant structure after the overall updating is carried out on the virtual plant structure; and ending the interaction mode and carrying out solidification operation on the currently updated virtual plant structure. According to the method, the bending form of the virtual plant is highly attached to the stress of a real branch through gradual rigidity, a mass curve, weak bending moment constraint and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of virtual plants, and in particular to a method for real-time bending and shaping of virtual plants based on adjustable stiffness weights. Background Technology

[0002] Virtual plants are mathematical models built upon computer technology, incorporating theories and techniques from botany, plant ecology, soil science, information science, applied mathematics, and visualization. Modern agricultural machinery design relies heavily on computers, and introducing virtual plant models into computer-aided analysis to create dynamic visualization simulation models of mechanical components and plant systems can not only improve the accuracy of agricultural machinery design but also significantly shorten experimental cycles and reduce geographical and spatial limitations. Furthermore, as a key technology in digital agricultural scientific research, the three-dimensional visualization of virtual plants has broad application prospects in virtual farmland experiments, natural landscape reproduction, new crop cultivation, and plant growth cycle simulation. However, due to the vast differences in plant morphology and the complexity of their physiological processes, constructing structurally realistic and morphologically lifelike three-dimensional models and realizing their interaction with the environment remains a current research hotspot and challenge.

[0003] Plant morphology simulation refers to simply capturing the external morphological structure of plants to create realistic plant graphics, primarily used in game scene design, advertising creativity, and graphic education. Currently, traditional interactive plant simulations suffer from multiple problems, including inconsistencies with reality, physical instability, rigid shapes, and rendering performance bottlenecks. Summary of the Invention

[0004] To address the problems existing in the background art, this invention proposes a real-time bending and shaping method for virtual plants based on adjustable stiffness weights.

[0005] A method for real-time bending and shaping of virtual plants based on adjustable stiffness weights includes the following steps:

[0006] S100. Configure the parameter information of the virtual plant and generate a parameterized plant model, wherein the parameter information includes at least plant parameter information, plant control parameter information and environmental parameter information;

[0007] S200, when the interactive mode is activated and the plant end is dragged, the end of the plant model is obtained and fixed at the target position of the drag.

[0008] S300. Based on the target position of the drag, perform weighted inverse dynamic bending processing and interpolation processing on the dragged virtual plant structure.

[0009] S400. Based on the updated dragged virtual plant structure, synchronize and update the other branch structures of the virtual plant.

[0010] S500: Subdivide the updated virtual plant structure and perform Catmull-Rom curve interpolation for further smoothing.

[0011] S600: End the interactive mode and solidify the currently updated virtual plant structure.

[0012] Based on the above, in step S100, the virtual plant structure is configured with a trunk structure and a branch structure, and each trunk structure and branch structure is divided into multiple segments. A node is configured at the end of each segment, wherein the length of each segment is constant. The plant parameter information includes at least the number of trunk structures, the number of branch structures, the number of segments of the trunk structure and the branch structure, the segment length, and the segment cross-sectional dimensions.

[0013] Based on the above, in step S100, the plant control parameter information is configured for each of the main trunk structure and the branch structure. The plant control parameter information includes at least a stiffness variation curve, a mass distribution curve, an elastic recovery strength curve, and a cross-sectional thickness variation curve; the stiffness variation curve k(t) is:

[0014] k(t)=k tip +(k root -k tip )·(1-t) α k(t)∈[0,1]

[0015] Where, k root ∈[0,1] represents the root stiffness weight, k tip ∈[0,1] represents the tip stiffness weight, and α>0 represents the shape parameter;

[0016] The mass distribution curve is used to correlate gravity / wind response intensity. The mass distribution curve μ(t) is as follows:

[0017] μ(t)=μ tip +(μ root -μ tip )·(1-t) α μ(t)>0

[0018] Where, μ root >0 represents the root quality weight, μ tip >0 represents the tip mass weight, and α>0 represents the shape parameter;

[0019] The elastic recovery strength curve e(t) is:

[0020] e(t) = e tip +(e root -e tip )·(1-t) α,e(t)≥(s -1 )

[0021] Among them, s -1 e is the recovery intensity per second. root e tip ≥0 represents the "resilience strength" of the root / tip, and α is the shape parameter;

[0022] The cross-sectional thickness variation curve r(t) is as follows:

[0023] r(t) = r tip +(r root -r tip )·(1-t) α r(t)>0 (normalized)

[0024] Where, r root >0 represents the root radius, r tip >0 represents the tip radius, and α>0 represents the shape parameter.

[0025] Based on the above, in step S100, the environmental parameter information is associated with each of the main trunk structure and the branch structure through Verlet integral and distance-elasticity constraints. The environmental parameter information includes at least plant spatial coordinate information, environmental wind simulation information, and gravitational acceleration information; the Verlet integral is:

[0026] X t+1 =X t +(X t -X t-1 (1-d)+aΔt 2

[0027] a=g·μ(t)+wind

[0028] Among them, X t d is the world coordinate vector of the node or segment end at time t; d is the numerical damping, t is time, Δt is the duration of a single frame, a is the resultant acceleration of gravity and wind; g·μ(t) is gravity, g is the gravitational acceleration, μ(t) is the mass weight curve, and wind is the wind field equivalent acceleration vector from the environmental wind simulation.

[0029] Based on the above, distance-elasticity constraints include elastic recovery constraints and distance constraints. The elastic recovery constraint is as follows:

[0030]

[0031] λ(t,Δt)=1-exp(-e(t)Δt)

[0032] X end ←X start+L·Slerp(u,u rest ,λ(t,Δt))

[0033] Where e(t) is the elastic recovery strength curve; λ∈[0,1] are the single-frame interpolation coefficients, representing the "speed" of the swing back; u is the static direction unit vector; X end X represents the coordinates of the end point of the current segment. start Let L be the starting coordinates of the current segment, L be the natural length of the segment, and u be the unit vector in the current direction. rest is the unit vector of the static / reference direction, and Slerp is the spherical linear interpolation function used to smoothly transition between the current direction and the static direction;

[0034] The distance constraint is:

[0035] d = X end -X start ,δ=‖d‖-L,

[0036] X end ←X end -(1-k(t))c,X start ←X start -(1-k(t))c

[0037] Where, ‖d‖ is the current length of the segment; d = X end -X start The vector representing the distance from the end point to the beginning point is the actual segment vector; δ = ||d|| - L represents the difference between the current length and the natural length; δ > 0 indicates that the segment is stretched, and δ < 0 indicates that the segment is compressed. d represents the correction vector; k(t) is the stiffness curve value at the node; X end ←X end -(1-k(t))c means adding a portion of the error to the endpoint to correct the endpoint position; X start ←X start -(1-k(t))c indicates that if the starting point can be moved, the starting point should also be modified accordingly.

[0038] Based on the above, a weak bending moment constraint is also applied to the plant model by adding a bending spring to the angle between the starting position A of the parent segment, the starting position B of the current segment, and the ending position C of the child segment:

[0039] Δθ=θ current -θ restrot =AxisAngle(-k·Δθ)

[0040]

[0041] Where Δθ is the difference between the current angle and the natural angle, i.e., the bending deviation; θ current θ is the included angle formed by the three points (A–B–C). restrot The angle is the natural angle of the plant in its static posture when it is not under force; AxisAngle(-k·Δθ) represents the angle of rotation around a certain axis; k is the bending stiffness.

[0042] Based on the above, in step S300, the weighted inverse dynamic bending processing performs one inverse iteration and one forward iteration on the dragged virtual plant structure using weighted FABRIK. The interpolation processing is stiffness-weighted interpolation, and the weighted FABRIK is:

[0043]

[0044] w = 1 - StiffnessCurve(t)

[0045] t = i / N

[0046] in, Let be the final new position of node i, i.e., the coordinates after weighted interpolation; P represents the original position of node i; i proj is the candidate position of node i after one FABRIK forward / backward iteration projection; w is the flexibility weight of the node; StiffnessCurve(t) is the stiffness curve function in the species parameters; t is the normalized height of the dragged node; i is the number of the dragged node; and N is the total number of nodes in the branch structure where the dragged node is located.

[0047] Based on the above, in step S500, each segment of the trunk and branch structures of the updated virtual plant is subdivided, and then interpolated using Catmull-Rom curves:

[0048] C(τ)=0.5[2P1+(-P0+P2)τ+(2P0-5P1+4P2-P3)τ 2 +(-P0+3P1-3P2+P3)τ 3 ]

[0049] Where P1 is the starting point of the current segment; P2 is the ending point of the current segment; P0 is the node of the previous segment (if it does not exist, repeat P1); P3 is the node of the next segment (if it does not exist, repeat P2); C(τ) represents the coordinates of the interpolation point in the interval [P1,P2]; τ is a smooth curve passing through P1 and P2.

[0050] This invention has outstanding substantive features and significant progress compared to existing technologies. Specifically, this invention introduces stiffness weights and uses gradual stiffness, mass curves, and weak bending moment constraints to make the bending shape of virtual plants closely resemble the stress on real branches. It maintains constraints from root to tip while presenting a gradual and flexible bending, closely resembling the mechanics of real branches. This fundamentally solves multiple problems existing in traditional interactive plant simulations, such as inconsistency with reality, physical instability, rigid shapes, and rendering performance bottlenecks. Attached Figure Description

[0051] Figure 1 This is a flowchart illustrating the process of this invention.

[0052] Figure 2 This is a virtual plant example diagram of the present invention.

[0053] Figure 3 This is a schematic diagram of the virtual plant stem end being dragged by the present invention. Detailed Implementation

[0054] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0055] like Figure 1 As shown, a method for real-time bending and shaping of virtual plants based on adjustable stiffness weights includes the following steps: S100, configuring the parameter information of the virtual plant and generating a parameterized plant model, wherein the parameter information includes at least plant parameter information, plant control parameter information, and environmental parameter information; S200, when activating the interactive mode and dragging the end of the plant, acquiring and fixing the end of the plant model at the target position of the drag; S300, performing weighted inverse dynamic bending processing and interpolation processing on the dragged virtual plant structure according to the target position of the drag; S400, synchronously updating the other branch structures of the virtual plant according to the updated dragged virtual plant structure; S500, further smoothing the updated virtual plant structure by subdividing it and performing Catmull-Rom curve interpolation; S600, ending the interactive mode and solidifying the currently updated virtual plant structure.

[0056] Specifically, in step S100, the virtual plant structure is configured with a main trunk structure and branch structures, generally one main trunk structure with multiple branch structures. Each main trunk structure and each branch structure is divided into multiple segments, and a node is configured at the end of each segment, wherein the length of each segment is constant. In this embodiment, the plant parameter information includes at least the number of main trunk structures, the number of branch structures, the number of segments of the main trunk structure and the branch structures, the segment length, and the segment cross-sectional dimensions. The method of generating virtual plants using the plant parameter information is a common existing method, such as... Figure 2 As shown, the configuration includes 1 main trunk structure, 4 branch structures, 50 main trunk segments, 3 segments per branch, 0.1m length per segment, and a reference cross-sectional dimension of 0.1m × 0.1m at the root of the main trunk.

[0057] In addition to plant parameters, step S100 also configures plant control parameter information for each of the main trunk structure and the branch structure. The plant control parameter information includes at least a stiffness variation curve, a mass distribution curve, an elastic recovery strength curve, and a cross-sectional thickness variation curve. In this embodiment, the stiffness variation curve is used for "stiffness weighted FABRIK" and "length error allocation," and the stiffness variation curve k(t) is:

[0058] k(t)=k tip +(k root -k tip )·(1-t) α k(t)∈[0,1]

[0059] Where, k root ∈[0,1] represents the root stiffness weight; a larger value indicates a "stiffer" root (smaller displacement); k tip ∈[0,1] represents the stiffness weight of the tip (i.e., the end of a branch or trunk), which is usually less than k. root α>0 is a shape parameter; the larger the value, the more concentrated the transition from "hard roots and soft tips" is in the section near the root.

[0060] The mass distribution curve is used to correlate gravity / wind response intensity. The mass distribution curve μ(t) is:

[0061] μ(t)=μ tip +(μ root -μ tip )·(1-t) α μ(t)>0

[0062] Where, μ root >0 represents the root quality weight (dimensionless coefficient), μ tip >0 represents the tip mass weight, and α>0 represents the shape parameter.

[0063] The elastic recovery strength curve determines the "swingback" velocity / strength, and the elastic recovery strength curve e(t) is:

[0064] e(t) = e tip +(e root -e tip )·(1-t) α ,e(t)≥(s -1 )

[0065] Among them, s -1 e is the recovery intensity per second. root e tip ≥0 represent the "recovery strength" of the root / tip (the larger the value, the faster it returns to the static direction), and α is the shape parameter.

[0066] The cross-sectional thickness variation curve is used for rendering and optional bending stiffness. The cross-sectional thickness variation curve r(t) is:

[0067] r(t) = r tip +(r root -r tip )·(1-t) α r(t)>0 (normalized)

[0068] Where, r root >0 represents the root radius (in meters; in engineering, it can also be used as a "section scaling factor"), r tip >0 represents the tip radius, and α>0 represents the shape parameter.

[0069] In this embodiment, as Figure 2 In the example shown, the curve parameters are as shown in Table 1 below:

[0070]

[0071]

[0072] Table 1

[0073] In reality, plants are affected not only by their own parameters and stiffness, but also by environmental factors such as wind and gravity. Therefore, in step S100, the environmental parameter information is associated with each of the main trunk and branch structures using Verlet integrals and distance-elasticity constraints. The environmental parameter information includes at least plant spatial coordinates, simulated wind conditions, and gravitational acceleration. The Verlet integral is:

[0074] X t+1 =X t +(X t -X t-1 (1-d)+aΔt 2

[0075] a=g·μ(t)+wind

[0076] Among them, X t d is the world coordinate vector of the node or segment end at time t; d is the numerical damping; t is time; Δt is the duration of a single frame (the time interval between two adjacent frames (in seconds)); a is the combined acceleration of gravity and wind; g·μ(t) is gravity; g is the gravitational acceleration; μ(t) is the mass weight curve; and wind is the equivalent acceleration vector of the wind field from the environmental wind simulation.

[0077] Distance-elasticity constraints include elastic recovery constraints and distance constraints, meaning that the swing direction is first restored, and then the segment length is strictly maintained. Elastic recovery is used to constrain the swing back in the static direction. The elastic recovery constraint is as follows:

[0078]

[0079] λ(t,Δt)=1-exp(-e(t)Δt)

[0080] X ens ←X start +L·Slerp(u,u rest ,λ(t,Δt))

[0081] Where e(t) is the elastic recovery strength curve; λ∈[0,1] are the single-frame interpolation coefficients, representing the "speed" of the swing back; u is the static direction unit vector; X end X represents the coordinates of the end point of the current segment. start Let L be the starting coordinates of the current segment, L be the natural length of the segment, and u be the unit vector in the current direction. rest is the unit vector of the static / reference direction, and Slerp is the spherical linear interpolation function used to smoothly transition between the current direction and the static direction;

[0082] The distance constraint is:

[0083] d = X end -X start ,δ=‖d‖-L,

[0084] X end ←X end -(1-k(t))c,X start ←X start -(1-k(t))c

[0085] Where, ‖d‖ is the current length of the segment; d = X end -X startThe vector representing the distance from the end point to the beginning point is the actual segment vector; δ = ||d|| - L represents the difference between the current length and the natural length; δ > 0 indicates that the segment is stretched, and δ < 0 indicates that the segment is compressed. d represents the correction vector, indicating how much adjustment is needed to restore the length; k(t) is the stiffness curve value at the node; X end ←X end -(1-k(t))c means adding a portion of the error to the endpoint to correct the endpoint position; X start ←X start -(1-k(t))c means that if the starting point can be moved (e.g., a branch root), the starting point will be modified accordingly; if the starting point is fixed (e.g., a main root), it will remain unchanged.

[0086] This virtual plant real-time bending and shaping method based on adjustable stiffness weights also applies weak bending moment constraints to the plant model by adding a bending spring to the angle between the starting position A of the parent segment, the starting position B of the current segment, and the ending position C of the child segment.

[0087] Δθ=θ current -θ restrot =AxisAngle(-k·Δθ)

[0088]

[0089] Where Δθ is the difference between the current angle and the natural angle, i.e., the bending deviation; θ current θ is the included angle formed by the three points (A–B–C) (i.e., ∠ABC); restrot The angle is the natural angle of the plant in its static, unforced state; AxisAngle(-k·Δθ) represents the angle of rotation around a certain axis of rotation (in this example, point B, and the normal direction of the plane containing points A, B, and C); k is the bending stiffness. The segment preceding the current segment is the parent segment of the current segment, and the segment following the current segment is the child segment of the current segment. These three points are actually the three endpoints of a three-section segment, forming an angle to simulate the "continuous bending" of the branch. The bending stiffness curve value depends on the normalized height t of the segment in the whole plant. The root is usually larger (not easily bent), and the tip is smaller (easily bent). This gradually pushes the current angle back to the static angle, suppressing the appearance of a "Z-shaped zigzag". Usually, 1-3 iterations are sufficient to obtain a smooth and continuous curve shape.

[0090] After configuring parameters and constraints for the virtual plant, a virtual plant can be generated. At this point, activating the interactive mode allows for dragging and shaping of the virtual plant. In reality, plant shaping is diverse, such as S-shapes and animal outlines; therefore, dragging requires multiple operations, but the dragging method remains the same each time, only the dragging position differs. Therefore, this embodiment uses dragging the end node of the main structure as an example, dragging the end of the main structure to the target position N (i.e., the coordinates of a target position), such as... Figure 3 As shown, in step S300, the weighted inverse dynamic bending process performs one inverse iteration and one forward iteration on the dragged virtual plant structure using weighted FABRIK. The interpolation process is stiffness-weighted interpolation, and the weighted FABRIK is:

[0091]

[0092] w = 1 - StiffnessCurve(t)

[0093] t = i / N

[0094] in, Let be the final new position of node i, i.e., the coordinates after weighted interpolation; This is the original position of node i (i.e., the position before the previous frame simulation or dragging); Let be the candidate position of node i after one FABRIK forward / backward iteration projection (i.e., the solution obtained while ensuring the segment length remains unchanged); w is the flexibility weight of the node; StiffnessCurve(t) is the stiffness curve function in the species parameters, with the input normalized height t∈[0,1] and the output stiffness value of the node at that height (range 0~1). t is the normalized height of the dragged node, i is the number of the dragged node, and N is the total number of nodes in the branch structure where the dragged node is located.

[0095] FABRIK only guarantees a constant segment length and end-to-end alignment with the target position. When updating the node position in the forward / reverse direction of FABRIK, the bending spring adds an angle correction, which is equivalent to giving each joint a "spring torque" to ensure that the curve is "naturally smooth" rather than a sharp bend.

[0096] Final formula:

[0097] NewNodePos=FABRIK(Node)+w·f(Δθ)

[0098] An angular spring constraint is introduced at the point where the three points of bending and shaping form an angle. It limits the bending through Δθ and the bending stiffness curve, so that the result of FABRIK is no longer a rigid broken line, but gradually converges to a smooth and natural branching curve.

[0099] After the above processing, the shaping of the dragged branches is completed. At this point, based on the parameter information of the virtual plant and using the parameter information of the shaped dragged plant as a reference, the other branches are updated and aligned to update the entire virtual plant, thus producing a coherent and natural branching and bending effect.

[0100] Preferably, in order to produce better visual performance and smoothness, in step S500, each segment of the trunk and branch structure of the updated virtual plant is subdivided, such as subdividing each stage into 8 sub-segments, that is, subdividing each stage into 8 sections, and interpolating using Catmull-Rom curves:

[0101] C(τ)=0.5[2P1+(-P0+P2)τ+(2P0-5P1+4P2-P3)τ 2 +(-P0+3P1-3P2+P3)τ 3 ]

[0102] Where P1 is the starting point of the current segment; P2 is the ending point of the current segment; P0 is the node of the previous segment (if it does not exist, repeat P1); P3 is the node of the next segment (if it does not exist, repeat P2); C(τ) represents the coordinates of the interpolation point in the interval [P1, P2]; τ is a smooth curve passing through P1 and P2. When τ = 0, C(0) = P1; when τ = 1, C(0) = P2. Example: Suppose the node coordinates of a virtual plant trunk are as follows:

[0103] P0=(0.0,0.0), P1=(0.0,1.0), P2=(0.5,2.0), P3=(1.0,3.0)

[0104] Substituting into the Catmull–Rom interpolation formula:

[0105] When τ = 0: C(0) = P1 = (0.0, 1.0)

[0106] When τ=0.5: C(0.5)≈(0.25,1.52)

[0107] When τ=1: C(1)=P2=(0.5,2.0)

[0108] Therefore, the curve smoothly passes through P1→P2, instead of a straight broken line. The interpolation result makes the branch transition from a straight line segment to a smooth curve, with a natural bend.

[0109] After the refined smoothing process, the virtual plant has now been shaped once. Exiting the interactive mode will solidify the shape of the virtual plant and record information such as the static coordinates of the solidified virtual plant for use as a starting point in the next interaction.

[0110] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

Claims

1. A method for real-time bending and shaping of virtual plants based on adjustable stiffness weights, characterized in that, Including the following steps: S100. Configure the parameter information of the virtual plant and generate a parameterized plant model, wherein the parameter information includes at least plant parameter information, plant control parameter information and environmental parameter information; S200, when the interactive mode is activated and the plant end is dragged, the end of the plant model is obtained and fixed at the target position of the drag. S300. Based on the target position of the drag, perform weighted inverse dynamic bending processing and interpolation processing on the dragged virtual plant structure. S400. Based on the updated dragged virtual plant structure, synchronize and update the other branch structures of the virtual plant. S500: Subdivide the updated virtual plant structure and perform Catmull-Rom curve interpolation for further smoothing. S600: End the interactive mode and solidify the currently updated virtual plant structure.

2. The method for real-time bending and shaping of virtual plants based on adjustable stiffness weights according to claim 1, characterized in that: In step S100, the virtual plant structure is configured with a trunk structure and a branch structure, and each trunk structure and branch structure is divided into multiple segments. A node is configured at the end of each segment, wherein the length of each segment is constant. The plant parameter information includes at least the number of trunk structures, the number of branch structures, the number of segments of the trunk structure and the branch structure, the segment length, and the segment cross-sectional dimensions.

3. The method for real-time bending and shaping of virtual plants based on adjustable stiffness weights according to claim 1, characterized in that: In step S100, the plant control parameter information is configured for each of the main trunk structure and the branch structure. The plant control parameter information includes at least a stiffness variation curve, a mass distribution curve, an elastic recovery strength curve, and a cross-sectional thickness variation curve; the stiffness variation curve k(t) is: k(t)=k tip +(k root -k tip )·(1-t) α ,k(t)∈[0,1] Where, k root ∈[0,1] represents the root stiffness weight, k tip ∈[0,1] represents the tip stiffness weight, and α>0 represents the shape parameter; The mass distribution curve is used to correlate gravity / wind response intensity. The mass distribution curve μ(t) is as follows: μ(t)=μ tip +(m root -m tip )·(1-t) α ,μ(t)>0 Where, μ root >0 represents the root quality weight, μ tip >0 represents the tip mass weight, and α>0 represents the shape parameter; The elastic recovery strength curve e(t) is: e(t)=e tip +(e root -e tip )·(1-t) α ,e(t)≥(s -1 ) Among them, s -1 e is the recovery intensity per second. root e tip ≥0 represents the root / tip "resilience strength", and α is the shape parameter; The cross-sectional thickness variation curve r(t) is as follows: r(t) = r tip +(r root -r tip )·(1-t) α r(t)>0 (normalized) Where, r root >0 represents the root radius, r tip >0 represents the tip radius, and α>0 represents the shape parameter.

4. The method for real-time bending and shaping of virtual plants based on adjustable stiffness weights according to claim 1, characterized in that: In step S100, the environmental parameter information is associated with each of the main trunk structure and the branch structure through Verlet integral and distance-elasticity constraints. The environmental parameter information includes at least plant spatial coordinate information, environmental wind simulation information, and gravitational acceleration information; the Verlet integral is: X t+1 =X t +(X t -X t-1 )(1-d)+aΔt 2 a=g·μ(t)+wind Among them, X t d is the world coordinate vector of the node or segment end at time t; d is the numerical damping, t is time, Δt is the duration of a single frame, a is the resultant acceleration of gravity and wind; g·μ(t) is gravity, g is the gravitational acceleration, μ(t) is the mass weight curve, and wind is the wind field equivalent acceleration vector from the environmental wind simulation.

5. The method for real-time bending and shaping of virtual plants based on adjustable stiffness weights according to claim 4, characterized in that: Distance-elasticity constraints include elastic recovery constraints and distance constraints. The elastic recovery constraint is as follows: λ(t,Δt)=1-exp(-e(t)Δt) X . / 0 ←X 1t2rt +L·Slerp(u,u r.1t ,λ(t,Δt)) Where e(t) is the elastic recovery strength curve; λ∈[0,1] are the single-frame interpolation coefficients, representing the "speed" of the swing back; u is the static direction unit vector; X . / 0 X represents the coordinates of the end point of the current segment. 1t2rt Let L be the starting coordinates of the current segment, L be the natural length of the segment, and u be the unit vector in the current direction. r.1t is the unit vector of the static / reference direction, and Slerp is the spherical linear interpolation function used to smoothly transition between the current direction and the static direction; The distance constraint is: d=X . / 0 -X 1t2rt ,δ=‖d‖-L, X . / 0 ←X . / 0 -(1-k(t))c,X 1t2rt ←X 1t2rt -(1-k(t))c Where, ‖d‖ is the current length of the segment; d = X . / 0 -X 1t2rt The vector representing the distance from the end point to the beginning point is the actual segment vector; δ = ||d|| - L represents the difference between the current length and the natural length; δ > 0 indicates that the segment is stretched, and δ < 0 indicates that the segment is compressed. Represents the correction vector; k(t) is the stiffness curve value at the node; X . / 0 ←X . / 0 -(1-k(t))c means adding a portion of the error to the endpoint to correct the endpoint position; X 1t2rt ←X 1t2rt -(1-k(t))c indicates that if the starting point can be moved, the starting point should also be modified accordingly.

6. The method for real-time bending and shaping of virtual plants based on adjustable stiffness weights according to claim 4, characterized in that: Weak bending moment constraints are also applied to the plant model by adding a bending spring to the angle between the starting position A of the parent segment, the starting position B of the current segment, and the ending position C of the child segment. Δθ=θ >u@@ABt -θ @ACt@Dt =AxisAngle(-k·Δθ) Where Δθ is the difference between the current angle and the natural angle, i.e., the bending deviation; θ >u@@ABt θ is the included angle formed by the three points (A–B–C). @ACt@Dt The angle is the natural angle of the plant in its static posture when it is not under force; AxisAngle(-k·Δθ) represents the angle of rotation around a certain axis; k is the bending stiffness.

7. The method for real-time bending and shaping of virtual plants based on adjustable stiffness weights according to claim 1, characterized in that: In step S300, the weighted inverse dynamic bending process performs one inverse iteration and one forward iteration on the dragged virtual plant structure using weighted FABRIK. The interpolation process is stiffness-weighted interpolation, and the weighted FABRIK is: w = 1 - StiffnessCurve(t) t = i / N in, Let P be the final new position of node i, i.e., the coordinates after weighted interpolation; i oric This represents the original position of node i; is the candidate position of node i after one FABRIK forward / backward iteration projection; w is the flexibility weight of the node; StiffnessCurve(t) is the stiffness curve function in the species parameters; t is the normalized height of the dragged node; i is the number of the dragged node; and N is the total number of nodes in the branch structure where the dragged node is located.

8. The method for real-time bending and shaping of virtual plants based on adjustable stiffness weights according to claim 1, characterized in that: In step S500, each segment of the trunk and branch structures of the updated virtual plant is subdivided and then interpolated using Catmull-Rom curves. C(τ)=0.5[2P1+(-P g +P2)τ+(2P g -5P1+4P2-P i )t 2 +(-P g +3P1-3P2+P i )t i ] Where P1 is the starting point of the current segment; P2 is the ending point of the current segment; P g The node of the previous segment (repeat P1 if it does not exist); P i P1 is the node of the next segment (if it does not exist, repeat P2); C(τ) represents the coordinates of the interpolation point in the interval [P1,P2]; τ is a smooth curve passing through P1 and P2.

Citation Information

Patent Citations

  • Agricultural teaching method, system and equipment based on virtual reality technology and medium

    CN120469583A

  • Device and method for measuring torsional stiffness as a proxy for structural integrity in anchorage

    WO2024072850A1