Zhenwei Xie's final project/installation for FIT required some code to help him finish it. Here's the code.