Posts

Showing posts with the label barycentric coordinates

Barycentric Coordinates Made Clear: From a UV Triangle to a 3D Triangle

Image
Barycentric Coordinates Made Clear: From a UV Triangle to a 3D Triangle This post explains, in plain language, why a simple triangular region in a 2-dimensional parameter space can describe every point of a real triangle in 3-dimensional space. Through one clean affine formula, the 2D parameters (u, v) determine points on a 3D triangle. Once this connection is seen, concepts such as interpolation, texture mapping, geometric modelling, and FEM become much easier to understand. Two Worlds Connected by a Map 1) Parameter World (UV-space, 2D) Start in a flat coordinate plane labelled by two parameters, u and v . Consider the square defined by 0 ≤ u ≤ 1 0 ≤ v ≤ 1 If we cut this square along the diagonal line u + v = 1 (or equivalently v = −u + 1 ), we keep only the triangular region 0 ≤ u ≤ 1 0 ≤ v ≤ 1 u + v ≤ 1 This triangle has vertices (0,0) , (1,0) , (0,1) and is called the standard 2-simplex . Every point inside it is a convex mixture of its three corners. 2...

What Are Barycentric Coordinates?

Image
What Are Barycentric Coordinates? Barycentric coordinates provide a way to describe any point inside a triangle using the triangle’s own vertices as a reference. Instead of relying on the usual x–y axes, we express a point as a weighted combination of the three corners. The Core Idea Let a triangle have vertices A , B and C . Any point P inside (or on) the triangle can be written as P = αA + βB + γC The numbers α, β and γ are the barycentric coordinates of P. They indicate how strongly each vertex contributes to P. For this expression to make geometric sense, the three weights must satisfy α + β + γ = 1 This condition ensures that P behaves like a weighted average — a “blend” of A, B and C — rather than drifting away from the triangle. As long as all three values are non-negative ( α, β, γ ≥ 0 ), the point lies somewhere within the triangle. Examples α = 1 , β = γ = 0  →  P = A α = β = 0.5 , γ = 0  →  midpoint of AB α = ...