I realize that my previous schemas were not very easy to understand. All adjacent right triangles located in the same plane are stored by pairs, there is a pair per cell. I store these pairs in a 2D array. This array is often obviously not full. I have to reduce the count of full arrays in order to reduce the complexity of the mesh sent to the graphics card. The fewer rectangles I get, the fewer quads will be necessary to represent the whole mesh. That’s exactly what I have succeeded to do as you can see below:
[ ][ ][ ][ ][ ][ ][ ][ ]
[ ][ ][ ][X][ ][ ][ ][ ]
[ ][X][X][X][X][X][X][X]
[ ][ ][X][X][X][X][ ][ ]
[ ][X][X][X][X][ ][ ][ ]
[ ][X][X][X][X][ ][ ][ ]
[ ][ ][X][ ][ ][ ][ ][ ]
[ ][ ][ ][ ][ ][ ][ ][ ]
Instead of having 21 quads, I only use 7 quads, each one is represented with a different color. Best regards.