I wrote this to create function for the same reasons? The code could be cleaned up a bit.
createsquare(segs#=2,parent=0)
Segs = how many segments per side.
i.e.
grid=createsquare(10)
Creates a 10x10grid with shared verts.
http://www.blitzbasic.com/codearcs/codearcs.php?code=463
Also in the archive is the Mesh terrain by BadJim
http://www.blitzbasic.com/codearcs/codearcs.php?code=362
It does a what you need and more!
createsquare(segs#=2,parent=0)
Segs = how many segments per side.
i.e.
grid=createsquare(10)
Creates a 10x10grid with shared verts.
http://www.blitzbasic.com/codearcs/codearcs.php?code=463
Also in the archive is the Mesh terrain by BadJim
http://www.blitzbasic.com/codearcs/codearcs.php?code=362
It does a what you need and more!