W3C home > Mailing lists > Public > www-svg@w3.org > January 2012

Re: New version of mesh branch.

From: Jasper van de Gronde <th.v.d.gronde@hccnet.nl>
Date: Thu, 12 Jan 2012 10:20:47 +0100
Message-ID: <4F0EA5EF.30405@hccnet.nl>
To: www-svg@w3.org
(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.)


Coons.png
(image/png attachment: Coons.png)

tensor.png
(image/png attachment: tensor.png)

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

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:50 GMT