Jonathan. Frech’s WebBlog

Nine marching rectangles (#259)

Jonathan Frech

Rasterizing the continuous most often proves to be a delicate enterprise. Going from the un­fath­om­able depths of the reals to a mere finite amount of toggled bits already zaps both com­plete­ness as well as dense ordering. Adding to that, the miniscule amount of pixels con­tem­po­rary displays have to offer makes sharp jumps a frequent occurrence, breaking the illusion of continuity entirely.

With a queasy feeling about the meaning of continuous perception lurking in the back of my mind, at a recent Bill Frisell concert I was inspired to try myself at more organically conducive discrete productions. Layered in between a mighty bass and a whisked drum, both innately transferring their pristinely real movement for me to hear, Mr. Frisell — illuminated by slowly wafting curvy patches — tuned some knobs of dig­i­tal effects and managed not to break the fake.
A fan of monospaced 2:1 text, I decided to try and imitate the patches’ feel in a more blatently discrete manner. As such, I wrote a marching-squares-based character-targeting renderer for graph slabs $\pi^{3\to2}_{\bullet\bullet\circ}(\left]-\varepsilon,\varepsilon\right[\ \cap\ \mathrm{graph}\,f)$ which uses only the symbols \._+| @^/.

       ..                .\_.                                                   
     ..                   .^\.                                                  
    ./.                     ||                                                  
    ||                      .\.                                                 
    ||                       ||                                                 
    ..                      .+|                                                 
     ..                     |@|                                                 
     .\_.                  .++.                                                 
      .^\.                .+@|                                                  
        ..._.           ._+@+.                                                  
          .^\___________+@@+.                                                   
            .^^^+@@@@@@@@@+.            .______________.                        
                .^^^^^^^^^.       ._____/^^^^^^^^^^^^^^. ._.                    
                            ._____+@@+^^.                .^...                  
                       .____+@@@@@+^^.                      ....                
                   .___+@@@@@@@@+^.                           .\.               
                .__+@@@@@@@@@+^^.                              .\.              
             .__+@@+^^^^^^^^^.                                  .\.             
          .__/^^^^^.                                             ||             
        ._/^^.                                                   ||             
      ._/^.                                                      ||             
     ./^.                                                       ./.             
   ._/.                                                        ./.              
   |+.                                                        ./.               
  ./.                                                       ....                
  ||                                                     ._...                  
  ||                                  .________________. .^.                    
  ||                               .__++^^^^^^^^^^^^^^^.                        
  ||                             ._++^^.                                        
  .\.                           .++^.                                           
   .\.                        ._/^.                                             
    .\_.                    ._/^.                                               
     .^...               ._..^.                                                 
        .. .__.     .__. .^.                                                    
           .^^.     .^^.                                                        
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                

Source: nine-marching-rectangles.cpp