Maths & numbers

Triangle barycentric coordinates

Express a point as weights of three triangle vertices and check containment.

Triangle barycentric coordinates
Esc to restore

Your inputs

Use exact X,Y headings, without repeating the first point unless closing a polygon.

Up to 25 MB per file, 50,000 data rows, 200 columns and 2 million data cells. Fully blank rows and columns are ignored before row, column and cell limits are checked. Individual tools may have smaller result or chart limits.

Results update as you type. Larger files run when you press Update result.

Your result

LOCAL & PRIVATE

Your result will appear here.

Your inputs stay in this browser. Nothing is uploaded or saved.

A clear answer. Here’s how.

Solves planar area-ratio coordinates so P=αA+βB+γC and α+β+γ=1. Requires exactly three non-collinear vertices. Weights in [0,1] indicate an interior/boundary point; negative weights indicate extrapolation outside the triangle, with a 10⁻¹⁰ classification allowance. Coordinates use one Cartesian system. The weights are affine coordinates, not probabilities or confidence values.

See a worked example

Worked example

A fixed demonstration, separate from the values you enter above.

Point CSV
X,Y
0,0
4,0
0,3
Query point X
1
Query point Y
1

Example result

Example result
VertexWeight
A0.416666666667
B0.25
C0.333333333333

P = weight A × A + weight B × B + weight C × C; weights sum to one. Point is within or on the triangle.