baryToCart

Legacy form of barycentricToCartesian for TriRep and DelaunayTri objects.

Category: Mathematics > Computational Geometry

Syntax

C = baryToCart(TR, T, B)

Converts barycentric coordinates B in the simplices T to Cartesian points.

Description

baryToCart does the weighted sum of the simplex vertices that defines barycentric coordinates, exactly as barycentricToCartesian does for the newer classes. It is kept for code written against the older TriRep and DelaunayTri API.

New code should use delaunayTriangulation and barycentricToCartesian.

Input arguments

TR
A DelaunayTri or TriRep object.
T
Column vector of simplex indices.
B
Barycentric coordinates, one row per simplex in T.

Output arguments

C
Cartesian coordinates, one row per row of B.

Example

Barycentric point to Cartesian

x = [0 1 1 0 0.5]';
y = [0 0 1 1 0.5]';
DL = DelaunayTri(x, y);
c = baryToCart(DL, 1, [0.2 0.3 0.5])
Output
c = 1×2

    0.9000    0.6000

See also

barycentricToCartesian cartToBary DelaunayTri