Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASCII "graphics" library?

Is there a platform-independent C/C++ library that can draw simple "graphics" in pure ASCII in a console program? For example (VERY roughly) I could call a function in the library like rectangle(3, 6); to get the following output:

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

Ultimately, I would love to be able to plot simple graphs based on input data tables like:

|
|*
|
|  *
|     *
|         *
|                *
|                           *
+---------------------------------

And does anyone know if there is a way to specifically render data plots/graphs in ASCII or UTF8?

like image 933
hpy Avatar asked Oct 09 '09 07:10

hpy


2 Answers

I don't know if its exactly what you're searching for, but this library will render images and viedos to the console.

http://aa-project.sourceforge.net/aalib/

like image 76
svens Avatar answered Oct 11 '22 09:10

svens


In addition to aalib there is also libcaca (this one will render in full color)

like image 35
greg Avatar answered Oct 11 '22 11:10

greg