You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Compute barycenter coordinates (u, v, w) for point p with respect to triangle (a, b, c) NOTE: Assumes P is on the plane of the triangle
Parameters
Parameter
Default Value
Note
p
[0, 0, 0]
a
[0, 0, 0]
b
[0, 0, 0]
c
[0, 0, 0]
Return value
Condition
Return Value
(always)
list
Notes
Example
// Point at the centroid of the trianglea= [0, 0, 0]
b= [3, 0, 0]
c= [0, 3, 0]
p= [1, 1, 0]
bary=raylib.Vector3Barycenter(p, a, b, c)
printbary// barycentric coordinates of p in triangle abc