Skip to contents

Make reuleaux polygons

Usage

arrow_head_reuleaux(
  sides = 3,
  rotate = 0,
  rescale = c(1, 1),
  nudge = c(0, 0),
  transformations = c("unitizer", "rotater", "rescaler", "nudger"),
  plot = FALSE,
  n = NULL
)

Arguments

sides

number of vertices (sides) of the polygon

rotate

rotation angle in radians

rescale

a single value or 2-length vector for scaling in x and y

nudge

a single value or 2-length vector for nudging in x and y

transformations

a vector of transformation functions, applied in the order given. Functions whose shapes are already in unit coordinates (arrow_head_bezier(), arrow_head_catenary(), arrow_head_function(), arrow_head_icon(), arrow_head_latex()) omit "unitizer" by default.

plot

plot arrowhead if TRUE

n

Deprecated. Use sides instead. If supplied, a warning is given and its value is used for sides.

Value

a matrix

Examples

triangle <- arrow_head_reuleaux(plot = TRUE)

diamond <- arrow_head_reuleaux(sides = 4, plot = TRUE)

acute_triangle <- triangle <- arrow_head_reuleaux(rescale = c(1, .5), plot = TRUE)

sharp_diamond <- arrow_head_reuleaux(sides = 4, rescale = c(1, .4), plot = TRUE)