Why does MATLAB sometimes draw patches out of order?
MATLAB determines the order in which patches are drawn by using the Painter’s Algorithm. It determines which patch to draw first by determining which vertices of each patch are closest to you, the viewer. If a few patches have overlapping vertices, then MATLAB must choose which patch to draw first. Sometimes it chooses incorrectly.