Learn R Programming

ggsketch (version 2.0.0)

roughen_polyline: Roughen a polyline (multiple connected segments)

Description

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)

Value

A list of n_passes matrices (columns x, y), one per pass.

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).

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()