Next Article in Journal
Dynamic Characteristics of Rubber Reinforced Expansive Soil (ESR) at Positive and Negative Ambient Temperatures
Next Article in Special Issue
Enhancement of Piezoelectric Properties of Flexible Nanofibrous Membranes by Hierarchical Structures and Nanoparticles
Previous Article in Journal
Chitin, Chitosan, and Nanochitin: Extraction, Synthesis, and Applications
Previous Article in Special Issue
Precise Control of the Preparation of Proton Exchange Membranes via Direct Electrostatic Deposition
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Imitation of a Pre-Designed Irregular 3D Yarn in Given Fabric Structures

School of Textile Science and Engineering, Tiangong University, Tianjin 300387, China
*
Author to whom correspondence should be addressed.
Polymers 2022, 14(19), 3992; https://doi.org/10.3390/polym14193992
Submission received: 29 August 2022 / Revised: 15 September 2022 / Accepted: 18 September 2022 / Published: 23 September 2022
(This article belongs to the Special Issue Smart Textile and Polymer Materials)

Abstract

:
The 3D CAD software has obvious advantages in appearance imitating and geometric structure modeling for fabrics. In contemporary 3D CAD fabric systems, only uniform yarns are involved in studies on fabric geometric structures, due to technological limitations, whereas objectives such as irregular/uneven 3D yarns have not been considered much. As the fabric structure or the central curve of the yarn changes, it is difficult to reflect the changed positions of the effect spots of the pre-designed uneven 3D yarns accordingly. In this paper, a key-point-mapping algorithm between the source yarn and the target curve is proposed to reflect the position change in effect spots when the fabric structure changes. By using the shape-preserving quasi-uniform cubic B-spline curve, a simple 3D irregular source yarn is designed using key points and setting their corresponding base cross-sections. The mapping is based on the principle that the lengths of the curve between the key points and the contours of the corresponding base cross-sections of the source yarn remain unchanged. Finally, the control grid of the new 3D yarn in the fabric structure is automatically generated. According to the examples and error analysis, the mapping technique can be applied to arbitrary given fabric structures, and the effect spots of the irregular 3D yarn are reasonably distributed as expected.

1. Introduction

The geometric structure of fabric is the extending and bending form of yarns in the three-dimensional space, which has a great influence on the appearance, physical properties and processing difficulty of fabric. Usually, the geometrical structure of fabric can be described in terms of two aspects: the cross-section of yarns and the central curve of yarns. The geometric structure affects almost all the properties of the fabric—appearance, strength, flexibility, drapability, porosity which is related to thermal insulation property, air ventilation, vapor permeability and electromagnetic performance. An accurate geometry model is used to imitate the appearance and pattern of the fabric, estimate the properties of the fabric, shorten the design and production cycle significantly and provide the basic data for apparel and industrial fabric design.
A computer-aided design (CAD) system for fabrics is widely used by designers to predict the appearance and geometrical structure of the fabric before weaving or knitting. After inputting the specifications of fabrics, the imitated image appears on the screen of the computer, which helps the designer to evaluate the design. Then, 2D graphical technology are normally used in the CAD systems, providing a quick and easy way to fulfill the target of imitation. Various types of yarns, uniform yarn or irregular yarns, are applied in design. When changing the fabric specification, CAD systems demonstrate the distribution of the effect spots of uneven fancy yarns on the fabric surface. However, the realism of imitation with 2D technology needs to improve dramatically as the edges of the yarns are blurred in the imitated image and the shading of the fabric is poor. There is another serious drawback that the 3D geometrical structure of the fabric is unavailable, which limits the application of the CAD system of 2D technology because the geometry of the fabric is necessary to predict its physical properties with the help of various finite software.
Therefore, 3D technology for modeling uniform yarns were developed to better construct the geometrical structure of fabrics in Liao [1], Lin [2], Lomov [3] and Sherburn [4]. The uniform 3D yarns are modeled either by facets, a Bezier surface or a B-spline surface, which are all determined by a control grid. However, a uniform/even yarn is only an ideal state, and most of the yarns are uneven in production and some yarns are purposely designed irregularly to form special effects on the fabric. For example, most fancy yarns designed irregularly.
To model irregular/uneven yarns, Jiang [5] and Gong [6] modeled the 3D yarn by setting the cross-section of the yarn as various super ellipses and ellipses, respectively. Software such as TexGen provide ways for modeling 3D yarn of various fixed cross-sections in the fabric structure, but fail to report the shapes of arbitrary cross-sections in a given fabric structure.
In Zheng [7], irregular 3D yarns are modeled by NURBS (Non-Uniform Rational B-Spline Curve). The shape-preserving quasi-uniform cubic B-spline curve is applied to fit the contour of the yarn path accurately, smoothly and stably. Two more adjacent points are inserted before and after an interpolating point, respectively, according to the direction of the all interpolating points, which ensures that the curve goes through all the interpolating points. Meanwhile, the quasi-uniform quadratic B-spline curve is applied to approximately to design the cross-section of a single yarn in the shape of the circle, ellipse, racetrack, lens, bowl, or round rectangle along the yarn path simultaneously. The shape of the cross-section is controlled by a 16-polygon formed by 18 control points. By manually assigning the specified base cross-sections at given positions, irregular 3D yarn effects appear in the structure of the woven fabric.
Actually, it is unreasonable to manually assign the contours of the cross-sections at given positions in a geometrical structure. If the contour of the pre-designed irregular yarn or the geometry of the fabric change, irregular 3D yarns bend in different forms and the positions of the effect spots change accordingly. The change in the distribution of the effect spots on the fabric surface has not been investigated. Indeed, such technological incompetence limits further in-depth application of the yarns, e.g., improved pattern design on apparels by Xue [8], where he developed a colored fancy yarn spun by three-channel digital ring spinning recently. The colored folded yarn comprises three irregular color yarn, which definitely enhances the esthetic effects of the apparels. Even in the CAD of 2D technology, where the effect spots can be viewed in the imitated image, the issue of the distribution of effect spots in the fabric structure is neglected or concealed by copying the part of the effected spots in the yarn image to the imitated fabric image directly.
The objective of this paper is to suggest/analyze a possible way of simulating the effect spot position distribution on irregular 3D yarn in any fabric structure. In other words, when the central curve of an uneven 3D yarn changes or the yarn itself moves arbitrarily, how will the effect spots in the pre-designed yarn change their positions accordingly given that no elongation and flatness occur?

2. Methodology

2.1. Choosing the Irregular Yarn

Due to the anisotropy of the irregular yarn, precise methods corresponding to different fancy yarn types are required. Slub yarn is the simplest type of irregular fancy yarn, in which slub knots are deliberately created to produce the desired effect. Therefore, an irregular yarn with a slub effect is a proper way to demonstrate how the effect spots distribute with the change in the fabric structure.
In most CAD systems for designing slub yarns, three parameters, namely, slub length, slub thickness and slub pitch, are used to control the contour of slub knots along the yarn (Figure 1); therefore, images of complicated slub yarns can be generated and put into a 2D fabric pattern. In order to avoid Moire effects, as a rule, slub yarns have a non-constant slub pitch between the slub spots.
In Li’s [9] study, these three control parameters were arranged freely along the central line of the uneven 3D yarn, and the yarns were only used to convert into 2D images to determine the evenness of yarns or Moire effects of the fabric. All the yarns were arranged in straight form, which could not reflect their real bent status in a fabric structure.

2.2. Representation of 3D Irregular Yarns

