Make string bezier

string_bezier(
  file = "bezier.svg",
  x = c(0, 0, 1),
  y = c(1, 0, 0),
  n = 20,
  color = "royalblue",
  openfile = TRUE,
  ...
)

Arguments

file

Name of the output file. Defaults to "bezier.svg"

x

The x coordinates of the 3 points of the curve

y

The y coordinates of the 3 points of the curve

n

The number of segments. Defaults to 20.

color

Vector of colors

openfile

Open file in default program for .svg format. Defaults to FALSE.

...

parameters passed to the segments function

Value

file by default or tibble with data if savefile if FALSE

Examples

.old_wd <- setwd(tempdir()) library(spiro) string_bezier( file = "string_bezier.svg", x = c(0,0,1), y = c(1,0,0), color = c("red","blue","black"), n = 100, lwd = 0.3 ) setwd(.old_wd)