Generates a random point inside a convex polygon using barycentric coordinates.
Output point [x,y,z]
Polygon vertices as flat array [x,y,z,x,y,z,...]
Temporary array for triangle areas (will be modified)
Random value [0,1] for triangle selection
Random value [0,1] for point within triangle
Generates a random point inside a convex polygon using barycentric coordinates.