My understanding is I can position a point anywhere inside a triangle in 3D space using a weighted average:
import numpy as np
triangle = np.arange(9)
triangle.shape = (3,3)
weights = np.array([1, 0.3, 20])
point = np.average(triangle, weights=weights, axis=0)
Now I have a point positioned in a triangle using weighted average. My question is how to do the inverse. If I have a triangle and I already have a point positioned inside it, can I get the weights from the relationship between the point and triangle that would let me use the weighted average to reposition the point? For example if the triangle moved and I want the point to move with it staying in the same position relative to the triangle. I realize this can be done with a barycentric calculation. I'm hoping there is a simpler way with weighted average.