I am trying to write a java Program wich essentially lets a Point inside a given triangle move only in a straight line to one of the three corners (the specific corner being chosen randomly at every move), covering half the distance between its current point and the corner. For that i am using Barycentric coordinates (and it is my first time using them, so be gentle).
But now i have problems in calculating how the barycentric coordinates change with each move.
So the coordinate for the corner i am moving TO is easy, being
current + (1 - current)/2
so inside the triangle the barycentric coordinates always add up to 1, right? so the value added to the coordinate of the point were moving to has to be subtracted from the other two values. As i have now understood from other questions that the ration between those two values has to always stay the same.
But how do i do that? I tried a lot but i dont seem to find a formula to make those values right...
I would be extremely happy if someone would give me an idea how to solve this little problem.