smoother borders
let a field decrease linearly towards its edges
smooth_borders(x, r)
x
r
a matrix of the same dimensions as x
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.
r must not be larger than min( dim(x) )/2.
min( dim(x) )/2
image( smooth_borders(blossom, r=64), col=gray.colors(128,0,1) )
Useful links