Convert to-and-from a local coordinate system relative to a n-sided polygon

51 Views Asked by At

Question

Let $P$ be a convex, regular $N$-sided 2D polygon; take for instance, a pentagon.

Let $T$ be a point located within $P$, or alongside any of its sides.

Is it possible to convert $T$'s cartesian coordinates into an alternate coordinate system, such that the resulting N-length vector acts as a local coordinate system relative to $P$ sides/vertexes, referring to back to $T$?

And if so, how to convert to and from such coordinate system?

Any help on the subject it's welcome; ranging from examples, alternative suggestions and explicit answers, to guidance on places where to look for more information.


Edits

#1

After some research, I found there are a few existing methods for doing so (Wachspress coordinates, Mean Value coordinates, Harmonic coordinates...), but I haven't been able to find any information at all about the concepts behind them, or any (simple) examples to guide myself on.

Based on what I've read so far, Wachspress coordinates look adequate to accomplish my objective; however, should any other ideas be brought to the table, as long as it serves its purpose to allow me to accomplish my objective, I'm fine with it.