Abstract
The essential purpose of this research is to exploit and innovate a yarn-level relaxation deformation method for weft-knitted stitches. Each loop formed by knitting yarns was taken as a mass respectively. Spring-mass model at the yarn level was established for several knitting rows and spatial coordinates were assigned to each mass. Based on the intermeshed relationship of loops in the longitudinal direction, the spring-mass model at the yarn level was transformed into a two-layer spring-mass model at the stitch level, with correspondence between the masses of the two models. Each mass was subjected to eight spring forces from different directions. The resultant force was calculated based on the yarn-level mass model, and the mass displacement was solved by the Verlet numerical integration method. According to the coordinates of masses, the geometric models of different knitting types were established, and a matrix operation method for the spatial rotation and translation of control points was proposed, which could quickly calculate the coordinates and accurately simulate the shape of loops. Finally, we simulated the relaxation deformation of five typical weft-knitted stitches. The results show that this method can accurately and effectively simulate the overall deformation effect of the knitted stitches, and the simulation results are similar to the actual results. The analysis results of the pattern size and the simulation efficiency indicate that the larger the pattern, the more loops there are, the overall simulation time is longer and the running memory occupied is larger.
Introduction
Under the catalysis of the global digital virtual simulation technology,1,2 many concepts such as “digital fabrics”3,4 and “virtual fashion”5,6 have gradually entered the public eye, and have even sparked a digital wave in the textile and clothing industry. Knitted fabrics,7,8 as a major category of textile and clothing, are deeply favored by consumers due to their complex structures and craftsmanship, fashionable colors, and the properties of soft and comfortable. Meanwhile, it also inspired the creative inspiration of developers to design various knitted fabrics and products. However, how to implement creative inspiration and ideas into reality becomes a major challenge.
Textile digital technology provides a feasible solution to this difficulty.9,10 Based on three-dimensional (3D) computer-aided design (CAD) software,11,12 cutting-edge simulation technology can be used to achieve virtual and realistic visualization of textile fabrics. Regarding complex knitted structures, it is necessary to develop more targeted simulation techniques and methods. In 2010, Kyosev and Renkens 13 outlined modeling methods for warp and weft knitted structures and discussed additional issues such as cross-section shape and irregularity of yarns. In recent years, the team with Yuksel et al. that has been dedicated to solving the virtual simulation of knitted structures and knitwear based on knitted mesh. In 2012, Yuksel et al. 14 established yarn-level models of complex knitwear for virtual models. The curve model was generated by stitch mesh, and then the final shape was calculated through yarn-level physical simulation, which could efficiently create yarn-level models of knitwear with rich and diverse patterns. To improve the stitchability of knitted mesh, Wu et al. 15 proposed a fully automated method for converting arbitrary 3D shapes into knitted meshes in 2018, followed by a two-step optimization process and topological operations to generate an efficient stitched mesh. In 2019, they were able to convert any stitched mesh into a knittable structure by introducing a shift path and correctly handling mismatched knitting directions. 15 In the same year, Narayanan et al. 16 in the team also developed the first universal visual programing interface that can generate knittable enhanced meshes from 3D models, allowing users to edit the meshes.
During this period, other scholars also referred to their methods to improve the simulated algorithm for knitted structures. The main improvement content is divided into three research directions. The first research direction is to simplify or improve the spring-mass model.17–19 With the help of the improved cuboid spring-mass system, they solved the defects of the traditional spring-mass model, which can effectively improve the simulation effect and promote the real-time simulation of weft-knitted fabrics.20,21 The second research direction is to improve the stitchability of the knitted meshes.22,23 Jones et al. 24 proposed an interactive mesh partitioning tool that can upgrade the stitchability of knitted meshes. Liu et al. 25 put forward a graph-based algorithm to generate 3D shapes of knitted meshes for garments that could be accurately captured and adopted a tiling algorithm to achieve the elastic distribution. Ruan et al. 26 raised a method for optimizing manual calculation and adjustment, utilizing graphic technology to deal with knitting parameters. The third research direction is to develop knitting design systems and instructions. Nader et al. 27 developed a flexible and customizable system for three-dimensional knitted textiles. However, the above research methods are mainly used for single-sided knitted stitches, without considering issues such as the regional uneven density of double-sided knitted stitches, which will affect the force deformation of the loops and the whole fabric. Therefore, the above methods have limitations in simulating double-sided knitted fabrics with regional uneven density.
Based on the characteristic of uneven density of weft-knitted stitches and the principle of knitting, each knitted yarn was considered as an independent individual and a yarn-level spring-mass model was established. The yarn-level model was converted into a stitch-level model according to the longitudinal intermeshed relationship of the loops. According to the two models, the forces on each mass were calculated strictly, and the virtual loops were drawn by the masses after the force deviation as the base point, and finally the yarn-level relaxation deformation of the whole stitch was realized.
Uneven stitch density
The longitudinal description of weft-knitted fabrics can be divided into pattern courses according to the fabric appearance result and knitting rows according to the knitting process. The loops in each course may come from different knitting rows, so the number of pattern courses in knitted fabrics is not equal to that of knitting rows. This means that a pattern course consists of several knitting rows. Furthermore, the ratio of pattern courses to knitting rows in different parts of a knitted stitch is not constant, resulting in the number of loops on the front and back of the fabric varying in different areas. After the combination of different knitting types, the interaction between the loops causes them to appear uneven in size. As a result, the stitch density showed uneven characteristics. As shown in Figure 1, a weft-knitted jacquard fabric is knitted with different jacquard effects in different areas, namely tricolor bird-eye jacquard and tricolor twill jacquard. These two jacquard effects result in a density ratio of 3:2 in the area they are located in.

