

- Spatially varying blur is difficult to implement with good quality.- Diffusion difficult to implement efficiently (fast solvers on grids generally use multigrid methods or kernels of spatially varying size).+ Very low (almost fixed) storage requirements.Using filters (for example, it should be possible to simulate spatially varying blur by doing multiple blurs and combining the results using weights).- Also large for simple images (although it's not too bad, the gradients compress very well).+ High quality at a specific resolution.There would be several possible avenues for converting diffusion curves to SVG: One method might be to use an equation based on the heat equation which can be used for doing a spatially varying blur ( \displaystyle for example). It might also be convenient to use an alternative method for incorporating blur, as simulating a spatially varying blur is not easy. This is convenient when using a representation based on triangles with barycentric interpolation (as this yields a piecewise linear function the Laplacian is zero everywhere, except on the boundaries). This is done for both the colors and the blur and then a spatially varying blur is applied to the diffused colors using the diffused blur values.Īlternatively diffusion curves can be seen as minimizing the integral (over the entire image) of the squared gradient magnitude, with color constraints at certain points. The color inside the circles shows the stop color.ĭiffusion curves are defined as the solution to a Laplace equation (the sum of second partial derivatives is zero) with boundary conditions (the colors on the curves). Here the "gradient stops" are (necessarily) positioned on the path and represented by the circles. This could lead to an on-canvas interface (using an extended gradient tool) that looks a bit like this: Or (only a single color per point on the path and no blur): Instead of defining a group that gets diffused it may also make sense to use subpaths and diffuse those: Or by simply treating diffusion curves as yet another paint server. Normally diffusion curves will have infinite extent, but this can be controlled when needed by surrounding a set of curves with a closed path that has an outside boundary which is fully transparent. This is useful for depth of field effects for example. Note that with diffusion curves the blur itself can also vary along the path, which could be used in the above image to let the edge be sharper in some areas. For example (don't mind the exact attributes):Īssuming that the two gradients are made to go from #F00 to #00F and vice versa this would roughly look like this (note that this is just a rough approximation): Colors at nodes / gradients defined on paths (on one or both sides of the curve)ĭiffusion curves could be represented by paths with gradients attached to them, along with an enclosing group that says that the colors should be diffused within that group.

Here the following features are considered:

The links at the bottom define various features that can be useful for Diffusion Curves.
