calc_barycentric_line_coords: Calculate barycentric coordinates at given line start/end...

Description Usage Arguments Value Author(s) Examples

View source: R/barycentric.R

Description

Calculate barycentric coordinates at given line start/end points Vectorized function to get barycentric coodinates for segment start/end points for all triangles

Usage

1
calc_barycentric_line_coords(lx1, ly1, lx2, ly2, x1, y1, x2, y2, x3, y3)

Arguments

lx1

numeric (or array), line first x-coordinate

ly1

numeric (or array), line first y-coordinate

lx2

numeric (or array), line second x-coordinate

ly2

numeric (or array), line second y-coordinate

x1

numeric (or array), triangle corner one x-coordinate

y1

numeric (or array), triangle corner one y-coordinate

x2

numeric (or array), triangle corner two x-coordinate

y2

numeric (or array), triangle corner two y-coordinate

x3

numeric (or array), triangle corner three x-coordinate

y3

numeric (or array), triangle corner three y-coordinate

Value

matrix of barycentric coordinates for seg1 & seg2 (start & end)

Author(s)

Leland Scantlebury

Examples

1
2
3
4
5
6
7
calc_barycentric_line_coords(lx1 = c(523300,523400),
                             ly1 = c(4925787.45,4925802.08),
                             lx2 = c(523305,523405),
                             ly2 = c(4925790.45,4925888.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.