Physical image of weft-knitted jacquard fabric.
Modeling
On account of the number of loops in each knitting wale is not consistent, it is impossible to simulate the microstructure deformation of the stitch simply by using a mesh model with a constant size. Therefore, in this research, the spring-mass model at the yarn level was established according to the knitting rule. Meanwhile, the double-layer variable spring-mass model at the stitch level was constructed according to the intermeshed relationship of loops. There are usually three types of spring in the spring-mass model: structural spring, shear spring and bending springs. The structural spring connects adjacent masses horizontally and vertically, and its main function is to fix and maintain the overall structure of the model. The shear spring connects adjacent particles on the diagonal, mainly to prevent model spatial distortion and deformation. The bending spring connects horizontally or longitudinally spaced masses, which are spaced at a distance of one. Its main function is to provide a smooth surface for the model during spatial folding or deformation. According to the functions of each spring, we selected structural spring and shear spring in our model. Due to not considering the spatial bending of the fabric, the bending spring was ignored. Based on the spring-mass model, we also established the common geometric models for different knitting types.
Spring-mass modeling at the yarn level
In the process of knitting, yarns are interleaved in the front and back needle beds following the stitch rule. The yarns in each row are knitted independently, but the successively knitted loops on each needle are intermeshed. The front and back knitting needles were regarded as a group to form two knitting units. In this research, it was assumed that the width of the stitch is w, so there are
The main part of the knitting diagram is the stitches. The horizontal part represents knitting wales. Vertically, it can be simply seen as composed of different knitting rows. Figure 2(a) shows the knitting diagram of a type of knitted structure, we divided each group of loops in the knitting diagram into a front knitting unit and a back knitting unit. According to the knitting types, masses were normally added for the looping type and assigned different spatial coordinates, but not for the floating type. The mass of the tucking type was subject to the mass of the next intermeshed loop. It may be that several yarns are knitted in the same pattern course. The reference height of yarns knitted in the same pattern is consistent, so the longitudinal reference coordinates of corresponding masses are consistent. A yarn-level spring-mass model was constructed by connecting masses in the same knitting row with spring connections successively (Figure 2(b)), in which odd-numbered columns represent front loops and even-numbered columns represent back loops. It should be noted in particular that in this research, each front loop of single-sided knitted fabric was also regarded as two knitting units, among which the back knitting unit was the floating type. The spring-mass mathematical model at the yarn level

