Triangulation: select weights for triangle corners so that they remain constant when crossing a boundary
<p>I have a set of points that can be understood as loudspeaker positions. I want to write an algorithm that selects always three speakers given a virtual position in the two-dimensional space, and assign them amplitudes so that when the virtual position coincides with a speaker position, only that speaker has an amplitude > 0, and otherwise the tree speakers surrounding the point have a weight-balanced amplitude. The three speakers are selected using a Delaunay triangulation.</p>

<p>Now this all works fine when I stay within one triangle, but when I cross the boundary to the next triangle, the two speakers defining the boundary abruptly change their amplitude. I tried this first by projecting the point to the altitudes of the triangle:</p>

<p><a href="https://i.stack.imgur.com/fauKk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fauKk.png" alt="enter image description here"></a></p>

<p>Here the virtual point is a magenta circle, the speakers are black little squares, and the amplitude are visualised by blue circle. When the magenta circle slightly moves to the next triangle, the amplitudes (blue circle) change size:</p>

<p><a href="https://i.stack.imgur.com/MlBng.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MlBng.png" alt="enter image description here"></a></p>

<p>Trying the same with median projection doesn't help. One triangle:</p>

<p><a href="https://i.stack.imgur.com/QfkRD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QfkRD.png" alt="enter image description here"></a></p>

<p>Moving to the next triangle (amplitudes jump again):</p>

<p><a href="https://i.stack.imgur.com/tc5vm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tc5vm.png" alt="enter image description here"></a></p>

<p>The amplitude is always based on the relative position of the point projected onto the diagonal that leaves a corner.</p>

<p>Any ideas how to fix this? I'm thinking I need to make sure that at the boundary, the weight of the speakers must only depend on the two speakers forming the boundary. Perhaps with an additional clever multiplication?</p>