In this paper, 3D slub yarns are modeled by a shape-preserving quasi-uniform B-spline surface with OpenGL technology [10] as in Zheng [7]. Figure 2 illustrates the forming principle of the 3D yarn surface. The central curve of the yarn is represented by a shape-preserving quasi-uniform cubic B-spline curve (SPQUCBSC), which is determined by a series of key points as shown in Figure 2a. Each base cross-section corresponding to the key point of the yarn is characterized by a quasi-uniform quadratic B-spline curve, which is also defined by a series of control points in Figure 2c. The cross-section could be of an ellipse, or other shapes such as a racetrack or lens. The base cross-section C1 paralleling to YOZ plane in Figure 2a is used to calculate its shape conveniently. Then, all the base cross-sections are rotated to be perpendicular to the central curve to form cross-sections such as C2. The control points of each cross-section are rotated accordingly, creating the final B-spline control grid that determines the yarn shape as shown in Figure 2b.
A B-spline curve is determined by a series of control points, but an ordinary uniform B-spline curve does not go through the control points. From a designer’s perspective, the curve is expected to go through all the key points or interpolating points to ensure its shape. In order to meet the requirement, the inverse calculation is generally adopted, which is easily disturbed by the fluctuation of boundary conditions, however. To solve the problem, a robust algorithm was proposed in Zheng [7] that inserting additional control points would ensure the curve goes through the key points. Figure 3a shows an uneven yarn that goes through the given key points. The red dots are the key points controlling the central curve of the yarn as shown in Figure 3b. Two blue dots are automatically generated and inserted before and behind each red point (two end key points are excluded), as shown in Figure 3b, respectively, and each red key point locates at the midpoint of the segment line connecting the adjacent blue dots. Figure 3c shows the cross-sections of the yarn corresponding to all key points, and the sections are perpendicular to the center curve. Figure 3d shows the yarn control grid formed by connecting the control points of all cross-sections. To produce a uniform yarn, all the base cross-sections should be kept unchanged. If the base cross-sections are different in shape or size, an uneven 3D yarn with a slub effect will be modeled. When there are some larger cross-sections in a short distance, and then a slub knot will be designed. Therefore, each slub knot presents two aspects: the center of the cross-section and the shape of the cross-section. If a long slub knot is expected, and then there will be a long distance between the two key points where the two corresponding cross-sections are both larger than the normal one in size.
Usually, it is sufficient to design a straight slub yarn in a 2D CAD system. However, for universal applications, a curved irregular 3D yarn is created in this paper. The data of the control points of the cross-sections and the central line of the uneven 3D yarn as shown in Figure 3 or Figure 4a are listed in the Appendix A.1. The file format was illustrated in Zheng [11]. According to line 3 of the data, a 29 tex irregular yarn with a radius of approximately 0.069 mm is created and its shape is determined by 13 elliptical cross-sections. The following lines indicate the information of each cross-section, including the XYZ coordinates of the centers, types of the cross-sections and the related parameters. From the data, two cross-sections (Index No 5, and No 9, indexed from No 0) are enlarged by 1.7- and 1.4-fold, respectively. Therefore, the effect spots are formed at cross-section No 5 and No 9. It should be noted that there is only one key point controlling the location of the slub effect spot for each cross-section, so the length of the slub is not considered in the following description. Therefore, the slub length of the effect spot may change in the following examples although its relative position is fixed.

2.3. Description of the Geometrical Structure of Fabric

The geometrical structure of fabric is defined as the spatial status of the constitute threads. If the central curve of each constituent thread is correctly described, and then the 3D fabric structure is modelled. In this paper, the geometric structure of fabric is given by either calculating or measuring results. The central curve of a single thread in fabric is described as target curve which is controlled by a series of key points with X coordinates, Y coordinates and Z coordinates. A good example is shown in the Appendix A.2, where 10 central points of cross-sections are set to define the central curve of the single yarn in a given geometric structure repeat unit. As regards to the contour of the cross-sections, there is an assumption that no elongation and flatness occur when the yarn changes its path as this paper purely deals with a geometrical model rather than a physical model of the fabric structure. Therefore, the cross-sections of the source yarn will be copied directly to the yarns in fabric so that the effect spots of the source yarn will be kept.

2.4. Mathematical Expression of the Problem

To reflect an irregular/uneven 3D yarn in the fabric structure, it is necessary to investigate how the effect spots change their spatial positions when the central curve of the yarn changes freely. Figure 4a shows a 3D slub yarn with two knot effects in a repeat unit. If the central curve of the yarn changes from Figure 4b to Figure 4c, the change in the positions of the knots is shown in Figure 4d. In this converting procedure, the control points for the central curve of the new yarn are shown in Figure 4e.
From a mathematical point of view, the process can be described as the following sentences. Surface Y (the actual shape of the pre-designed source yarn) and surface F (the actual configuration of yarn in the fabric structure) are both modelled by a cubic B-spline surface. Both the central curves of the two surfaces are of SPQUCBSCs, and the base cross-sections are modelled by a quasi-uniform quadric B-spline curve. The key points sequence for central curve P of surface Y are given by the design process, and then the control points for the corresponding base cross-sections can be calculated accordingly. The sequence of key control points for the central curve D of surface F is also given by calculating or measuring the fabric structure.
To model a 3D yarn based on target curve D with OpenGL, the cross-sections should be calculated and assigned along curve D at the effect spots determined by key points at central curve P and the key points to determine the base cross-sections of the curve. Therefore, the key to the solution is to calculate the coordinates of the control points for the corresponding cross-sections on surface F according to surface Y of the source yarn.
Generally, an arbitrary point Ds on the central curve D of surface F is set as the mapping start, and its counterpart point Ps is also set arbitrarily on central curve P of surface Y. It is necessary to find the spatial coordinates of a random point Dk (to be located) with a given distance of L behind the point Ds along curve D and the spatial coordinates of the control points of the corresponding cross-sections on curve D.
To sum up, the idea to solve the change in the yarn central curve is to find the mapping relationship between the corresponding points and the cross-section from any given point on central curve P of surface Y to the central curve D of surface F when a pair of corresponding mapping starting points Ps on curve P and Ds on curve D are set.

2.5. Principle and Steps of Mapping

2.5.1. Principle of Mapping

Key point mapping is used to solve the problem proposed in this paper. The method of mapping is to insert the key points from central curve P and the corresponding base cross-sections for surface Y to target curve D within a certain range of mapping length, and then combine them together to form a control grid of the new yarn. In this new control grid, the centers of the cross-sections are all on the target curve. Before mapping, two conditions have to be designated: (1) the positions on curve D for inserting the key points of curve P and (2) the corresponding base cross-sections at the original key points of curve D, which is why this process is named key point mapping. According to the principle that the length of the curve between the adjacent key points along source yarn Y remains unchanged, all the key points of curve P are inserted onto curve D, and generate a new curve, D1, which has the same shape of the original target curve, D. In practice, curve D1 is generated by copying curve D firstly. All the base cross-sections of surface Y are used to assign the cross-sections onto surface F. At each original key point on curve D1, the corresponding base cross-section is automatically generated in proportion to the curve distance of the key points with the known sections just added before and after on curve D1. If a pair of corresponding points on curve P and D for the mapping are set at different positions, the proportion will change and the contour of the new yarn will also change.

2.5.2. Mapping Steps