Construction principle of spring-mass models of (a) knitting diagram, (b) spring-mass model at the yarn level, and (c) spring-mass model at the stitch level.
Where
Weft knitting machine has two kinds of needle gating mode, they are interlock gating (needle-to-needle) and rib gating (needle-to-trick) respectively. In the calculation of x-coordinates of the back masses, it is necessary to calculate the lateral offset according to the needle gating, represented by
When calculating the y-coordinates of masses, the initial coordinates were calculated according to the current pattern course

Interlock stitch of (a) knitting diagram, (b) real fabric, and (c) simulation.
Spring-mass modeling at the stitch level
The spring-mass model at the yarn level describes the transverse interaction of the loops. The longitudinal interaction of the loops is mainly related to the intermeshed loops in the longitudinal direction. And the intermeshed loops are usually in the same layer. As shown in Figure 2(c), the model was divided into the front layer and the back layer. The masses at the odd-numbered columns in the yarn-level spring-mass model are in the first layer and the masses at the even-numbered columns are in the second layer. In addition, the loops formed by longitudinal masses in the same column have an intermeshed relationship with each other.
It needs to be introduced in detail that due to the variable ratio of pattern courses to knitting rows in different stitch regions, as well as the presence of knitting types such as tucking and floating, the loops that are intermeshed on the same layer may come from different knitting rows. As a result, there is a difference in the number of front intermeshed loops and back intermeshed loops for each vertical wale. In this research, we used
Based on this horizontal connection and vertical intermesh, the corresponding two-layer spring-mass model
17
at the stitch level
Where,
In the process of establishing the stitch-level spring-mass model based on the yarn-level spring-mass model, we determined the corresponding relationship
Geometric modeling
The knitted loop, as the smallest unit in knitted structures, has a crucial effect on the microstructure and overall shape of knitted fabrics. There are three main knitting types in the weft-knitted structures, which are looping, tucking, and floating. The appearance effect of different structures can be formed through the combination of different knitting types. Geometric models were established for looping and tucking respectively. It should be noted in particular that the type of floating is formed through the natural connection of loops. To achieve the natural connection effect in the simulation research, geometric modeling of floating is not carried out.
Figure 4 shows the geometric modeling of a loop based on mass. In this research, it is assumed that the cross-section of the virtual yarn is a constant circle, which does not change with forces, and the radius is assumed to be r.

Geometric models of knitting types based on masses.
To calculate the most primitive spatial coordinates of the control points which are unaffected by the masses, we assumed that mass
Therefore, a constant matrix
Implementation of simulation
The relaxation deformation of the weft-knitted stitches studied in this research is caused by the internal force generated by loops with different shapes, without any additional external forces. The forces are transmitted through the connected yarns and the intermeshed loops, therefore, we need to convert all the forces to the yarn level for unified calculation.
Force analysis and calculation of masses
A mass is subjected to a total of eight spring forces, including two structural spring forces from the transverse direction, two structural spring forces from the longitudinal direction, and four shear spring forces from the oblique direction.
Force analysis and calculation at the yarn level
As shown in Figure 5, masses on the same knitting row are mainly subjected to the forces

Schematic diagram of spring-mass force analysis of (a) at the yarn level, (b) at the stitch level, and (c) total forces.
The length of the spring between the right and left adjacent masses is different due to the knitting types of tucking and floating. And the adjacent masses may be in different layers, so the length of the spring depends on the distances between masses in the x-direction and z-direction. The spring length is calculated by equation (10), where
Force analysis and calculation at the stitch level
In addition to the transverse structural spring forces at the yarn level, the masses are also subjected to the longitudinal structural spring forces
Where,
In addition, due to the special bending shape of the knitted loops, the propagation of force causes the current mass to be subjected to the oblique shear forces
Among them,
Calculation of mass coordinate movement
Without applying any external force to the stitch, the stitch undergoes relaxation deformation through the interaction between the loops. This deformation tends to be constant under the action of limited spring length and damping force. The calculation of damping force is shown in the equation (15). The resultant force on the mass is calculated by the equation (16). Among them,
In this research, Verlet numerical integration method 18 was used to solve the mass movement of the yarn-level spring-mass model. New mass coordinates were calculated by equation (17). Where m is the mass of a particle, and this study assumes that the mass of all particles is equal.
Calculation of spatial control points
Through the geometric modeling of the loop mentioned above, it can be seen that although the reference position of the loop is determined by a single mass, the control points will be offset by the influence of surrounding masses. We proposed a spatial rotation calculation method based on moved masses to calculate the offset spatial coordinates of control points. It should be noted that spatial rotation follows the right-hand coordinate system, with the z-axis perpendicular to the plane outward, so counterclockwise rotation is a positive rotation direction.
As shown in Figure 6, the control points

