Algosim documentation: DissolveToColorRegularly

DissolveToColorRegularly

Returns a pixmap with every nth pixel set to a given colour.

Syntax

Description

If n > 0, then DissolveToColorRegularly(pm, c, n) returns pm with every nth pixel set to c (horizontally and vertically). If n < 0, then DissolveToColorRegularly(pm, c, n) returns pm with all but every nth pixel set to c. n defaults to 2.

The overload with a function instead of a colour will use f(x, y) as the colour at pixel (x, y).

Examples

DissolveToColorRegularly(ExampleData("rabbit"), (x, y) ↦ hsv(x + y, 1, 1), 2)

Image 1

See also