The key-point-mapping processes are illustrated in the following diagrams. In Figure 5, we assume that central curve P of the source yarn is controlled by the sequence of key points {P0, P1, …, P6}, which are also the centers of the base cross-sections. In Figure 5, target curve D is controlled by the sequence of key points {D0, D1, …, D4}, which actually describes the geometric path of the yarn in the fabric structure. The change in curve D means the change in the geometry of the fabric. According to the algorithm of modelling the SPQUCBSC, curve lengths between every two neighboring key points along curve P are {L0, L1, …, L5} as shown in Figure 5a. For curve D, the curve lengths between every two neighboring key points are {K0, K1, …, K3} as shown in Figure 5b. In order to ensure that the new yarn has a path following that of target curve D and maintains the contour of the cross-sections as in surface Y, the key points of curve P and curve D are combined to form a new central curve D1 as the central path of the new yarn. The simplest mapping method is that P0 on the point curve P corresponds to point D0 on curve D. The key mapping steps are described as follows:
(1) If central curve P is straightened, the distance between the key points will be {L0, L1, …, L5}. Take the starting point as the coordinate origin, and obtain X coordinates of each corresponding key point along the X axis, as shown in Figure 6a.
(2) Similarly, straighten the central curve D and the lengths between each 2 adjacent key points along central curve D are {K0, K1, …, K3}. Take the starting point as the coordinate origin, and obtain X coordinates of each corresponding key point along the X axis, as shown in Figure 6b.
(3) According to the curve length between 2 adjacent key points along the source yarn P, the key point of the source yarn Pi (i = 0, 1, …, 5, and i is an integer number in this paper) corresponds to point Pi1 on the new curve D1. Meanwhile, the contour of the corresponding base cross-section at Pi on curve D is obtained and assigned to the base cross-section at Pi1 on curve D1.
(4) Calculate the distance Lm and Ln between the key point De (e can be any integer less than the number of the key points, 0 < e < 4 for this example) on curve D1 and the newly inserted nearest key points PM1 and PM+11 on each side. Calculate all control points of the base cross-section corresponding to De according to the distance proportion.
(5) According to X coordinates by straightening the curve (distance Li from the key point to the starting point on the source yarn P, or Ki from the key point on target curve D to the mapping starting point), all the key points on curve P and curve D are mixed orderly in sequence to form the new central curve D1. Meanwhile, the corresponding base cross-sections are also arranged according to the order of these key points as shown in Figure 6c.
(6) Rearrange the sequence of key points similar to curve D. According to the distance of key point Pi after an arbitrary key point Dk, the order of sections of SPQUCBSC and parameter t are obtained for Pi2, which is the corresponding point on curve D to key point Pi1. Then, the XYZ coordinates of key point Pi2 are calculated, and the XYZ coordinates of the control points for the corresponding base cross-sections are revised again by proportion. Based on the cross-section order determined in Step (5), a B-spline surface control mesh centered on curve D1 is formed to construct the uneven 3D slub yarn. Figure 7 is the schematic diagram showing the positions and sequence of key points on the newly generated curve.
Therefore, the algorithm for free conversion of the central curve of an irregular 3D yarn is as follows. (1) Calculate the distances between the key points along the central curve, which is the basis for the next three steps. (2) Find the counterpart of the key points of the source yarn on the target curve and set the corresponding cross-sections. (3) Set the base cross-sections at the original key points of the target curve according to the proportional interpolation method. (4) Combine and sort all the base cross-sections reflecting the spatial state of the uneven yarn in the order of the distance to the mapping start.

2.5.3. Mode of Mapping

(1)
Mapping from Origins
Figure 7 shows the simplest mapping—both the source yarn and the target curve start from their first key points. Ps, the starting point to be mapped on the source yarn, just happened to be P0, the first key point of curve P, while Ds, the starting point corresponding to Ps, is also the first key point, D0, of target curve D.
(2)
Mapping from Random Points
In actual fabric design and manufacturing, in order to avoid Moire effects in a large area in warp or weft directions and forming defects, the mapping starting point of warp or weft yarn should be randomly changed purposely. When considering the fabric width, the starting point of the source yarn and the target curve must be different at two adjacent weft yarns in continuous weft picking. Therefore, the starting point of the mapping of the source yarn, Ps, is generally not the first key point of the source yarn, or P0; and the starting point of the target mapping curve, Ds, is not its first key point, D0, either, as shown in Figure 8a,b, respectively. Let us suppose that the distance from Ps to P0 is Ls, and the distance from Ds to D0 is Ks. In Figure 8c, although Ls < L0 and Ks < K0, actually Ls and Ks are arbitrary values without any restriction. In calculating Pi2, the key point on the mapped curve, the pair of the starting point Ps and Ds are both located at the distance LsKs from D0 on the mapped curve, as shown in Figure 8c and Figure 9, respectively.
(3)
Mapping over an Arbitrary Length
Figure 7 and Figure 9 show the mapping of the target curve for a single cycle. If the length of the mapped curve is not the length of a target curve repeat, but a random length, it makes the mapping more flexible and more widely used in practice as shown in Figure 10, where the curve length of the mapping is more than one cycle.
By designing the cumulative mapping length (the distance from the mapping starting position Ds), the length of this mapping process and other parameters, multiple loop mapping can be achieved. If the cumulative length is very long, or the length from the starting point Ds to D0 of the target curve is very large, there must be an appropriate way to locate Ds. Therefore, it is necessary to find a way to represent the position of any point on the curve.

3. Algorithm

3.1. Sections of SPQUCBSC

A cubic B-spline curve is defined by a series of control points, and every four consecutive control points determine the expression of a curve section. Therefore, a cubic B-spline curve comprises cubic curve segments of different expressions. If the designed curve is expected to interpolate a serial of the key points P0, P1, …, Pn, the control points of SPQUCBSC are S0, S1, …, S3×n, the number of the control points is 3 × n + 1, the curve segments in SPQUCBSC are L0, L1, …, Ln−3, and the number of curve segments is 3 × n − 2. It should be mentioned that point Pi is coincidental with point Si×3 (0 ≤ i ≤ n, and i is an integer number).
Figure 11 shows the curve interpolating five red key points, i.e., P0, P1, , P4. To form such a shape-preserving curve, a sequence of 13 (5 × 3 − 2 = 13) control points {S0, S1, …, S12} is required. The curve comprises 10 (13 − 3 = 10) curve segments, expressed as {L0, L1, …, L9}. Each curve segment Li (i = 0, 1, 2, …, 9) is a cubic polynomial with different multinomial coefficients. These 10 curve segments form a complete quasi-uniform cubic B-spline curve.
Between the first two key points and last two key points, there are only two curve segments of the cubic curve, respectively. In contrast, there are three curve segments of the cubic curve between the middle key points. Therefore, for these middle key points, key point Pi is the starting point of the curve segment indexed as L3*i−1 (0 < i < n). In the example shown in Figure 11, P1 is the starting point of the curve segment indexed as L2 (2 = 3 × 1 − 1). P2 is the starting point of the curve segment indexed as L5 (5 = 3 × 2 − 1), while P3 is the starting point of the curve segment indexed as L8 (8 = 3 × 3 − 1).

3.2. Calculating the Distance between the Neighbouring Key Points

