I'm trying to get random point inside triangle in Java.
I have three points with x, y coordinates and trying to use this formula.
P = (1 - sqrt(r1)) * A + (sqrt(r1) * (1 - r2)) * B + (sqrt(r1) * r2) * C
Where r1 and r2 are random double from 0 to 1. But, how to define A, B, C? Because now A have x and y coordinates.