R/dummycoor.R

dummycoor <-
function (tri.obj, l1, l2, m, away) 
{
    v <- l2 - l1
    v <- c(v[2], -v[1])
    norm <- sum(v^2)
    if (norm > 0) {
        v <- v/norm
    }
    mp <- (l1 + l2)/2
    eps <- 1e-05
    test <- mp + eps * v
    inconv <- in.convex.hull(tri.obj, test[1], test[2])
    if (inconv) {
        dum <- m - away * v
    }
    else {
        dum <- m + away * v
    }
    return(dum)
}

Try the alphahull package in your browser

Any scripts or data that you put into this service are public.

alphahull documentation built on June 16, 2022, 5:10 p.m.