smooth_borders | R Documentation |
let a field decrease linearly towards its edges
smooth_borders(x, r)
x |
a real matrix |
r |
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.
a matrix of the same dimensions as x
r must not be larger than min( dim(x) )/2
.
image( smooth_borders(blossom, r=64), col=gray.colors(128,0,1) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.