Defined by a series of control points {S0, S1, S2, , Sn}, the point Si(t) on the ith curve section of the B-spline curve defined by {Si, Si+1, Si+2, Si+3} is given by Formula (1) in Pigel [12]:
S i ( t ) = [ 1 t t 2 t 3 ] M 3 [ S i S i + 1 S i + 2 S i + 3 ] 0 t 1 i = 0 , 1 , , n 3
The transformation matrix M3 is determined by i and n according to Zheng [7]. t is the parameter to control the position of the point on the curve. The formula can also be written as the following parametric Equation (2).
{ x = f ( t ) = a 1 + b 1 t + c 1 t 2 + d 1 t 3 y = g ( t ) = a 2 + b 2 t + c 2 t 2 + d 2 t 3 ( 0 t 1 ) z = h ( t ) = a 3 + b 3 t + c 3 t 2 + d 3 t 3
Here, x, y and z are the coordinates of the point on the curve at t. ai, bi, ci and di (I = 1, 2, 3) are determined by matrix M3.
In order to calculate the length of this curve segment Li, the arc differentiate length ds is given by Equation (3):
d s = ( d x ) 2 + ( d y ) 2 + ( d z ) 2 = f 2 ( t ) ( d t ) 2 + g 2 ( t ) ( d t ) 2 + h 2 ( t ) ( d t ) 2 = f 2 ( t ) + g 2 ( t ) + h 2 ( t ) d t
Then, the length of the curve segment s is calculated by Equation (4):
s = 0 1 f 2 ( t ) + g 2 ( t ) + h 2 ( t ) d t = 0 1 u ( t ) d t
Let function u ( t ) = m ( t )  
m ( t ) = b 1 2 + b 2 2 + b 3 2 + 4 c 1 2 t 2 + 4 c 2 2 t 2 + 4 c 3 2 t 2 + 9 d 1 2 t 4 + 9 d 2 2 t 4 + 9 d 3 2 t 4 + 4 b 1 c 1 t + 4 b 2 c 2 t + 4 b 3 c 3 t + 6 b 1 d 1 t 2 + 6 b 2 d 2 t 2 + 6 b 3 d 3 t 2 + 12 c 1 d 1 t 3 + 12 c 2 d 2 t 3 + 12 c 3 d 3 t 3 = b 1 2 + b 2 2 + b 3 2 + ( 4 b 1 c 1 + 4 b 2 c 2 + 4 b 3 c 3 ) t + ( 4 c 1 2 + 4 c 2 2 + 4 c 3 2 + + 6 b 1 d 1 + 6 b 2 d 2 + 6 b 3 d 3 ) t 2 + ( 12 c 1 d 1 + 12 c 2 d 2 + 12 c 3 d 3 ) t 3 + ( 9 d 1 2 + 9 d 2 2 + 9 d 3 2 ) t 4
Obviously, an exact integral expression to calculate the length of the curve cannot be obtained. In this case, Composite Simpson’s Rule [13] is used to approximate the calculation. According to the uniform distribution of t value (0 ≤ t ≤ 1), this curve section is divided into w (must be an even integer number) subintervals to obtain w/2 sub-segments of the curve. The length of these sub-segments of the curve, Gj (j = 1, 2, …, w/2) is calculated as:
G 1 = 1 3 n ( u 0 + 4 u 1 + u 2 )
G 2 = 1 3 n ( u 2 + 4 u 3 + u 4 )
G j = 1 3 n ( u j 2 + 4 u j 1 + u j )
G n 2 = 1 3 n ( u n 2 + 4 u n 1 + u n )
where ui (I = 0, 1, …, n) = u ( i n ) . According to Equations (8) and (9), the length of the curve segment Li defined by control points Si, Si+1, Si+2, and Si+3 is approximately calculated as the sum of the sub-segments of the curve as shown in Equation (10).
L i = 0 1 u ( x ) d x 1 3 n [ ( u 0 + u n ) + 2 ( u 2 + u 4 + + u n + 2 ) + 4 ( u 1 + u 3 + u n 1 ) ]
The larger the even number w, the more accurate the calculation.

3.3. The Representation of an Arbitrary Point on a SPQUCBSC

3.3.1. Definition of Anterior and Posterior on a Curve

On the curve, there are two points A and B, respectively, and the distances between the two points to the starting point Ss of the curve are LA and LB, respectively. If LA < LB, point A is said to be in front of point B at LBLA and point B is behind point A at LB–LA. So, point A is the anterior and point B is the posterior.

3.3.2. Representation of a Given Point on a SPQUCBSC

There are two methods to locate a given point on a SPQUCBSC.
(1)
Index Number of the Curve Segment + Parameter t
According to definition (1) or (2) of a B-spline curve, the XYZ coordinates of any given point on the curve are accurately determined through four control points and parameter value t. Once four control points are known, the index number of the curve segment defined by them is determined. This representation is equivalent to the form of “the index number of the nearest shape-preserving anterior control point A + the distance behind point A along curve”. The method is mathematically easy to understand, but not intuitive in locating an arbitrary point on the curve.
(2)
Index Number of the Anterior Key Point A + Distance to Point A along the Curve
The second way to define a given point on a SPQUCBSC is to use the mode of “index number of the anterior key point A + distance behind point A along the curve”, which is intuitive for the user to understand, but difficult to map. Therefore, it must be converted into the mode of “the index number of the nearest shape-preserving anterior control point B + the distance behind point B along curve”, and then converted into the mode of “the index number of the curve segment + parameter t”.
Based on the way of locating a given point, the point A shown in Figure 11 on curve L6 can be defined or located in either of the following ways: ① at the distance of L after key point P1, requiring L2 + L3 + L4 + L5 < L < L2 + L3 + L4 + L5 + L6; ② at the distance of LA after key point P2, demanding 0 < LA < L6; ③ on the curve segment indexed No 6 (or curve L6) defined by control points S6(P2), S7, S8 and S9, at parameter t = tA, where tA is to be calculated later.

3.4. Locating of the Corresponding Point on the Given SPQUCBSC

The key to this algorithm is to find the XYZ coordinates of a given point on a curve according to the index number of the anterior key point and the distance after the key point. It is actually to calculate the index number of the curve segment and parameter t of the point on SPQUCBSC. This algorithm can not only locate the starting point of the mapping, but also search the mapped point (corresponding point) on curve D from any given point on curve P.
The following description takes the searching of a given point on central curve P of the source yarn as an example to describe the steps of the algorithm.
(1)
Calculation of the Repeat Unit Length of the Curve
The repeat unit length of the curve is the length of the curve that passes through all the key points, and is the sum of the lengths of the curve segments defined by the sequence of shape-preserving control points. The repeat unit length Rs of curve S is calculated by Equation (11), respectively. Supposing the number of the key points to interpolate SPQUCBSC S is n + 1, and then the number of the curve segments is 3n − 2 (or h = 3n − 3).
R s = i = 0 h L i                         ( h + 1 : n u m b r   o f   t h e   c u r v e   s e g m e n t s   o n   c u r v e   S )
(2)
Calculation of the Number of Repeats Ns
When the mapping length behind a given starting point is greater than the repeat unit length of a curve, the number of repeats (Ns) of mapping should be calculated. The calculation method is equal to the quotient of the sum of the distance Ds of the point from mapping starting point and the mapping length L divided by the repeat unit length Rs of the curve, and the integer part of the quotient is set as Ns. The formula is shown in Equation (12). Be noted that it’s not rounded up or rounded down.
N s = ( i n t e g e r )   D s + L R s
Therefore, to the point far away from the mapping start, the coordinate differences resulting from the repeats (Ns) should be added, which will be explained in step (5).
(3)
Calculation of the Index Number of the Curve Segment of SPQUCBSC
According to the accumulated value of the length Li of each curve section, the index number (Nx) of the shape-preserving curve section where the point is located is determined, which is actually the index number of the nearest anterior key point in front of the point to search. According to Equation (13), the residue mapping length Lr that exceeds a number of complete repeats is calculated.
  L r = L + D s N s · R s
Then, solve the inequality
i = 0 h L i < L r
A series of i values that satisfy the condition are obtained. Among them, the maximum value of i is selected as the index number Nx of the curve segment, or, Nx = Max{i}.
(4)
Calculation of Parameter t
Composite Simpson’s Rule dictates that when calculating curve segments, each curve segment is divided into w (an even integer number) subintervals. According to the method similar to calculating the index number of the curve segment, the index number T (T = 0, 1, …, w/2) of the subinterval of the curve segment containing the corresponding point is obtained. Thus, parameter t is determined.
Let   Q r = L r i = 0 N x L i
Again, solve the inequality
i = 0 N x G i < Q r
A series of i values that satisfy the condition are obtained and T is the maximum value of i, or T = Max{i}. Finally, parameter t is calculated by Equation (17).
T = (float) 2 × T/w
Since w is set as 20 in this paper, t is thereby one of the 11 values from 0, 0.1, 0.2, 0.3, …, 1.0.
(5)
Calculation of the XYZ Coordinates of the Mapped Point
After Ns (number of repeat units), Nx (index of the curve segment) and t are all calculated, the coordinates of the mapped point (X1, Y1, Z1) can be calculated according to Equation (2). Then, the final coordinates (Xt, Yt, Zt) of the mapped point at parameter t are calculated by Equation (18):
{ X t = X 1 + ( N s t N s s ) · ( X n X 0 ) Y t = Y 1 + ( N s t N s s ) · ( Y n Y 0 ) Z t = Z 1 + ( N s t N s s ) · ( Z n Z 0 )
Here, Nst means the number of repeats Ns at given point of parameter t, Nss is the number of repeats Ns at the mapping starting point. Xn is the X coordinate of the last point of original curve S while X0 is the X coordinate of the first point of the original curve S. The rule is also applied to Yn, Y0, Zn and Z0.
For searching the coordinates of any point on target curve D, the algorithm is exactly the same.

3.5. Calculation of the Control Points of the Base Cross-Section Generated Automatically

The base cross-section (C1, Ca, CM and CB) as shown in Figure 12 is actually a curve in a 2D plane parallel to plane YOZ plane, and is determined by 18 control points. All the base cross-sections (such as C1) should automatically rotate to the plane that is perpendicular to the central curve of the yarn, i.e., C2, to form the final controlling mesh for the uneven 3D yarn.
The coordinates of all the 18 control points shown in Figure 2c for a cross-section are set relatively to its center. The newly generated base cross-section corresponding to any point between the two base cross-sections before and after which are at the known spacing is smoothly interpolated according to proportion of length, the method is demonstrated in Figure 12.
Assuming that the base cross-sections Ca and Cb corresponding, respectively, to point Sa and Sb at the central curve have been calculated, in other words, the coordinates of a pair of the corresponding control points Pa and Pb on the base cross-section are known, it is necessary to calculate the coordinates of the corresponding control point Pm on the cross-section at the Sm point on the central curve.
Here, we can re-write the distances between the point pairs, SaSm, and SmSb, which are all set along the curve, as Lma and Lbm, respectively. Pm can be obtained according to the proportional relationship by Equation (19):
P m P a L m a = P b P m L b m
Similarly, the coordinates of the other 17 control points on the base cross-section Cm can be calculated automatically.

3.6. Sort and Combine All the Key Points and the Corresponding Base Cross-Sections

After calculating, all the corresponding points of the key points on the source yarn and the key points on target curve D will be combined and ascendingly sorted to form the mapped curve D1 according to their distances to the mapping starting point Ds. Meanwhile, the base cross-sections corresponding to all these key points are also sorted in the same order. Thus, a control mesh of new yarn is formed and the uneven 3D yarn can be drawn by OpenGL.
The sorting process can be solved by the conventional bubbling algorithm, which will not be described here.

4. Results

4.1. Imitation of an Irregular Yarn in Free Space

The following examples show the mapping effect of different mapping length at different starting mapping points with the same source yarn and target curve. The specifications of the source yarn and the target curve to test are listed in Table 1. The length of the curve repeat is calculated by Composite Simpson’s Rule according to the data in Appendix A.1 and Appendix A.2.
By changing the mapping starting points of the source yarn, target curve and mapping length, four experiments are tested to demonstrate the mapping results. The mapping parameters are shown in Table 2 and the final effects are demonstrated in Figure 13. It should be noted that all the key points are indexed from No 0. The two corresponding mapping starting points of the source yarn and the target curve are both set by the mode “index number of the anterior key point A + distance behind point A along the curve”. In example No 1, the simplest mapping from origins is used and the resulting effect is shown in Figure 4d. In example No 2, the mapping starting point of the source yarn is not its first key point but its corresponding point is the first key point of the targe curve, and the mapped effect is shown in Figure 13a. In example No 3, the mapping starting point of the source yarn is the first key point but its corresponding point is not the first key point of the targe curve, and the mapped effect is shown in Figure 13b. In these three examples, the mapping length is a full repeat unit of the target curve, thereby a full knitted loop is shown in Figure 4d and Figure 13a,b, respectively, although the three loops looked quite different. In example No 4, there is displacement of mapping starting points from both the origins of the source yarn and the target curve, and the mapping length is more than a repeat unit, so more than one loop repeat is shown in Figure 13c. It is intuitively reliable that the key-point-mapping algorithm works well since the effect spots distribute on the target curve as expected.
Figure 14c shows another three different effects, respectively, by mapping the yarn to target curve in Figure 14a at different mapping starting points. Figure 15a shows the enlarged view of local image of Figure 14c, while Figure 15b shows the corresponding control points for the mapped yarn. Figure 15c shows the magnified mapped yarn if the target curve in Figure 14b is applied, and the control points are shown in Figure 15d. The data of the key points for target curve in Figure 14a and targe curve in Figure 14b are listed in Appendix A.3 and Appendix A.4, respectively. From the data, two curves are both 2D curves since all the X coordinates of the key points are constant. So, a real yarn is bent to imitate the target curve to verify the validity of the mapping. In Figure 16, the green dots on the yarn indicate the effect spots of the irregular yarn. Figure 16a shows the red dots on the real yarn are arranged as the XYZ coordinates in the file of Appendix A.2 while Figure 16b shows the source yarn be stretched straight. The smallest scale on graph paper is 0.1. According to scale, the length of the source is 2.7, which is approximate to the curve length calculated by the algorithm based on Composite Simpson’s Rule. The mark “×” in Figure 16c indicates the key points of the target curves defined in the Appendix A.3; meanwhile, three effect yarns with different mapping starts are bent and passing through the marks smoothly. Figure 16c demonstrates that the distribution of the green effect spots is quite similar to that in the simulated image of Figure 14c.

4.2. Applying Irregular 3D Yarns in Fabric Structures

Once the central curve of an irregular 3D yarn has been freely transformed, it can be applied to various industrial applications, such as electronic blackboard, 3D fabric structure modeling and appearance simulation for woven, knitted and braided fabrics. The source yarn in the Appendix A.1 is used in the following examples again.

4.2.1. Electronic Blackboard

In simulating the electronic blackboard of uneven 3D yarn as shown in Figure 17, all the target curves are actually a series of parallel straight lines, and each line can be designed by only four key points. In mapping, the target curves (actually, straight lines) are processed from their first key points. However, the invisible yarn segments on the back of the blackboard should be considered, which can be achieved by setting different cumulative mapping lengths for each mapping.

4.2.2. Imitation of Woven Geometric Structures

In order to simulate the geometric structure of woven fabrics, it is necessary to randomly distribute the mapping start of the central curve of the warp yarn in order to avoid Moire effects in large area. The mapping of weft yarns is similar to that of electronic blackboards in setting the accumulative mapped length, but different weft yarn has a different mapping setting depending on the direction of picking. If it is applied for a shuttleless loom, the weft yarn is picked from the same side. The mapping starting points of all weft yarns are set the same, and the cumulative length of each yarn should be increased by one fabric width based on the previous weft mapping. For a shuttle loom, if the weft yarn is picked from both sides, and then it may be necessary to reverse the direction of the key points of the target curve representing the original fabric structure. Figure 18 shows the geometrical structure of plain woven fabric by picking the 3D effect yarn from same side of the loom. In this example, the XYZ coordinates of each interlacing point are roughly calculated. Supposing it is a balanced plain structure, all the interlacing points are considered to be evenly distributed, and the distance between the warp thread and the weft thread is set as one diameter of yarn. The sequence of the interlacing points forms the target curve. In order to better control the path of the yarns in structure, a middle point is inserted between two neighboring interlacing points. The data file of woven structure or the central curves of all the yarns for Figure 18 is shown in the Appendix A.5. In each target curve repeat unit, there are nine key points for four interlacing points. In the file, the second data ‘12’ of the line 2 means that there are 12 target curves in the structure. According to the coordinates of the center of each cross-section, six ends and six picks in the geometric structure of a woven fabric are set in the file. Actually, one and half repeat of the target curve is mapped in the example as shown in Figure 18.

4.2.3. Imitation of Weft-Knitted Geometric Structure

The geometric structure of the fabric is changed as shown in the Appendix A.6, which is roughly obtained for a plain knitted stitch. According to the data, there are 4 yarns in the knitted structure, each loop unit is controlled by 10 key points. The central curve of the yarn at the 1st wale is just the same as the target curve in the Appendix A.2, and the key points controlling the remaining three yarn in the next three wales are just obtained by translating the previous yarn upward for a fixed distance, respectively. More than one repeat of the target curve is mapped in the example, which means a large area of the fabric can be imitated. The mapping starting point on the target curve of the weft-knitted fabrics is similar to mapping the weft yarns in a shuttleless-woven fabric.
Figure 19 shows an imitated geometrical structure of the weft knitted fabric with the 3D uneven yarns. From the imitated image, the distribution of each effect spots is clearly demonstrated.
From the above examples, it can be seen that the effect knots in 3D slub yarns are distributed as expected at the reasonable positions of different fabric structures by using the key-point-mapping technique.

5. Discussion

When the shape of the target curve and the final mapped curve are carefully observed, some slight differences in shape will be noticed although curve D and curve D1 are very similar. In the following part, rationalization to such phenomena will be addressed.

5.1. Error Analysis

5.1.1. Source of Error

The sources of difference are originated from three parts:
(1) According to the principle of mapping, the number of key points of target curve D is different from that of the final merged curve D1. As the key points of the source yarn are inserted, the number of control points on the central curve of the final yarn changes, and so does the expression of each curve segment. Therefore, the two curves are definitely different, and the error occurs.
(2) When calculating the coordinates of a given point on SPQUCBSC, the length of each curve segment needs to be calculated accurately. However, the length is calculated approximately by summation, which is not a deterministic value, and its accuracy depends on the number of the intervals w of each curve segment. The larger w is, the higher the accuracy and the smaller the error.
(3) When calculating the final spatial coordinates of points on the curve, parameter t needs to be determined. However, the value of t is a lookup, there is not a continuous change but a jump when t changes. The jump value is determined by the number of intervals w and skips by at least 2/w each time, resulting in deviation in the calculation of the coordinates of the given point. Obviously, the larger w is, the smaller the error.

5.1.2. Margin of Error

To improve the calculating speed on curve length and save memory, the interval number w should remain within a certain range. In the examples in this paper, w = 20. Taking the source yarn in Figure 4a as an example (same position of all the key points except that two knots of the same thickness), three different target curves are mapped with four different lengths, respectively. Table 3 shows the accumulative length calculation error values under 12 different mapping conditions. Due to the huge amount of the data, the lengths between each effect spot have not been listed.
It can be seen from Table 3 that only one of the curve length errors is 1.7%, while the others are less than 1%. This amount of difference in curve length is negligible in human vision. It means that the effect spots of the irregular 3D yarn can be placed at the proper position of the 3D yarn and the key-point-mapping algorithm can be used to imitate a pre-designed irregular 3D yarns in any given geometric structure of fabric.

5.2. Application Prospect and Future Research

Theoretically, the mapping technique can also be extended to braided fabric as long as the structure is given. It can also be predicted that this mapping technique can be extended to the application of other fancy yarns such as flake yarn. For the folded fancy yarn, the central curve of the constitute single yarns are different from the central curve of the folded yarn, the mapping process will be more complex and requires further study. For uneven fancy yarns such as snarl yarn or loop yarn, the effect spots are not just the slub effect, new way of modelling effected 3D yarn is needed as well.
Another problem may be encountered when the key-point-mapping technique is applied. Due to the irregular cross-sections along the yarn central curve, two different yarns may collide at the thicker spots, which leads to an unreasonable 3D model of the geometric structure. The collision of the yarns should be detected and rectified in the future research.

6. Conclusions

This paper proposed a key-point-mapping algorithm to imitate pre-designed uneven 3D yarns in various geometric structures of fabrics. The premise for such algorithm is that the target curves of all the constituent yarns of the fabric structure are known in advance. The core of the mapping is to keep the curve lengths between the effect spots and the contour of the cross-sections corresponding to the effect spots of irregular/uneven 3D yarns unchanged whatever the central curve of the yarn changes. From the examples in this paper, the effect spots were well kept and reasonably distributed in the woven structure and knitted structure, which indicates that the key-point-mapping technique is reasonable, effective and accurate to apply pre-designed irregular/uneven 3D yarns in any fabric structure. The error analysis proves the conclusions further.

Author Contributions

Conceptualization, T.Z.; methodology, T.Z.; software, T.Z., W.Y. and X.W.; Error analysis, T.Z.; writing—original draft preparation, T.Z. and W.Y. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A

Appendix A.1. The Data for the Source Yarn (13 Key Points)

Zty_zzti_yarn,
2,1,
0,1,29.000000,0.069200,1,20.000000,230,100,120,13,
2.000000,2.000000,0.000000,1.0,1,1.000000, 0.500000,
2.000000,2.204900,0.095150,1.0,1,1.000000,0.500000,
2.000000,2.409800,0.000000,1.0,1,1.000000,0.500000,
2.000000,2.614700,−0.095150,1.0,1,1.000000,0.500000,
2.000000,2.819600,0.000000,1.0,1,1.000000,0.500000,
2.000000,3.024500,0.095150,1.7,1,1.000000,0.500000,
2.000000,3.229400,0.000000,1.0,1,1.000000,0.500000,
2.000000,3.434300,−0.095150,1.0,1,1.000000,0.500000,
2.000000,3.639200,0.000000,1.0,1,1.000000,0.500000,
2.000000,3.844100,0.095150,1.4,1,1.000000,0.500000,
2.000000,4.049000,0.000000,1.0,1,1.000000,0.500000,
2.000000,4.253900,−0.095150,1.0,1,1.000000,0.500000,
2.000000,4.458800,0.000000,1.0,1,1.000000,0.500000;
!
For the format of the file data, see Zheng [11].

Appendix A.2. The Data for Target Curve 1 (10 Key Points)

0.00,0.0,−0.08,
0.18,0.05,−0.08,
0.30,0.20,0.08,
0.10,1.00,0.08,
0.30,1.2,−0.08,
0.50,1.2,−0.08,
0.70,1.0,0.08,
0.50,0.20,0.08,
0.62, 0.05 −0.08,
0.80,0.0,−0.08,

Appendix A.3. The Data for Target Curve 2 (13 Key Points)

1.2,0.1,0.000000,
1.2,0.7,0.5,
1.2,1.3,0.000000,
1.2,1.9,−0.5,
1.2,2.5,0.000000,
1.2,3.1,0.5,
1.2,3.7,0.000000,
1.2,4.3,−0.5,
1.2,4.9,0.000000,
1.2,5.5,0.5,
1.2,6.1,0.000000,
1.2,6.7,−0.5,
1.2,7.3,0.0,

Appendix A.4. The Data for Target Curve 3 (13 Key Points)

4.2,0.1,−0.3,
4.2,0.7,0.6,
4.2,1.3,−0.3,
4.2,1.9,−0.3,
4.2,2.5,−0.3,
4.2,3.1,0.6,
4.2,3.7,−0.3,
4.2,4.3,−0.3,
4.2,4.9,−0.3,
4.2,5.5,0.6,
4.2,6.1,−0.3,
4.2,6.7,−0.3,
4.2,7.3,−0.3,

Appendix A.5. The Data for the Woven Sturcture Being Tested

Zty_tiangong_BsplineCurve,
2,12,
0,9,
0.00, 0.0, 0,
0.18,0.0,0.08,
0.36, 0.0,0.0,
0.54, 0.00,−0.08,
0.72,0.0,0.0,
0.90,0.0,0.08,
1.08,0.0,0.0,
1.26,0.00,−0.08,
1.44,0.0,−0.0;
1,9,
0.00, 0.36, 0,
0.18,0.36,−0.08,
0.36, 0.36,0.0,
0.54, 0.36,0.08,
0.72,0.36,0.0,
0.90,0.36,−0.08,
1.08,0.36,0.0,
1.26,0.36,0.08,
1.44,0.36,−0.0;
2,9,
0.00, 0.72, 0,
0.18,0.72,0.08,
0.36, 0.72,0.0,
0.54, 0.72,−0.08,
0.72,0.72,0.0,
0.90,0.72,0.08,
1.08,0.72,0.0,
1.26,0.72,−0.08,
1.44,0.72,0.0;
3,9,
0.00, 1.08, 0,
0.18,1.08,−0.08,
0.36, 1.08,0.0,
0.54, 1.08,0.08,
0.72,1.08,0.0,
0.90,1.08,−0.08,
1.08,1.08, 0.0,
1.26,1.08,0.08,
1.44,1.08,−0.0;
4,9,
0.00, 1.44, 0,
0.18,1.44,0.08,
0.36, 1.44,0.0,
0.54, 1.44,−0.08,
0.72,1.44,0.0,
0.90,1.44,0.08,
1.08,1.44,0.0,
1.26,1.44,−0.08,
1.44,1.44,−0.0;
5,9,
0.00, 1.8, 0,
0.18,1.8,−0.08,
0.36, 1.8,0.0,
0.54, 1.8,0.08,
0.72,1.8,0.0,
0.90,1.8,−0.08,
1.08,1.8,0.0,
1.26,1.8,0.08,
1.44,1.8,−0.0;
6,9,
0.18, −0.18, 0,
0.18,0,−0.08,
0.18, 0.18,0.0,
0.18, 0.36,0.08,
0.18,0.54,0.0,
0.18,0.72,−0.08,
0.18,0.9,0.0,
0.18,1.08,0.08,
0.18,1.26,0.0;
7,9,
0.54, −0.18, 0,
0.54,0,0.08,
0.54, 0.18,0.0,
0.54, 0.36,−0.08,
0.54,0.54,0.0,
0.54,0.72,0.08,
0.54,0.9,0.0,
0.54,1.08,−0.08,
0.54,1.26,0.0;
8,9,
0.9, −0.18, 0,
0.9,0,−0.08,
0.9, 0.18,0.0,
0.9, 0.36,0.08,
0.9,0.54,0.0,
0.9,0.72,−0.08,
0.9,0.9,0.0,
0.9,1.08,0.08,
0.9,1.26,0.0;
9,9,
1.26, −0.18, 0,
1.26,0,0.08,
1.26, 0.18,0.0,
1.26, 0.36,−0.08,
1.26,0.54,0.0,
1.26,0.72,0.08,
1.26,0.9,0.0,
1.26,1.08,−0.08,
1.26,1.26,0.0;
10,9,
1.62, −0.18, 0,
1.62,0,−0.08,
1.62, 0.18,0.0,
1.62, 0.36,0.08,
1.62,0.54,0.0,
1.62,0.72,−0.08,
1.62,0.9,0.0,
1.62,1.08,0.08,
1.62,1.26,0.0;
11,9,
1.98, −0.18, 0,
1.98,0,0.08,
1.98, 0.18,0.0,
1.98, 0.36,−0.08,
1.98,0.54,0.0,
1.98,0.72,0.08,
1.98,0.9,0.0,
1.98,1.08,−0.08,
1.98,1.26,0.0;
!

Appendix A.6. Data for the Knitted Structure Being Tested

Zty_tiangong_BsplineCurve,
2,4,
0,10,
0.00, 0.0,−0.08,
0.18,0.05,−0.08,
0.30, 0.20,0.08,
0.10, 1.00,0.08,
0.30,1.2,−0.08,
0.50,1.2,−0.08,
0.70,1.0,0.08,
0.50,0.20,0.08,
0.62,0.05,−0.08,
0.80,0.0,−0.08;
1,10,
0.00, 0.6, −0.08,
0.18,0.65,−0.08,
0.30, 0.80,0.08,
0.10, 1.60,0.08,
0.30,1.8,−0.08,
0.50,1.8,−0.08,
0.70,1.6,0.08,
0.50,0.80,0.08,
0.62,0.65,−0.08,
0.80,0.6,−0.08;
2,10,
0.00, 1.2, −0.08,
0.18,1.25,−0.08,
0.30, 1.40,0.08,
0.10, 2.20,0.08,
0.30,2.4,-0.08,
0.50,2.4,−0.08,
0.70,2.2,0.08,
0.50,1.40,0.08,
0.62,1.25,−0.08,
0.80,1.2,−0.08;
3,10,
0.00, 1.8, −0.08,
0.18,1.85,−0.08,
0.30, 2.00,0.08,
0.10, 2.80,0.08,
0.30,3.0,−0.08,
0.50,3.0,−0.08,
0.70,2.8,0.08,
0.50,2.00,0.08,
0.62,1.85,−0.08,
0.80,1.8,−0.08;

References

  1. Liao, T.; Adanur, S. A Novel Approach to Three-Dimensional Modeling of Interlaced Fabric Structures. Text. Res. J. 1998, 68, 841–847. [Google Scholar] [CrossRef]
  2. Lin, H.Y.; Newton, A. Computer representation of woven fabrics by using B-splines (part 1). J. Text. Inst. 1999, 90, 59–62. [Google Scholar] [CrossRef]
  3. Lomov, S.V.; Verpoest, I. Model of shear of woven fabric and parametric description of shear resistance of glass woven reinforcements. Compos. Sci. Technol. 2006, 66, 919–933. [Google Scholar] [CrossRef]
  4. Sherburn, M. Geometric and Mechanical Modeling of Textiles. Ph.D. Thesis, University of Nottingham, Nottingham, UK, 2007. [Google Scholar]
  5. Jiang, Y.; Chen, X. The structural design of software for simulation and analysis of woven fabric by geometry model. In Proceedings of the Textile Institute World Conference, Shanghai, China, 23–27 May 2004. [Google Scholar]
  6. Ozgen, B.; Gong, R.H. Modelling of yarn flattening in woven fabrics. Text. Res. J. 2011, 82, 632–648. [Google Scholar] [CrossRef]
  7. Zheng, T. Study on General Geometrical Modeling of Single Yarn with 3D Twist Effect. Text. Res. J. 2010, 80, 867–879. [Google Scholar] [CrossRef]
  8. Gu, Y.; Xue, Y.; Yang, R. Principle and properties of segment colored yarn spun by three-channel digital ring spinning. J. Text. Res. 2019, 40, 46–51. [Google Scholar]
  9. Li, Y.; Zeng, P.; Zhao, L. The Study on the Clothing Simulation Based on 3D Graphics. J. Text. Res. 2004, 25, 67–68. [Google Scholar]
  10. Angel, E. Interactive Computer Graphics: A Top-Down Approach with OpenGL, 3rd ed.; Person, Addison Wisley: New York, NY, USA, 2003; pp. 193–194. [Google Scholar]
  11. Zheng, T.; Cai, Y.; Jing, S.; Zhang, X. Study on Non-devastating Measurement and Reconstruction of the Woven Fabrics’ 3D Geometric Structure. Text. Res. J. 2011, 81, 1027–1038. [Google Scholar] [CrossRef]
  12. Pigel, L.; Tiller, W. The NURBS Book, 2nd ed.; Springer: Berlin, Germany, 1996; p. 81. [Google Scholar]
  13. Burden, R.L.; Faires, D.J.; Burden, A.M. Numerical Analysis, 10th ed.; Cengage Learning: Boston, MA, USA, 2016; pp. 205–221. [Google Scholar]
Figure 1. Three parameters to control the contour of slub knots.
Figure 1. Three parameters to control the contour of slub knots.
Polymers 14 03992 g001
Figure 2. Principle of designing a 3D slub yarn. (a) Schematic diagram of the central curve and base cross-section of a 3D yarn. (b) The control grid for a 3D yarn modelled by B-spline curve. (c) Key control points for the cross-section of a 3D yarn.
Figure 2. Principle of designing a 3D slub yarn. (a) Schematic diagram of the central curve and base cross-section of a 3D yarn. (b) The control grid for a 3D yarn modelled by B-spline curve. (c) Key control points for the cross-section of a 3D yarn.
Polymers 14 03992 g002
Figure 3. Design process of a 3D irregular yarn. (a) A solid 3D irregular yarn. (b) The control points of the cubic quasi-uniform B spline curve (red points: key points and control points, blue points: control points). (c) Cross-sections of the yarn. (d) Control grid of the B-spline surface for the 3D yarn.
Figure 3. Design process of a 3D irregular yarn. (a) A solid 3D irregular yarn. (b) The control points of the cubic quasi-uniform B spline curve (red points: key points and control points, blue points: control points). (c) Cross-sections of the yarn. (d) Control grid of the B-spline surface for the 3D yarn.
Polymers 14 03992 g003
Figure 4. The procedure of changing the central line of a 3D slub yarn.
Figure 4. The procedure of changing the central line of a 3D slub yarn.
Polymers 14 03992 g004
Figure 5. (a) Key points on the central curve P of source yarn. (b). Key points on the target curve D.
Figure 5. (a) Key points on the central curve P of source yarn. (b). Key points on the target curve D.
Polymers 14 03992 g005
Figure 6. The calculation of key point spacing along the central curve and the combination of the sorting of key points. (a) Calculate the distance to the mapping start P0 for each key control point on the source yarn. (b) Calculate the distance to the mapping start D0 for each key point on the target curve. (c) Combine and rearrange all the key points of both source yarn and target curve in order on the new central curve according to the distances to the random mapping start P0 or D0.
Figure 6. The calculation of key point spacing along the central curve and the combination of the sorting of key points. (a) Calculate the distance to the mapping start P0 for each key control point on the source yarn. (b) Calculate the distance to the mapping start D0 for each key point on the target curve. (c) Combine and rearrange all the key points of both source yarn and target curve in order on the new central curve according to the distances to the random mapping start P0 or D0.
Polymers 14 03992 g006
Figure 7. Arrangement of all key points in curve D1 according to distance.
Figure 7. Arrangement of all key points in curve D1 according to distance.
Polymers 14 03992 g007
Figure 8. The mapping procedure for the different starting points. (a) Calculate the distance to the random mapping start Ps for each key control point on the source yarn. (b) Calculate the distance to the random mapping start Ds for each key point on the target curve. (c) Combine and rearrange all the key points of both source yarn and target curve in order on the new central curve according to the distances to the random mapping start Ps or Ds.
Figure 8. The mapping procedure for the different starting points. (a) Calculate the distance to the random mapping start Ps for each key control point on the source yarn. (b) Calculate the distance to the random mapping start Ds for each key point on the target curve. (c) Combine and rearrange all the key points of both source yarn and target curve in order on the new central curve according to the distances to the random mapping start Ps or Ds.
Polymers 14 03992 g008
Figure 9. The mapping result for the different starting points.
Figure 9. The mapping result for the different starting points.
Polymers 14 03992 g009
Figure 10. The mapping result for the multiple repeats of the curve.
Figure 10. The mapping result for the multiple repeats of the curve.
Polymers 14 03992 g010
Figure 11. Key points, control points and curve segments of a shape-preserving quasi-uniform B-spline curve.
Figure 11. Key points, control points and curve segments of a shape-preserving quasi-uniform B-spline curve.
Polymers 14 03992 g011
Figure 12. The method for generating a base cross-section by two known ones.
Figure 12. The method for generating a base cross-section by two known ones.
Polymers 14 03992 g012
Figure 13. The mapping effect with different mapping starting points and mapping length. (a) Mapping a full unit length of the source yarn at the origin of the target curve. (b) Mapping a full unit length from the origin of the source yarn onto the target curve. (c) Mapping a random length of a given position of the source yarn onto the target curve at another specified position.
Figure 13. The mapping effect with different mapping starting points and mapping length. (a) Mapping a full unit length of the source yarn at the origin of the target curve. (b) Mapping a full unit length from the origin of the source yarn onto the target curve. (c) Mapping a random length of a given position of the source yarn onto the target curve at another specified position.
Polymers 14 03992 g013
Figure 14. Different target curves and different mapping starts. (a) Target curve a. (b) Target curve b. (c) Mapping effects onto the target curve a from the source yarn at different mapping starts.
Figure 14. Different target curves and different mapping starts. (a) Target curve a. (b) Target curve b. (c) Mapping effects onto the target curve a from the source yarn at different mapping starts.
Polymers 14 03992 g014
Figure 15. Enlarged generated central curves after mapping (local image). (a) The enlarged mapping effect of Figure 14c. (b) The control points of the mapped curve in Figure 15a. (c) The enlarged mapping effect onto the targe curve Figure 14b. (d) The control points of the mapped curve in Figure 15c.
Figure 15. Enlarged generated central curves after mapping (local image). (a) The enlarged mapping effect of Figure 14c. (b) The control points of the mapped curve in Figure 15a. (c) The enlarged mapping effect onto the targe curve Figure 14b. (d) The control points of the mapped curve in Figure 15c.
Polymers 14 03992 g015
Figure 16. Real effect yarn bending diagram as compared with Figure 14c. (a) A full repeat unit of the real bent source yarn corresponding to Appendix A.1. (b) A full repeat unit of the straightened source yarn. (c) The mapping effect of the real yarns corresponding to Figure 14c.
Figure 16. Real effect yarn bending diagram as compared with Figure 14c. (a) A full repeat unit of the real bent source yarn corresponding to Appendix A.1. (b) A full repeat unit of the straightened source yarn. (c) The mapping effect of the real yarns corresponding to Figure 14c.
Polymers 14 03992 g016
Figure 17. The imitated electronic blackboard.
Figure 17. The imitated electronic blackboard.
Polymers 14 03992 g017
Figure 18. Woven structure with 3D slub yarns.
Figure 18. Woven structure with 3D slub yarns.
Polymers 14 03992 g018
Figure 19. Weft-knitted structure with 3D slub yarns.
Figure 19. Weft-knitted structure with 3D slub yarns.
Polymers 14 03992 g019
Table 1. Specifications of the source yarn and target curve.
Table 1. Specifications of the source yarn and target curve.
AttributeDataNumber of Key PointsCurve ShapeLength of the Curve RepeatPositions of the Effect Spots (Indexed from 0)
Source yarnAppendix A.113Figure 4b2.768905No 5, No 9
Target curveAppendix A.210Figure 4c3.460019None
Table 2. Mapping parameters of the examples.
Table 2. Mapping parameters of the examples.
Mapping
Example No
Mapping Starting Point of Source YarnMapping Starting Point of Target CurveMapping LengthFigures of Mapping Effects
Index Number of the Anterior Key PointLength after the Anterior Key PointIndex Number of the Anterior Key PointLength after the Anterior Key Point
100003.46Figure 4d,e
201003.46Figure 13a
300013.46Figure 13b
410.521.18.8Figure 13c
Table 3. The accumulative length errors at different mapping lengths.
Table 3. The accumulative length errors at different mapping lengths.
No. of Target CurveTarget Curve of Single RepeatTheoretic Mapping LengthCurve after MappingAccumulative Error (%)
Number of the Key PointsCurve Length RepeatNumber of the Key PointsActual Mapping Length
1103.46001898368.1378721.7234
1103.4600189125311.941260−0.4895
1103.46001892410223.884195−0.482521
1103.46001892812327.893890−0.378964
2139.7456284125312.0209810.1748417
2139.74562842812027.884199−0.413575
2139.74562844820647.952755−0.098427
2139.74562845222351.793423−0.397263
31310.521817125011.905778−0.785183
31310.5218172811427.793455−0.737661
31310.5218174819547.566936−0.902217
31310.5218175221151.721928−0.534754
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Zheng, T.; Yue, W.; Wang, X. Imitation of a Pre-Designed Irregular 3D Yarn in Given Fabric Structures. Polymers 2022, 14, 3992. https://doi.org/10.3390/polym14193992

AMA Style

Zheng T, Yue W, Wang X. Imitation of a Pre-Designed Irregular 3D Yarn in Given Fabric Structures. Polymers. 2022; 14(19):3992. https://doi.org/10.3390/polym14193992

Chicago/Turabian Style

Zheng, Tianyong, Wenli Yue, and Xiaojiao Wang. 2022. "Imitation of a Pre-Designed Irregular 3D Yarn in Given Fabric Structures" Polymers 14, no. 19: 3992. https://doi.org/10.3390/polym14193992

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop