I decided to post this Processing Code that i wrote during my thesis project,( slightly improved and more adaptive though). It would be really helpful if I had something like this made when I was working on my research projects, so I believe it is going to help a lot of people. The system is consisted by a 3-axis environment, a grid and a custom made solar system the angle(sun-ground angle) of which is calculated. there is a customized support by text display while the algorithm is running and a clock in case time is a parameter of the examined algorithm. I am posting a few snapshot of the interface as well as an early video from my thesis in AAC.
You can download the algorithm here