machine graphics algorythms by using canvas and javascript