Minimal, independent library for basic scientific diagram generation. Portable, does not depend on OS or any third-party libraries.
Library provided two levels of abstraction:
- pixel canvas
- drawing primitives: lines, rectangles, circles, ellipses, b-splines, triangles, flood filling
Output: currently only PPM files (batch generation).
- Voronoi
Pixel map depicting Voronoi diagram.
See apps/voronoi.cpp
Sample output:
- Mandelbrot
Pixel map image for selected window.
Sample output:
- 3D Chart
Very basic 3D chart using colorful lines.
See apps/chart3d.cpp
Sample output:
- Primitives
Demonstration of included primitive shape support.
Sample output:
-
Create new build folder
mkdir _build cd _build
-
Prepare makefile
cmake ..
-
make sample applications
make
-
to run just built example - voronoi - just enter:
./voronoi
Currently there is no single include file which can be used to use the library. So you need to include individual header files in order to use specific features.
Source directories:
- base: data structures
- utils: internal utility functions for various purposes
- pixels: pixel-level API
- images: API for images
- PixelImage: image abstraction
- RgbImage: in-memory image container
- PPM image writer & loader
- painters: API for drawing graphic primitives (lines, circles, etc.)
For more advanced plots/charts see: