Enter Cartesian coordinates for vertices A, B and C and query point P, then enter one scalar value at each vertex. Use a common coordinate scale and consistent scalar units; all inputs use registered unit 1. The calculator returns three barycentric weights and their weighted scalar sum. It evaluates an arbitrary query point and vertex data, rather than finding a polygon centroid.
For a nondegenerate triangle, the weights sum to one in exact arithmetic. All three positive weights indicate a strictly interior point. Nonnegative weights with at least one zero indicate the boundary; at a vertex, its weight is one and the other two are zero. Any negative weight indicates an exterior point. A zero weight alone places P on the opposite edge’s supporting line, which can extend outside the triangle.
The weighted sum gives linear interpolation inside the triangle and extrapolation outside it. This supports scalar evaluation on triangular meshes. The calculator displays numeric results; it does not automatically classify containment. See TU Wien’s introduction to triangle barycentric coordinates.
With A = (0, 0), B = (4, 0), C = (0, 4) and P = (1, 1), the signed determinant is 16. The weights are 0.5, 0.25 and 0.25. Vertex values 10, 20 and 30 therefore give 0.5 × 10 + 0.25 × 20 + 0.25 × 30 = 17.5.
Collinear or repeated vertices give a zero determinant. Division by zero makes all three weights unavailable, and that unavailability propagates to the scalar result; unavailable does not mean zero. Numeric range failures also propagate to dependent results.
Nearly collinear triangles and extreme coordinate magnitudes can amplify numerical error. Display rounding can hide small nonzero weights, so rounded signs are unsuitable for reliable boundary decisions. This calculator supplies no tolerance-based containment test. It assumes a planar Cartesian coordinate system and linear variation of the scalar across the triangle.
