Algosim documentation: transformation

transformation

Spatially transforms a pixmap using a custom formula.

Syntax

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❩)

Image 1

See also