Algosim documentation: ComputePixmap

ComputePixmap

Creates a pixmap using a formula giving the colour at each pixel.

Syntax

Description

CreatePixmap(w, h, x, y, expr) returns a w×h pixmap in which pixel (x, y) has colour expr(x, y).

Examples

n ≔ 500; ComputePixmap(n, n, x, y, hsv(x⋅360/pred(n), 1, y/pred(n)))

Image 1

ComputePixmap(500, 500, x, y, rgb(x/499, y/499, 0.5))

Image 2

ComputePixmap(500, 500, x, y, hsv(x^2/100 + y/10 − sin((x−20⋅cos(y/25))/200)⋅x⋅y/50, abs(cos(x/500)), abs(cos(x/500))))

Image 3

See also