Skip to contents

Compute or draw rough segments

Usage

rough_segments(x0, y0, x1, y1, hand = NULL)

draw_rough_segments(x0, y0, x1, y1, hand = NULL, ...)

Arguments

x0, y0

Segment starts.

x1, y1

Segment ends.

hand

Hand-drawn geometry settings created with hand().

...

Graphics parameters passed to graphics::lines().

Value

A list with x, y, and id components describing roughened polyline geometry for each segment.

Examples

plot(1:10, 1:10, type = "n")
draw_rough_segments(1:3, 2:4, 4:6, c(8, 5, 7), hand = human_hand())