1:
2: For do:
3:   
4:   
5:   Sort by two dimensions
6:   
7:   Reshape
8:  
9:   Save to files
10: endFor
Algorithm 2: Visualization.