Java Demo-- Blur

You need a Java-enabled browser to view this applet.

This applet shows another powerful, and cheap, graphics tool-- blurring. By nature, computers want to produce sharp, crisp shapes; but the natural world is filled with smooth curves. Blurring makes sharp shapes smooth.

Blurring is easy to accomplish-- replace each pixel with the average value of its neighbors. By taking a weighted average, and weighting the center pixel more, you can accomplish a weaker blur; or by averaging more pixels, you can get a stronger blur.

In this demo, the pixels at the center blur; but the edges do not. The top and left edges animate, just to keep things interesting. The color thus flows in from the edges.

Link to the source code.


Back to Demo List.