Grid lines generation