Rastering Program written in C++