I was wondering about the texture interpolation for triangles (in
mesh), and if it would be possible to have the same kind of
interpolation on a polygon (let's assume a simple without hole
polygon for the time being, thanks).
At first, I blocked on the zero division when evaluating at a vertex
of the polygon, but then I found the following idea (see picture).
Let's a,b,c,... be the euclidean distance (or its square, after all,
do we really need a slow square root ?) from the evaluated point F
to each vertex.
It must be the euclidean distance (or based on it), because of the
needed isotropy for the interpolation.
(rotations of small angles should not change the result)
The absolute weight of the texture at point A would be the product
of all the distance but the distance from A.
The relative weight (used to weight the real texture list) is of
course divided by the sum of all absolute weights.
On Vertex A, all weights are null but for A, which give r(A)=1, just
W(x) is always positive or null.
T is always positive (assuming a polygon of more than 2 points,
without duplicated vertex).
So the division is fine.
The only sad point (but is it really sad ?) is that on the middle of
A-B, the influence of others points is not null (that's also why I
might prefer the square of the distance: less influence for more
Does anybody sees a flaw in this idea ?
The superior man understands what is right;
the inferior man understands what will sell.
Post a reply to this message
Download 'expl.png' (24 KB)
Preview of image 'expl.png'