dist_pt2l: Euclidean distance between a point and a line

View source: R/geom_dist.R

dist_pt2lR Documentation

Euclidean distance between a point and a line

Description

Computes the minimum distance between points and a line

Computes minimum distances between a given set of 3D coordinates and a line

Usage

dist_pt2l(coords, l)

Arguments

coords

A Nx3 matrix-like object with point coordinates, one per row.

l

A 2x3 matrix-like object with coordinates defining a line, one coordinate per row.

Value

A vector of distances.

TODO

Tests

Note

This is a very simple distance function. The orthogonal projection of the point onto the line is done by proj_pt2l

Author(s)

Cornel M. Pop


cornelmpop/Lithics3D documentation built on Feb. 10, 2024, 11:54 p.m.