Weighted average of points in a polygon

LemonJuice

New member
Joined
Apr 7, 2021
Messages
1
Hey!

I'm not sure I'm using the correct mathematical terms here but -

Lets say I have a polygon (it can be any polygon, and let's assume it's blocked within a circle), and I also have a point inside this polygon (point M).
I know all points coodinates, and I want to know the weight of each point of the polygon (points A, B and C) based on M position.

For example, if M is in the middle, each point weight will be 33.3%, if M is on point A, point A weight will be 100%, and points B and C will be 0%.

Having trouble with this one :) Thanks in advance!


Screen Shot 2021-04-07 at 13.24.17.png
 
I'm guessing you have a convex polygon, rectangular coordinates of the vertices and the interior point M and want the barycentric coordinates of M. Take a look at:


with particular attention to the "conversion between barycentric and Cartesian coordinates" about halfway down the page. See if that helps you.
 
Top