Okay,

Mental a few nights ago put out the question: Can we do gradient meshes with standard SVG? So I've been thinking about it. Here is my idea.

(also, I went into Illustrator, made a gradient mesh and exported it as SVG. Illustrator just renders it as a bitmap in the SVG file. I'm seriously unimpressed with the Adobe folks, I expect more)

Okay, so we can think of a gradient mesh as points of color that are adjustable in their length and path of the color. There can potentially be multiple colors all over the area of the object, each contributing to a complex color created within.

I think if we look at each of the points, and then divide the whole object into squares based off of those colors and the next color. So if:

------------------- | | | c1 | | | | | | c2 | | | -------------------

we can look at like:

------------------- | | | | |---c1-------------| | | | | | | | | |------------c2----| | | | | -------------------

Then, make a square for each area with the color that effects it. So there would be 4 squares with c2 and four with c1. Each of these squares would have a radial gradient that goes from the color to transparent.

I think that this could also be extended to not be square shapes, so that the color could be 'turned' and expanded in odd ways through transforms of the shapes. I haven't played with this though.

Anyway, we take all these squares, and then define them as a pattern for the shape. So that there can be complex shapes without us going crazy, and they can be resized and the mesh gradient grows with the bounding box.

Okay, that's the idea. Thoughts? Comments? Does this do what people use gradient meshes for? I haven't played with them alot.

--Ted

PS - I attached a hand coded SVG file kinda showing what I'm thinking.