Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

ASCII Art Generator

Four deterministic patterns, no font table required -- each shape falls out of a short formula over row/column indices. Pick a pattern and a size (1-32, sierpinski wants a power of two) and Generate adds it to the gallery below.

Patterns

  • diamond -- filled diamond, half-width size
  • pyramid -- solid triangle, size rows tall
  • sierpinski -- Sierpinski gasket in an n×n grid (row & col == 0), size a power of two
  • checker -- n×n checkerboard

Call Generate(pattern, size). View a piece at this realm's path plus its ID (e.g. .../asciiart:3).

#3 -- diamond (size 16)

by g1manfred47kzduec920z88wfr64ylksmdcedlf5 at block 26030

               *
              ***
             *****
            *******
           *********
          ***********
         *************
        ***************
       *****************
      *******************
     *********************
    ***********************
   *************************
  ***************************
 *****************************
*******************************
 *****************************
  ***************************
   *************************
    ***********************
     *********************
      *******************
       *****************
        ***************
         *************
          ***********
           *********
            *******
             *****
              ***
               *

#2 -- checker (size 16)

by g1manfred47kzduec920z88wfr64ylksmdcedlf5 at block 26026

#.#.#.#.#.#.#.#.
.#.#.#.#.#.#.#.#
#.#.#.#.#.#.#.#.
.#.#.#.#.#.#.#.#
#.#.#.#.#.#.#.#.
.#.#.#.#.#.#.#.#
#.#.#.#.#.#.#.#.
.#.#.#.#.#.#.#.#
#.#.#.#.#.#.#.#.
.#.#.#.#.#.#.#.#
#.#.#.#.#.#.#.#.
.#.#.#.#.#.#.#.#
#.#.#.#.#.#.#.#.
.#.#.#.#.#.#.#.#
#.#.#.#.#.#.#.#.
.#.#.#.#.#.#.#.#

#1 -- sierpinski (size 16)

by g1manfred47kzduec920z88wfr64ylksmdcedlf5 at block 26021

################
# # # # # # # # 
##  ##  ##  ##  
#   #   #   #   
####    ####    
# #     # #     
##      ##      
#       #       
########        
# # # #         
##  ##          
#   #           
####            
# #             
##              
#