I'm working on creating a simple terrain for my game. It starts off as a flat, square grid mesh with vertices at even intervals which then gets transformed by the height map and textured. I'm having some issues with creating the square grid. I've just iteratively plopped vertices down, however I'm not seeing how I can now generate an index buffer from that. I've sat down with pen and paper and tried to find a pattern formulae to the indices, but it's not as easy as I expected. I've attached an image of what I came up with. It seems like there is some pattern there but it's not immediately clear. Is there any algorithm for this? I assume this is some form of tessellation, but I have not been able to find anything online. Thanks.