For this Processing Workshop, we started by looking at converting a colour value to a height location on screen. We created the function testColor to map mouse coordinates to the image we have loaded. We did this by creating x and y integers and mapping the mouse points to the width and height. This then returns the images pixels depending on where the mouse is. For this example it creates rectangles which are the colour of whichever pixel the mouse is on.

Screen Shot 2014-12-11 at 13.38.47colourline


The next step is colour to height reading multi values. In this example we are using arrays to store our colour values. We then created three custom methods to  draw all the blocks to screen, build an array of colours and map mouse coordinates to image coordinates to read a colour value.

Screen Shot 2014-12-11 at 14.47.31Screen Shot 2014-12-11 at 14.47.35    colourblocks