determineOrder: Determine order in which to pass through a set of points

determineOrderR Documentation

Determine order in which to pass through a set of points

Description

Greedy algorithm to connect points, with the idea that a point is connected by a line with the two points closest to each, that haven't yet been connected into the shape. Results depend on the starting point.

Usage

determineOrder(x, y)

Arguments

x

x coordinates

y

y coordinates

Value

vector of indices for ordered traversion along border


heike/gglogo documentation built on Feb. 3, 2024, 1:45 p.m.