ComputePixmap
Creates a pixmap using a formula giving the colour at each pixel.
Syntax
-
CreatePixmap(w, h, x, y, expr)
-
w
andh
are positive integers -
x
andy
are symbols -
expr
is a colour-valued expression, possibly containingx
andy
-
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)))
ComputePixmap(500, 500, x, y, rgb(x/499, y/499, 0.5))
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))))