Schematic diagram of spatial rotation of control points.
In addition, it can be found that the movement of the transverse adjacent connected masses also has an impact on the control points which are on the connection axis. To accurately calculate the spatial coordinates of the control points, points
The control points first rotate based on the initial coordinates and then calculate the translation matrix (equation (19)) based on the reference mass. During the translation calculation of spatial coordinates, the control points
Taking the eight-point loop as an example, the final coordinates of each control point are calculated using the equation (20).
Results and discussion
Based on the above method of spring-mass deformation and calculation of loop spatial points coordinate, this research realizes the yarn-level relaxation deformation for weft-knitted stitches. We used Visual C # and JavaScript to write application programs in a computer configuration of 64-bit Windows 10 system, Intel Core i7-8750H CPU and 8 GB RAM.
Comparison of simulation results
To verify the effectiveness of the yarn-level spring-mass model proposed in this study in simulating the deformation of real knitted stitches under internal forces, the pictures of the structural simulation were compared with pictures of real products. As shown in Figure 7(a) to (e), they are three-color jacquard stitch with birdseye backing, tucking stitch, 2 × 2 cable stitch, 3 × 3 cable stitch, and transfer-jacquard stitch respectively.

Comparison of simulation results. (a) Tricolor jacquard stitch with birdseye backing, (b) tucking stitch, (c) 2 × 2 cable stitch, (d) 3 × 3 cable stitch, and (e) transfer-jacquard stitch.
It is evident that the tricolor jacquard stitch with birdseye backing has different structural densities of the front side and the back side, with a density of 2:3. Figure 7(a1) shows a structural simulation without deformation. The loops are in a regular and upright state, with a consistent loop width. The height of loops is related to the calculation
The jacquard stitches are designed by adding floating to make the loops suffer spring forces from various directions with different strengths, while the tucking stitches adjust the forces on the loop to achieve deformation by configuring the tucking. As shown in Figure 7(b), it is an uncomplicated tucking stitch that can form a mesh pattern by configuring the tucking according to a special design. Among them, Figure 7(b1) shows an undeformed tucking stitch with regular and upright loops. The color boundaries are distinct and present a distinct straight effect. However, in Figure 7(b3) of the real fabric, due to the effect of the tucking, the color boundary between the upper and lower parts is wavy, which also improves the pattern effect. By using the yarn-level relaxation deformation method, the influence of tucking on the shape of the surrounding loops can be visualized, and the result is more authentic.
Loop transfer, as a commonly used technique in knitted sweaters, changes the shape of the loop during the knitting process, thereby altering the forces on the loop and causing deformation of the surrounding loops. 29 As shown in Figure 7(c) and (d), they are 2 × 2 cable stitch and 3 × 3 cable stitch respectively. By transferring the loops to the back needle bed and then to the front needle bed, the loops obtain the tilted and interlocked morphological structure. The length of the loops is extended from upright to inclined, which results in the change of the x-coordinates of the upper masses. With the original spring length unchanged, the actual loop length becomes longer. The loop undergoes deformation due to the force that tries to restore its original shape. To make the cable pattern more prominent and stereoscopic, several back loop wales can be arranged next to the cable pattern.
Similarly, the transfer-jacquard stitch shown in Figure 7(e) makes the front pattern protrude from the back stitch by transferring the front loops to the back needle bed. Figure 7(e1) shows the simulated structure without deformation. The ground stitch is a two-color horizontal jacquard, presenting a flat and straight effect without distortion. Figure 7(e2) shows the result after the relaxation deformation. The loops of ground stitch present buckling due to the spring forces of the transferred loops, and the final buckling result is very similar to that in the actual Figure 7(e3). Through the simulation and comparison of the above five common weft-knitted stitches, it can be seen that the yarn-level relaxation deformation method proposed in this study can effectively and accurately simulate the knitted structures, and obtain nice deformation results and visualized pattern effects.
Simulation efficiency
The time required for the deformation of knitted stitches is mainly divided into three parts, namely, the calculation of spring-mass forces, the calculation of spatial coordinates for control points, and the drawing and rendering of virtual yarns. Table 1 lists the pattern information and efficiency information of the knitted stitches in Figure 7, in which pattern size refers to w × H (pattern width × the number of knitting rows). By comparing the results, it can be seen that the simulation time is mainly related to the size of the patterns, and the larger the pattern, the longer the time. This is mainly because the size of the pattern determines the size of the yarn-level and the stitch-level spring-mass model, and the spring forces of each mass need to be calculated in eight directions. Furthermore, the pattern size affects the number of loops. The more loops there are, the more time it takes to calculate the spatial coordinates of control points. For the same reason, the drawing and rendering of virtual yarns require sequentially connecting the control points within each knitting row. The more loops there are, the longer the drawing and rendering time. Moreover, we compared the proportion of computation and rendering time in Table 1. The results indicate that as the number of loops increases, the calculation time accounts for a larger proportion of the rendering time.
Simulation efficiency of Figure 7.
To reveal the relationship between the number of loops and simulation time, we used Origin software to draw a scatter plot based on simulation data and generate a fitting curve, as shown in Figure 8(a). The results showed that the number of loops showed a linear relationship with simulation time, and the more loops, the linear increase in simulation time. Meanwhile, we also revealed the relationship between the number of loops and the simulation running memory, as shown in Figure 8(b). The results indicate that as the number of loops increases, the running memory increases exponentially.

