Learn R Programming

ggsketch (version 2.0.0)

rough_bezier: Roughen a cubic Bezier curve

Description

Applies roughness to all four control points, then flattens and reduces the curve. Returns n_passes roughened polyline paths.

Usage

rough_bezier(
  P0,
  P1,
  P2,
  P3,
  roughness = 1,
  bowing = 1,
  n_passes = 2L,
  seed = NULL,
  tol = NULL,
  rdp_eps = NULL
)

Value

List of n_passes 2-column (x, y) matrices.

Arguments

P0, P1, P2, P3

Control points as length-2 numeric vectors c(x, y) in inch space.

roughness

Non-negative roughness radius (inches). Default 1.

bowing

Bowing multiplier (currently not applied to Bezier control points separately; roughness serves the role). Default 1.

n_passes

Number of stroke passes. Default 2.

seed

Integer seed for reproducibility.

tol

Flatness tolerance. Default max(roughness * 0.01, 1e-4).

rdp_eps

RDP epsilon. Default max(roughness * 0.005, 1e-5).

See Also

Other sketch-core: arrowhead(), curve_fill(), engrave_fill(), engrave_ladder(), hachure_fill(), hachure_fill_multi(), leader_path(), repel_layout(), rough_arc(), rough_ellipse(), roughen_polyline(), sketch_arrowheads(), sketch_fill(), sketch_fill_multi(), spray_scatter(), stroke_profile(), stroke_ribbon(), treemap_layout(), wash_bleed(), watercolor_wash(), watercolor_wash_multi()