path_shape: Path along a Shape

Description Usage Arguments Value See Also Examples

View source: R/7-Path.R

Description

Calculate the path of a shape given supplied vertices.

Usage

1
path_shape(mat, cycle = TRUE, n = 30)

Arguments

mat

an Nx2 matrix of (row, col) coordinates

cycle

logical value determining whether to the first and last coordinates

n

number of points along each edge to calculate

Value

Nx2 matrix of (row, column) coordinates

See Also

Other path-fitting functions: path_arc(), path_bezier(), path_circle(), path_ellipse(), path_fill(), path_fn(), path_intersection(), path_lerp(), path_ray(), path_rect()

Examples

1
2
3
4
5
6
# Right Triangle
path_shape(rbind(
  c(10,1),
  c(10,10),
  c(1,1)
), cycle=TRUE)

cursr documentation built on Jan. 13, 2021, 7:35 a.m.