Documentation: Pointillize

Description

This action paints the picture with circular points. Processing time increases drastically with small radii and/or high densities.

Demo

Point radius:
Density:
Noise:
Transparent background:

Example usage

var img = new Image();
img.onload = function() {
	Pixastic.process(img, "pointillize", {radius:5, density:1.5, noise:1.0, transparent:false});
}
document.body.appendChild(img);
img.src = "myimage.jpg";

Parameters

  • radius (int)
    Radius of the points, value greater than 1.
  • density (float)
    Density of the points. Value from 0 to 5. A value of 1 gives a total of (width * height / diameter) points.
  • noise (float)
    Noise in the distribution of the points, value equal to or greater than 0.
  • transparent (bool)
    If true, the points will be painted on a transparent background, otherwise they are painted on top of the original image.

Known issues

  • Since the points are painted in order top to bottom, left to right, a "layering" effect can be seen when using high densities.

View source: pointillize.js

Browser support