From: Jasper van de Gronde <th.v.d.gronde@hccnet.nl>

Date: Fri, 23 Dec 2011 16:30:17 +0100

Message-ID: <4EF49E89.5080300@hccnet.nl>

To: www-svg@w3.org

Date: Fri, 23 Dec 2011 16:30:17 +0100

Message-ID: <4EF49E89.5080300@hccnet.nl>

To: www-svg@w3.org

On 22-12-11 22:36, Erik Dahlstrom wrote: > ... > TB: leaning towards letting the author handle it > ... if you have a regular gradient you owuld not use meshes, or they > would subdivide > ... i'm going to read the paper cyril linked to again Note that the effect you're seeing is probably due to the fact that our eyes are very sensitive to changes in the derivative/gradient (I can probably dig up some references if desired). This means that you'd have to match up both values /and/ derivatives at the boundaries of each cell if you wanted to avoid (or at least minimize) the kind of "artifacts" you're seeing now. And I think Tav is absolutely right that such things should probably be left to authors/authoring tools (especially where Coons/tensor patches are concerned). > CC: let's discuss this at the F2F > ... coons patches are fine and you can do good things with them, but > there are limitations, and authoring tools solve them atm, but we > may want to introduce something like that in the future If the working group wanted to make it easier to solve this problem within SVG, then Sibson's/natural neighbour interpolation (or something similar) could be interesting. Applied to a regular grid this gives exactly the same result as bilinear interpolation at most positions, except that it is guaranteed to be smooth at boundaries between patches (in the sense that it has a continuous derivative). There are also higher order versions, which should allow us to define a variant of the current gradient meshes that would be guaranteed to be smooth across patch boundaries. Computationally, Sibson's interpolation is in general (quite) a bit more involved than bilinear interpolation, but in this particular application we know the mesh is specified on a regular grid. For most of the plane this means that we can just use bilinear interpolation, and for the rest it's not too difficult to compute it either. Sure, it will be more expensive than bilinear interpolation, but only by a small constant factor. (Similar things should hold for higher orders as well.) Note that normally Sibson's interpolation does /not/ guarantee continuity of the derivative at nodes, but apparently there are ways to ensure this as well (but I have not looked into this). > TB: we might want to smooth out linear gradients too > ... using catmull-rom curves For this, be sure to check out what transition functions exist in current gradient file formats. But it would indeed be cool. Finally, merry christmas to you all!Received on Friday, 23 December 2011 15:31:01 UTC

*
This archive was generated by hypermail 2.4.0
: Friday, 17 January 2020 22:54:33 UTC
*