dist.ellipse: Compute minor axis distance of ellipse

View source: R/dist.ellipse.R

dist.ellipseR Documentation

Compute minor axis distance of ellipse

Description

dist.ellipse computes the length of the minor axis needed for an ellipse of a certain shape and angle to intersect each of the other coordinates from a starting coordinate.

Usage

dist.ellipse(coords, shape, angle)

Arguments

coords

An N \times 2 matrix of coordinates

shape

The ratio of the major axis to the minor axis of the ellipse

angle

The angle of the ellipse in the range [0, 180).

Value

A matrix of distances between each coordinate and all other coordinates (and itself). Each row contains the distances for a coordinate.

Examples

data(nydf)
coords <- as.matrix(nydf[, c("x", "y")])
d <- dist.ellipse(coords, 4, 15)

smerc documentation built on Oct. 13, 2022, 9:07 a.m.