Map function

Under development...


See Processing reference guide for official documentation on the map() function


To best demonstrate the behavior of the map() function, we offer this live demonstration. Above the line, we show the (start1,stop1) range and the current value indicated by the mouse movement. Below the line, we overlay the (start2,stop2) to be aligned with the (start1,stop1) range, and then the result which is what is returned by a call to map. Essentially, it translate the original value within the original range, to the associated result that would be in the new range.

Note well that there is no requirement that start1 < stop1, nor that start2 < stop2. In our demo, we pick those values randomly. You may press the 'r' key to start over with a new selection of random values.


Michael Goldwasser
Last modified: Thursday, 18 February 2016