Learn R Programming

dualtrees (version 0.1.5)

smooth_borders: smoother borders

Description

let a field decrease linearly towards its edges

Usage

smooth_borders(x, r)

Value

a matrix of the same dimensions as x

Arguments

x

a real matrix

r

a positive integer

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.

Examples

Run this code
image( smooth_borders(blossom, r=64), col=gray.colors(128,0,1) )

Run the code above in your browser using DataLab