The relationship between the loops and simulation time/Running memory: (a) chart of loops-simulation time and (b) chart of loops-running memory.
Conclusion
A scientific and effective method to visualize the yarn-level relaxation deformation of knitted stitches has been innovated based on the knitting principle. First of all, we explored the characteristics and mechanism of the uneven density of knitted stitches. Based on this, we considered each knitting row of yarns as an independent individual, and each loop formed by the yarns as an independent knitting unit. The spring-mass model at the yarn level was established by adding masses to the root of the loops, and corresponding spatial coordinates were assigned to each mass. According to the intermeshed relationship, a two-layer spring-mass model at the stitch level is generated by adding the longitudinal connection to the yarn-level model. The yarn-level and stitch-level spring-mass models can be converted to each other. During the force calculation process of the spring-mass model, each mass is subjected to eight spring forces from different directions. To facilitate the calculation, this research converted the forces on the stitch level into the yarn level to calculate the resultant force and used the Verlet numerical integration method to solve the mass deflection. Based on the spatial coordinates of the moved masses, loop geometry models are established, which can accurately simulate the spatial shape of the loops after the control points are rotated and translated into space. To verify the effectiveness of this research method, five typical weft-knitted stitches were selected for yarn-level relaxation deformation. The comparison with real fabrics shows that this approach can accurately simulate the overall relaxation deformation of the knitted stitches, and the visualized effect is satisfactory. In addition, we also analyzed the influence of pattern size on simulation efficiency, the results show that the larger the pattern, the more loops, and the longer the total simulation time and the larger the running memory occupied. Nevertheless, this research also has some deficiencies. For example, the overall realism of fabric appearance is related to the realism of virtual yarns, but the reality of yarn simulation is a challenge. In the process of simulation in this research, the simulation of details such as yarn hairiness and the twist was ignored, which will be further studied and innovated in future work.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by the Postgraduate Research & Practice Innovation Program of Jiangsu Province [grant number KYCX21_2015]; the State Scholarship Fund from China Scholarship Council [grant number 202106790065]; the National Science Foundation of China [grant numbers 61772238]; and the Taishan Industry Leading Talents [grant number tscy20180224].
