Learn R Programming

retistruct (version 0.6.3)

remove.intersections: Remove intersections between adjacent segments in a closed path

Description

Suppose segments AB and CD intersect. Point B is replaced by the intersection point, defined B'. Point C is replaced by a point C' on the line B'D. The maximum distance of B'C' is given by the parameter d. If the distance l B'D is less than 2d, the distance B'C' is l/2.

Usage

remove.intersections(P, d = 50)

Arguments

P

The points, as a 2-column matrix

d

Criterion for maximum distance when points are inserted

Value

A new closed path without intersections