pattern_weave {gridpattern} | R Documentation |
Weave pattern matrix
Description
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.
Usage
pattern_weave(type = "plain", subtype = NULL, nrow = 5L, ncol = 5L)
names_weave
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). |
Format
An object of class character
of length 10.
Details
Here is a list of the various weave type
s supported:
- basket
A simple criss-cross pattern using two threads at a time. Same as the "matt_irregular" weave but with a default
subtype
of2L
.- 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
of3L
.- 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, andR
indicates number of warp down in repeat. An integersubtype
N
will be interpreted as a"N/N(N+N)"
irregular matt weave. A charactersubtype
"U/D"
will be interpreted as a"U/D(U+D)"
irregular matt weave. Has a defaultsubtype
of"3/2(4+2)"
.- plain
A simple criss-cross pattern. Same as the "matt_irregular" weave but with a default
subtype
of1L
.- 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 charactersubtype
"U/D"
will be interpreted as a "matt_irregular""U/D(1+1)"
weave. Defaultsubtype
of2L
.- 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
of5L
.- 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, andM
indicates the "move" number. A charactersubtype
"U/D"
will be interpreted as a"U/D(1)"
elongated twill weave. An integersubtype
N
will provide a"{N-1}/1(1)"
elongated twill weave ifN
is less than 5, 6, or greater than 14 otherwise it will provide a"{N-1}/1(M)"
weave whereM
is the largest possible regular "satin" move number. Defaultsubtype
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.
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.
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)
plain <- pattern_weave("plain", nrow = 7, ncol = 9)
print(plain)
matt_irregular <- pattern_weave("matt_irregular", nrow = 9, ncol = 11)
print(matt_irregular)
satin <- pattern_weave("satin", nrow = 9, ncol = 11)
print(satin)
twill <- pattern_weave("twill", nrow = 9, ncol = 11)
print(twill)
twill_zigzag <- pattern_weave("twill_zigzag", nrow = 18, ncol = 11)
print(twill_zigzag)