Computing grid Vectors