rectangular sampling of merit function for better plotting