Processing Forum
This is preliminary work part of something bigger. The Arduino, with 4 phtoresistors, was used to detect variation across a gradient of light/shade. The direction and angle of maximum/minimum light is calculated using a technique called Wombling (for the mathematically inclined it is just using a bilinear interpolation and differentiating to get the gradient magnitude and direction).
Then via serial communication with processing to draw the corresponding arrow (but the idea is to use it for far more interesting interactions)
Code (Arduino side)