Routine to pick origin point for shapes or polyhedra