A Tangram implementation with Prolog