Gate placement + rendering logic