Learn R Programming

IceCast (version 2.1.0)

untwist_sec: Remove self-intersections from one section of a contour

Description

Function to correct self-intersections in a section of a line.

Usage

untwist_sec(line, tol = 0, eps = 0.25)

Arguments

line

N x 2 matrix of coordinates

tol

how much of a difference between the original line and the simplified line is allowed

eps

how much to increase tol by on each iteration

Value

n x 2 matrix of the new coordinates with self-intersections removed

Examples

Run this code
# NOT RUN {
par(mfrow = c(1, 2))
plot(currSecEx, type = "l", main = "Original Line Section", xlab = "", ylab = "")
new_sec <- untwist_sec(currSecEx)
plot(new_sec, type = "l", main = "New Line Section", xlab = "", ylab =  "")
# }

Run the code above in your browser using DataLab