graph drawing tool
centroid = function(node)
	return {
		sx=node.x + node.width/2,
		sy=node.y + node_height(node)/2
	}
end