Finish homework 4

Signed-off-by: kfei <kfei@kfei.net>
Finish phase 1, 2 of project 2

Signed-off-by: kfei <kfei@kfei.net>
Fix bug in find_centroid

Should just return the first vertex if area computes to zero.
Hint: Don't consider the 'polygon' is a straight line, it is just a vertex.

Signed-off-by: kfei <kfei@kfei.net>