powered by
let a field decrease linearly towards its edges
smooth_borders(x, r)
a matrix of the same dimensions as x
a real matrix
a positive integer
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
image( smooth_borders(blossom, r=64), col=gray.colors(128,0,1) )
Run the code above in your browser using DataLab