Skip to content

Adrian-rospx/ascii-shape

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASCII shape rasterizer

Written in C++.

Done using a DDA line drawing algorithm along with the scanline polygon fill algorithm in order to draw any polygon, both convex and concave with quite a nice accuracy.

I've added all 8 basic terminal colors.

Polygons can be defined with the x and y values of each vertex.

Current example:

                                       -
       $$$$$$$$$$$$$$$$$$$
       $..................$
       $..................$
       $....$$$$$$$$$$.....$
       $....$         $.....$
      $.....$         $.....$
      $.....$ $$$$$$$$$$.....$
      $.....$ $...............$
      $.....$ $................$
      $.....$ $$$$$$$$$$$......$
      $....$             $......$
      $....$              $......$
      $....$               $.....$
     $.....$               $......$
     $.....$                $......$
     $.....$                 $.....$
     $$$$$$$                  $$$$$$$

-