calc_barycentric_coords: Calculate barycentric coordinates at point(s)

Description Usage Arguments Value Author(s) Examples

View source: R/barycentric.R

Description

Calculate barycentric coordinates at point(s)

Usage

1
calc_barycentric_coords(x, y, x1, y1, x2, y2, x3, y3)

Arguments

x

numeric (or array), target x-coordinate

y

numeric (or array), target y-coordinate

x1

numeric, triangle corner one x-coordinate

y1

numeric, triangle corner one y-coordinate

x2

numeric, triangle corner two x-coordinate

y2

numeric, triangle corner two y-coordinate

x3

numeric, triangle corner three x-coordinate

y3

numeric, triangle corner three y-coordinate

Value

matrix of coordinates, b1, b2, b3

Author(s)

Leland Scantlebury

Examples

1
2
3
4
5
calc_barycentric_coords(x = c(523300,523400),
                        y = c(4925787.45,4925802.08),
                        x1 = 523232.75, y1 = 4925893,
                        x2 = 523448.87, y2 = 4925906.09,
                        x3 = 523353.60, y3 = 4925703.32)

scantle/pbjr documentation built on Dec. 22, 2021, 10:19 p.m.