Skip to contents

Coordinates of the points on the curve

Usage

# S4 method for sfc_nxn
sfc_segments(p, bases = p@rules@bases, start = c(0, 0), ...)

# S4 method for sfc_sequence
sfc_segments(p, bases = NULL, start = c(0, 0), by = "Cpp")

Arguments

p

An sfc_nxn or sfc_sequence object.

bases

A list of base patterns, consider to use BASE_LIST.

start

Coordinate of the start point.

...

Other argument.

by

Which implementation? Only for the testing purpose.

Value

A two-column matrix of coordinates of points on the curve.

Details

For the sfc_segments() on the sfc_sequence object, if bases is not set, it uses BASE_LIST internally. Make sure the sequence only contains the pre-defined base patterns.

Examples

p = sfc_2x2("I", "11")
loc = sfc_segments(p)
plot(loc, type = "l", asp = 1)