PrettyPicture for Textbook Authors
PP-script
PrettyPicture lets the author generate diagrams and/or pictures for textbooks. Pictures are described using a primitive command-language which relies on OpenGL function calls, then annotated with LaTeX source and finally written to a windows bitmap format file in 24bpp.
I've written this tool because, in all the billions of pages on the internet, I've not found a single tool that does the job of producing decent accurate diagrams for math and science textbooks complete with annotations in the proper math fonts .
For example, the GUI point-n-click tools make it very difficult to accurately draw a plane against a 3D axis (x, y and z), rotate the plane exactly 24 degrees around a vector of (0.2, 0.3, -0.1) and annotate the plane with accurate math fonts (for example the parametric form of a plane). In addition, I intend to make sure that this software is portable and usable on all *nix operating systems as well as hosted with msys under windows.
Because this will be an ongoing project for a little while yet, I intend to host a full project for this at sourceforge. Please check back here regularly for the new home for this project. In the meantime, you can download it sans decent documentation and use it as you see fit, under the GPLv2.
A small example of how pp-script works is below:
(load 'interface.lisp)
(init-pp "./pp --size=600x600")
(bi_reset)
(rectangle :center (make-instance 'point_t :x 0 :y 0)
:width 0.5
:height 0.2)
(line (make-instance 'point_t
:x -0.4
:y -0.5)
(make-instance 'point_t
:x 0.33
:y 0.11111))
(glColor4f 1.0 0.5 0.5 1.0)
(glRotatef 33.0 0.1 -0.3 0.4)
(3d-vector (make-instance 'point_t
:x 0.3 :y 0.4 :z 0.5)
(make-instance 'point_t
:x -0.5 :y -0.3 :z -0.4))
(3d-axis 0.2)
(glRotatef 45.0 0.2 0.3 0.4)
(glColor4f 0.5 0.5 0.9 1.0)
(bi_arc 45 180 0.3)
(glTranslatef -0.2 -0.2 -0.2)
(bi_text "\\Huge{$f(x) = 4a + c$}")
(bi_snapshot "test.bmp")
(close-pp)
The output of the above pp-script is this: