Some code of basic algo. Keep going!  http://www.csie.ntnu.edu.tw/~u91029/