Thursday, May 21, 2009

ffa: complex numbers, license change, migration to Github

I have done a few minor updates to my FFA library. It now handles complex numbers (to be precise, arrays of (complex simple-float) and (complex double-float)). Because of the extra complexity (haha), I also added some unit tests that use simple C functions to check that FFA does what it claims to do. I have also changed the license to LLGPL (was GPL). And finally, I have migrated the library to Github. Github is proving really user-friendly and reliable, in the long run I plan to put all my libraries there. Thanks to William Halliburton for reminding me that the previous repo was out of date.

Tuesday, May 19, 2009

announcing cl-2d

Cl-2d is a two-dimensional graph library for Common Lisp. It builds on cl-cairo2 and thus uses the Cairo library, which provides various backends, including pixel-based (eg PNG, X11) and vector-based (PDF, SVG, PS) ones. It is meant solely for 2-dimensional plotting (hence the name). Cl-2d is available from Github. The license is LLGPL. Cl-2d is designed to be extensible instead of providing a plethora of "canned" functions - the latter of course exist, but the emphasis is on flexibility. Most plots used in scientific visualization are customized, and the purpose of this library is to make customization easy. Plotting happens on frames, which are rectangular areas. A DSL is available for splitting frames. A frame combined with a mapping from plot coordinates to Cairo coordinates is a drawing area. Functions named plot-* take a frame, set up and return a drawing area (on which you can continue drawing), while draw-* functions draw on an existing drawing area. This library is still under development, suggestions and contributions are welcome. I mean to clear up the axes code and add contour plots soon. See the example/ directory for a wide variety of examples. Some of the example plots, converted from PDF, are shown below.

Friday, May 15, 2009

cl-cairo2 *context* wart fixed

I pushed an updated version of cl-cairo2 to the repository today. The most important change is the fixing of a major design wart that was the result of a bad initial design choice. Originally, cl-cairo2 functions had an optional context argument as the last argument, which defaulted to *context*. This seemed to make sense at the time, it saved typing, but later on I realized it is very unLispy. So now context is the first argument, and is never optional, *context* is gone. I realize that this might break some code for people who are using cl-cairo2, and for this I apologize. But it had to be done sooner or later, I kept putting it off but finally could not bear it any more. Since I was using macros to generate most of the function definitions, effecting the change was a matter of minutes. I also cleaned up the documentation a bit.