making coordinates an array of objects that have vertex2d info (x,y,cmd)