Code for a canvass painting robot