Re: New version of mesh branch.

(Cross-post from inkscape-devel, as I'm responding to an SVG issue
rather than an Inkscape issue.)

On 11-01-12 14:16, Tavmjong Bah wrote:
> ... Tensor meshes were added as an experiment
> to see if they would help in smoothing color transitions across patch
> boundaries (they don't seem to help very much) and are not envisioned to
> be part of the SVG specification for meshes.

You are correct that in their current incarnation tensor meshes cannot
solve the problem completely. This essentially has to with the fact that
the current meshes only use cubic Beziérs for the transform, and not for
the gradient (using the terminology from my SVG Open talk). However, if
we /would/ mirror transform and gradient functionality tensor meshes are
able to solve this problem easily, it could even become part of an
editor's functionality, similar to how Inkscape currently allows for
smooth and symmetric nodes on paths.

I have attached two images. Coons.png tries to recreate the example that
was posted earlier, where I have assumed that the color varies linearly
from white to black along the four edges emanating from the center. It
uses Coons patches and thus essentially reduces to bilinear
interpolation on this example. In tensor.png I used the same mapping for
the positions, but the colours have been interpolated using a cubic
Beziér patch in such a way that the gradients mostly match up at the edges.

Note that even in tensor.png a cross is visible in the center, this is
to some degree unavoidable, as the gradient is discontinuous in the
center. (Non-polynomial interpolations might be able to do "better", but
that's a whole different ball game.) Also, it is not that hard to create
something similar that does have a continuous gradient at the center,
and which would exhibit no cross at all. (And again, an editor could
easily facilitate this.)

Received on Thursday, 12 January 2012 09:21:27 UTC