smooth_borders function

smoother borders

smoother borders

let a field decrease linearly towards its edges

smooth_borders(x, r)

Arguments

  • x: a real matrix
  • r: a positive integer

Returns

a matrix of the same dimensions as x

Details

Values within the field are linearly reduced from their original value to the field minimum, starting r pixels away from the edge. This enforces truely periodic boundaries and removes sharp edges.

Note

r must not be larger than min( dim(x) )/2.

Examples

image( smooth_borders(blossom, r=64), col=gray.colors(128,0,1) )
  • Maintainer: Sebastian Buschow
  • License: MIT + file LICENSE
  • Last published: 2023-10-04

Useful links