Basic coordinate transform and loop on cup detection