smooth_borders: smoother borders

View source: R/boundaries.R

smooth_bordersR Documentation

smoother borders

Description

let a field decrease linearly towards its edges

Usage

smooth_borders(x, r)

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.

Value

a matrix of the same dimensions as x

Note

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

Examples

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

dualtrees documentation built on Oct. 4, 2023, 5:10 p.m.