AlgoSim
Homepage | Screenshots | Gallery of Visualisation | User's Guide | Function Reference | Download | FAQ | Support | Bugs and Solutions | Donate

Reference: createColouredPlane

createColouredPlane(expr, xmin, xmax, xres, ymin, ymax, yres) creates a set describing a coloured plane using the function expr of x and y. expr returns a colour code, e.g. using the rgb or hsv function. x ∈ [xmin, xmax], y ∈ [ymin, ymax], and the resolution is xres and yres in the horizontal and vertical direction, respectively. The resulting set (coloured plane) is drawn using the drawColouredPlane function.

Example:
         Superposition of two water waves.
         ψ ≔ "r" ↦ "sin(4⋅norm(❨2, 2❩ − r))/6"
         Φ ≔ "r" ↦ "sin(4⋅norm(❨0, 0❩ − r))/6"
         S ≔ "r" ↦ "ψ(r) + Φ(r)"
         waves ≔ createColouredPlane("hsv(90 − 270⋅S(❨x, y❩), 1, 1)", -10, 10, 0.1, -10, 10, 0.1)
         drawColouredPlane("waves")