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

Re: New version of mesh branch.

From: Jasper van de Gronde <th.v.d.gronde@hccnet.nl>
Date: Fri, 03 Feb 2012 16:59:37 +0100
Message-ID: <4F2C0469.5030803@hccnet.nl>
To: Tavmjong Bah <tavmjong@free.fr>
CC: Israel Eisenberg <owlgems@yahoo.com>, Cyril Concolato <Cyril.Concolato@cisra.canon.com.au>, www-svg <www-svg@w3.org>
On 03-02-12 13:27, Tavmjong Bah wrote:
> ...
> * I am rethinking our decision to use type 6 rather than type 7 meshes.
> See: http://tavmjong.free.fr/blog/?p=361
> 
> * I am open to making SVG meshes use something like an interpolant
> provided that:
> 
> 	1. It doesn't complicate the syntax.
> 	2. There is a straight forward way of editing such meshes.
> 	3. There is a simple way to export them to PostScript/PDF.

I'd recommend borrowing the path syntax. Essentially you could just
create a stop-color-path attribute or something like that. The main
thing is to decide whether or not you'd want to allow "mixed"
interpolations other than linear mixed with some non-linear
interpolation (which is what we have now, so it seems sensible to allow
that). Basically you'd then have something like this:

offset-path="C 25,25 ..." stop-color-path="C red green blue"

(I'm not sure whether it's worth allowing relative coordinates for
colors, but even that would be doable, and might sometimes make sense.)

So instead of having coordinate pairs you'd allow color specifications.
Mathematically this is no problem, syntactically it's essentially only
as complicated as it needs to be, and editing need not be a problem
either. For example, if both interpolation types are cubic, then
essentially you could just allow a user to select colors per control
point (instead of only at the corners). Exporting would definitely need
subdivision, but that's basically unavoidable (PDF simply doesn't
support this kind of thing, unfortunately).

The above obviously applies to either Coons patches or tensor patches,
but only tensor patches allow you to match up derivatives across
boundaries. A fancy editor could even allow a user to essentially set
"smooth" (control) points if we had tensor patches :)
Received on Friday, 3 February 2012 16:00:15 GMT

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