Analog simulation method for kilometer cable with variable motion trail
Patent Information
- Application Number
- CN202410171153.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-06
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-02-06
AI Technical Summary
The prior art is difficult to generate cable models with variable motion trajectories, and the generated cables cannot be flexibly changed during movement, and the applicability and simulation effects are limited.
Control node movements by dividing nodes to drive grid movements, simulate the collection and release of winch cables formed by ring winding, arcs and straight lines, and use the connection between virtual nodes and grids to generate and control kilometer cables. .
The variable motion trajectory simulation of the cable is realized, showing that the dynamic effect of cable retraction and placement is better, and is suitable for fields such as virtual simulation teaching.
Smart Images

Figure CN119445031A_ABST
Abstract
Description
Technical Field
[0001] This achievement involves winch simulation in the field of three-dimensional graphics, and in particular, a method for simulating a kilometer-long cable with a variable motion trajectory. Background Art
[0002] Since the 21st century, virtual simulation technology has developed rapidly and has been widely used in teaching, games, production and other fields. The typical way of cable simulation is to build a model through 3D software, use auxiliary tools to generate rings one by one, copy the rings to form circles of cables, and regenerate slightly larger rings when the required width is reached. Repeat the above steps until the required length is reached, and finally export the model from the 3D software into FBX and other formats and put it into the software for use. This method can generate more realistic cables, but the cables generated by this method have a fixed shape once generated and cannot be changed flexibly, or the generated cables repeat in a specific form to achieve a motion effect. This method is also only suitable for viewing from a fixed perspective. The disconnected connection points can be easily seen from the perspective of free roaming observation. In addition, the control of simulation quantities such as the movement length and speed of the cable is complex, and the simulation effect has a single purpose. Summary of the invention
[0003] The present invention is aimed at the needs of winch cable retraction and release simulation in the fields of virtual simulation teaching, etc., and provides a kilometer-long cable simulation method with a variable motion trajectory. The method simulates the retraction and release operation of the winch cable formed by a combination of circular winding form, arc form and straight line form in a node-divided manner by controlling the node movement to drive the grid movement. The cable is expressed by establishing a series of nodes, and the connection between virtual nodes and grids is established. The kilometer-long cable is generated and controlled through segmentation conversion, dynamic loading and other processing methods, which makes the dynamic effect of cable retraction and release more excellent.
[0004] The technical solution of the present invention is as follows: A method for simulating a kilometer-long cable with a variable motion trajectory comprises the following steps:
[0005] Step 1, read the parent node queue;
[0006] Step 2, generating a child node or resetting the child node position according to the cable length and the parent node position;
[0007] Step 3, create cables with child nodes to create skin mesh;
[0008] Step 4, establish input control points according to the display type (reel cable, curved cable and straight cable);
[0009] Step 5, calculate the number and position of child nodes based on the input control points;
[0010] Step 6, determine whether the position of the input control point has changed in the program loop; if the position of the input control point has changed, repeat step 2, otherwise enter the next program loop.
[0011] Furthermore, in step 1, the parent node determines the arrangement of the child nodes. There can be multiple parent nodes, generally one drum cable parent node, one arc cable parent node, and one straight cable parent node.
[0012] Further, in step 4, the display types are drum cable, curved cable, and straight cable. The drum cable is generated by taking the coordinates of the current parent node as the starting coordinates of the coordinate A as the center of the circle, the minimum radius as the initial radius L, the cable length expressed by every two nodes as L0, and the rotation angle a1 as the minimum length of each node segment. Rotate the vector L1 pointing from A to the X direction perpendicular to the Y direction, with a rotation angle of a1 each time, and translate R1 upward vertically to Y each time. The translation amount is calculated as R0 / n, where R0 is the radius of the cable and n is the number of nodes required for one rotation. When the rotation amount reaches the specified width, the rotation radius is accumulated by R0, and the translation amount is multiplied by -1. Calculate in sequence until all child nodes under all drum cable parent nodes are set to the initial position. The curved cable is calculated using a Bezier curve, and points are taken from the curve with a step size of L0. Straight cables take points by average interpolation.
[0013] Furthermore, in step 5, the input control point of the drum cable controls the position of the last point on the drum parent node, and its position takes the X and Z values of the last point, and the Y value of the last point is based on the control point. The control point of the curved cable is the endpoint of the Bezier curve, and when the position of the control point changes, a new point is taken from the curve. The control points of the straight cable are the two end points.
[0014] Furthermore, each program cycle of step 6 is a program frame rate refresh cycle, and in each frame it is determined whether the position of the input control point changes. If the position of the input control point changes, step 2 is repeated, otherwise the next program cycle is entered.
[0015] Compared with the prior art, the present invention has the following advantages:
[0016] In traditional practice, cables are drawn manually according to the size of the drum. Each cable can only be used in the current scene. When a large section of cable is used, segmentation is used, and the generated cable cannot move or a visual moving effect is produced by moving UV. The present invention expresses the cable by establishing a series of nodes, establishes the connection between virtual nodes and grids, and generates and controls a kilometer-long cable through segmentation conversion, dynamic loading and other processing methods, which can better show the dynamic effect of cable retraction and release. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Attached Figure 1 It is a flow chart for generating a kilometer of cable;
[0018] Attached Figure 2 This is the display effect of the kilometer cable generation Figure 1 ;
[0019] Attached Figure 3 This is the display effect of the kilometer cable generation Figure 2 ; DETAILED DESCRIPTION
[0020] The present invention will be further described in detail below in conjunction with the accompanying drawings, but this does not limit the protection scope of the present invention.
[0021] like Figure 1 As shown in the figure, a method for simulating a kilometer-long cable with a variable motion trajectory uses virtual nodes to store data, establishes a connection between virtual nodes and grids, and generates and controls the kilometer-long cable through segmentation, conversion, dynamic loading and other processing methods. The specific steps are as follows:
[0022] Create parent nodes at different locations, a drum cable parent node, an arc cable parent node and a straight cable parent node;
[0023] Generate child nodes based on the length of the cable and the position of the parent node. The generation method of the drum cable is to use the current parent node coordinates as the starting coordinates of the coordinate A, the minimum radius as the initial radius L, and the cable length expressed by each two nodes as L0. The rotation angle a1 is calculated based on the minimum length of each node segment. Rotate the vector L1 pointing from A to the X direction perpendicular to the Y direction, with a rotation angle of a1 each time, and translate R1 upward vertically in the Y direction each time. The translation amount is calculated as R0 / n, where R0 is the radius of the cable and n is the number of nodes required for one rotation. When the rotation amount reaches the specified width, the rotation radius accumulates R0, and the translation amount is multiplied by -1. Calculate in sequence until all child nodes under the parent nodes of all drum cables are set to the initial position. The arc cable is calculated using a Bezier curve, and points are taken from the curve with a step size of L0. Straight cables take points by average interpolation.
[0024] Create a cable skin mesh with child nodes;
[0025] The input control points are established according to the display type (reel cable, curved cable and straight cable). The input control points of the reel cable control the position of the last point on the reel parent node. Its position takes the X and Z values of the last point, and the Y value of the last point is based on the control point. The control points of the curved cable are the endpoints of the Bezier curve. When the control point position changes, the points are taken from the curve again. The control points of the straight cable are the two end points;
[0026] Calculate the number and position of child nodes based on the input control points;
[0027] In the program loop, determine whether the position of the input control point has changed; if the position of the input control point has changed, recalculate the number of child nodes under the parent node and generate a grid, otherwise enter the next program loop.
[0028] The final effect of the present invention is as follows Figure 2 and 3 shown.
Claims
1. A method for simulating a kilometer-long cable with a variable motion trajectory, characterized in that: The following steps are involved: Step 1, read the parent node queue; Step 2, generating a child node or resetting the child node position according to the cable length and the parent node position; Step 3, create cables with child nodes to create skin mesh; Step 4, establish input control points according to the display type; Step 5, calculate the number and position of child nodes based on the input control points; Step 6, determine whether the position of the input control point has changed in the program loop; if the position of the input control point has changed, repeat step 2, otherwise enter the next program loop.
2. The method for simulating a kilometer-long cable with a variable motion trajectory according to claim 1, characterized in that: In step 1, the parent node determines the arrangement of the child nodes. There can be multiple parent nodes, generally one drum cable parent node, one arc cable parent node, and one straight cable parent node.
3. The method for simulating a kilometer-long cable with a variable motion trajectory according to claim 1, characterized in that: In step 4, the display types are drum cable, curved cable, and straight cable, wherein the drum cable is generated by taking the current parent node coordinates as the center of the circle as the starting coordinates of coordinates O1, taking the minimum radius as the initial radius L, expressing the cable length between every two nodes as L0, and calculating the rotation angle a1 with the minimum length of each node segment; Rotate the vector L1 perpendicular to the Y direction from O1 to the X direction with a length of L. The angle of each rotation is a1, and the vertical Y is translated upward by R1 each time.
4. The method for simulating a kilometer-long cable with a variable motion trajectory according to claim 3, characterized in that: The translation amount is calculated as R0 / n, where R0 is the radius of the cable and n is the number of nodes required for one rotation. When the rotation reaches the specified width, the rotation radius is added with R0, and the translation amount is multiplied by -1. This is calculated in sequence until all child nodes under the parent node of all drum cables are set to their initial positions.
5. The method for simulating a kilometer-long cable with a variable motion trajectory according to claim 3, characterized in that: The curved cable is calculated using the Bezier curve, and points are taken from the curve with a step size of L0; the straight cable points are taken using average interpolation.
6. The method for simulating a kilometer-long cable with a variable motion trajectory according to claim 3, characterized in that: In step 5, the input control point of the drum cable controls the position of the last point on the drum parent node, and its position takes the X and Z values of the last point, and the Y value of the last point is based on the control point.
7. The method for simulating a kilometer-long cable with a variable motion trajectory according to claim 6, characterized in that: In step 5, the control points of the curved cable are the endpoints of the Bezier curve, and when the position of the control point changes, a new point is taken from the curve; the control points of the straight cable are the two end points.
8. The method for simulating a kilometer-long cable with a variable motion trajectory according to claim 1, characterized in that: In step 6, each program cycle is a program frame rate refresh cycle, and whether the position of the input control point changes is determined in each frame. If the position of the input control point changes, step 2 is repeated, otherwise the next program cycle is entered.
Citation Information
Patent Citations
Flexible rope simulation method
CN102495752A
Simulation method for 3D (three-dimensional) rope
CN104572088A
Method for dynamically simulating industrial pipeline control relationship
CN105676800A
Method and device for producing a three-dimensional structure with at least one two-dimensional subregion
WO2020233757A1