transformation
Spatially transforms a pixmap using a custom formula.
Syntax
-
transformation(pm, r, expr)-
pmis a pixmap -
ris a symbol -
expris an expression inr
-
Description
transformation(pm, r, expr) returns the pixmap obtained from pm by applying the mapping r ↦ expr(r), where r is a two-dimensional vector of pixel coordinates. The coordinate system is that of ℝ² centred at the centre of pm.
Examples
transformation(ExampleData("harvestman"), r, ❨√abs(r[1]^1.9), r[2] − .1⋅abs(r[1])^1.2❩)
