Converts a multi-vertex polyline into n_passes roughened stroke paths.
Each path is a matrix with columns x and y (inch coordinates).
Uses a seeded local RNG so the user's .Random.seed is never mutated
(T-CORE-06).
Usage
roughen_polyline(
x,
y,
roughness = 1,
bowing = 1,
n_passes = 2L,
seed = NULL,
tremor = getOption("ggsketch.tremor")
)Arguments
- x, y
Numeric vectors of polyline vertices in inch space. Must have the same length >= 2.
- roughness
Non-negative roughness radius (inches at scale). Default 1.
- bowing
Non-negative bowing multiplier. Default 1.
- n_passes
Positive integer number of stroke passes (default 2).
- seed
Integer seed for reproducibility (ADR-0004).
- tremor
Drift and fatigue to add to every pass, a
sketch_tremor(), orNULLfor none. Defaults togetOption("ggsketch.tremor"), which is unset.
See also
Other sketch-core:
arrowhead(),
curve_fill(),
engrave_fill(),
engrave_ladder(),
hachure_fill(),
hachure_fill_multi(),
leader_path(),
repel_layout(),
rough_arc(),
rough_bezier(),
rough_ellipse(),
sketch_arrowheads(),
sketch_fill(),
sketch_fill_multi(),
spray_scatter(),
stroke_profile(),
stroke_ribbon(),
treemap_layout(),
wash_bleed(),
watercolor_wash(),
watercolor_wash_multi()
