pattern_weave() returns a logical matrix indicating where the warp lines should be "up" for a specified weave pattern type and subtype. names_weave is a character vector listing supported weave pattern types.

pattern_weave(type = "plain", subtype = NULL, nrow = 5L, ncol = 5L)

names_weave

Format

An object of class character of length 10.

Arguments

type

Type of weave. See Details.

subtype

Subtype of weave. See Details.

nrow

Number of rows (length of warp).

ncol

Number of columns (length of weft).

Value

A matrix of logical values indicating where the "warp" is "up" (if TRUE) or "down" (if FALSE). Indices [1,1] of the matrix corresponds to the bottom-left of the weave while indices [1,ncol] corresponds to the bottom-right of the weave. This matrix has a "pattern_weave" subclass which supports a special print() method.

Details

Here is a list of the various weave types supported:

basket

A simple criss-cross pattern using two threads at a time. Same as the "matt_irregular" weave but with a default subtype of 2L.

matt

A simple criss-cross pattern using 3 (or more) threads at a time. Same as the "matt_irregular" weave but with a default subtype of 3L.

matt_irregular

A generalization of the "plain" weave. A character subtype "U/D(L+R)" is a standard matt weave specification: U indicates number warp up, D indicates number warp down, L indicates number of warp up in repeat, and R indicates number of warp down in repeat. An integer subtype N will be interpreted as a "N/N(N+N)" irregular matt weave. A character subtype "U/D" will be interpreted as a "U/D(U+D)" irregular matt weave. Has a default subtype of "3/2(4+2)".

plain

A simple criss-cross pattern. Same as the "matt_irregular" weave but with a default subtype of 1L.

rib_warp

A plain weave variation that emphasizes vertical lines. An integer subtype N will be interpreted as a "matt_irregular" "N/N(1+1)" weave. A character subtype "U/D" will be interpreted as a "matt_irregular" "U/D(1+1)" weave. Default subtype of 2L.

satin

A "regular" satin weave is a special type of the elongated twill weave with a move number carefully chosen so no twill line is distinguishable. Same as the "twill_elongated" weave but with a default subtype of 5L.

twill

A simple diagonal pattern. Same as the "twill_elongated" weave but with a default subtype of "2/1".

twill_elongated

A generalization of the "twill" weave. A character subtype "U/D(M)" is a standard twill weave specification: U indicates number warp up, D indicates number warp down, and M indicates the "move" number. A character subtype "U/D" will be interpreted as a "U/D(1)" elongated twill weave. An integer subtype N will provide a "{N-1}/1(1)" elongated twill weave if N is less than 5, 6, or greater than 14 otherwise it will provide a "{N-1}/1(M)" weave where M is the largest possible regular "satin" move number. Default subtype of "4/3(2)".

twill_herringbone

Adds a (vertical) "herringbone" effect to the specified "twill_elongated" weave. Default subtype of "4/3(2)".

twill_zigzag

Adds a (vertical) "zig-zag" effect to the specified "twill_elongated" weave. Default subtype of "4/3(2)".

For both "matt" and "twill" weaves the U/D part of the subtype can be further extended to U1/D1*U2/D2, U1/D1*U2/D2*U3/D3, etc. For the "matt" weave the "(L+R)" part of the subtype can be further extended to (L1+R1+L2+R2), (L1+R1+L2+R2+L3+R3), etc.

See also

grid.pattern_weave() for drawing weaves onto a graphics device. See https://textilestudycenter.com/derivatives-of-plain-weave/ for further information on the "matt" family of weaves, https://textilelearner.net/twill-weave-features-classification-derivatives-and-uses/ for further information on the "twill" family of weaves, and https://texwiz101.blogspot.com/2012/03/features-and-classification-of-satin.html for further information on "satin" weaves.

Examples

 # supported weave names
 print(names_weave)
#>  [1] "basket"            "matt"              "matt_irregular"   
#>  [4] "plain"             "rib_warp"          "satin"            
#>  [7] "twill"             "twill_elongated"   "twill_herringbone"
#> [10] "twill_zigzag"     

 plain <- pattern_weave("plain", nrow = 7, ncol = 9)
 print(plain)
#> / - - - - - - - - - \ 
#> | X   X   X   X   X | 
#> |   X   X   X   X   | 
#> | X   X   X   X   X | 
#> |   X   X   X   X   | 
#> | X   X   X   X   X | 
#> |   X   X   X   X   | 
#> | X   X   X   X   X | 
#> \ - - - - - - - - - / 

 matt_irregular <- pattern_weave("matt_irregular", nrow = 9, ncol = 11)
 print(matt_irregular)
#> / - - - - - - - - - - - \ 
#> |         X X         X | 
#> | X X X X     X X X X   | 
#> | X X X X     X X X X   | 
#> | X X X X     X X X X   | 
#> |         X X         X | 
#> |         X X         X | 
#> | X X X X     X X X X   | 
#> | X X X X     X X X X   | 
#> | X X X X     X X X X   | 
#> \ - - - - - - - - - - - / 

 satin <- pattern_weave("satin", nrow = 9, ncol = 11)
 print(satin)
#> / - - - - - - - - - - - \ 
#> | X X   X X X X   X X X | 
#> | X X X X   X X X X   X | 
#> | X   X X X X   X X X X | 
#> | X X X   X X X X   X X | 
#> |   X X X X   X X X X   | 
#> | X X   X X X X   X X X | 
#> | X X X X   X X X X   X | 
#> | X   X X X X   X X X X | 
#> | X X X   X X X X   X X | 
#> \ - - - - - - - - - - - / 

 twill <- pattern_weave("twill", nrow = 9, ncol = 11)
 print(twill)
#> / - - - - - - - - - - - \ 
#> |   X X   X X   X X   X | 
#> | X X   X X   X X   X X | 
#> | X   X X   X X   X X   | 
#> |   X X   X X   X X   X | 
#> | X X   X X   X X   X X | 
#> | X   X X   X X   X X   | 
#> |   X X   X X   X X   X | 
#> | X X   X X   X X   X X | 
#> | X   X X   X X   X X   | 
#> \ - - - - - - - - - - - / 

 twill_zigzag <- pattern_weave("twill_zigzag", nrow = 18, ncol = 11)
 print(twill_zigzag)
#> / - - - - - - - - - - - \ 
#> | X X     X X   X X     | 
#> | X X   X X     X X   X | 
#> | X     X X   X X     X | 
#> | X   X X     X X   X X | 
#> |     X X   X X     X X | 
#> | X   X X     X X   X X | 
#> | X     X X   X X     X | 
#> | X X   X X     X X   X | 
#> | X X     X X   X X     | 
#> |   X X   X X     X X   | 
#> |   X X     X X   X X   | 
#> |     X X   X X     X X | 
#> |   X X     X X   X X   | 
#> |   X X   X X     X X   | 
#> | X X     X X   X X     | 
#> | X X   X X     X X   X | 
#> | X     X X   X X     X | 
#> | X   X X     X X   X X | 
#> \ - - - - - - - - - - - /