A little colour
A more colourful sketch than I have been doing of late.
This uses FOR loops to draw the squares along the x axis; and another to draw the squares on the y axis.
The colour is controlled by the mouse movement. Long details below.
The colour in processing is by default set up as (red, green,blue). It's basically colour mixing with light.
The red component in the sketch is defined by the distance of the x co -ordinate of the mouse minus the x value of the square on the grid it is over , expressed as an absolute. ( which means its a positive number at all times. ).
The green component is defined by the y coordinate of the mouse minus the y value of the square it is over expressed as an absolute.
The blue component is defined by the mouse's x coordinate minus the width divided by two expressed as an absolute.
Yeah I know. My brain did that many many many times. But now I know what it all means and how it works. So I can actually write this stuff. Yay elastic brain learning.