XRVG: Vector graphics library for Ruby
I’m looking forward to trying this out. From its philosophy section:
Nearly every programming toolkit that you may find, in any programming language, instanciates shapes with absolute geometrical coordinates. What that means is that if you want to do graphics programming with them, you rapidly get lost in a list of basic drawing primitives with lots of numbers, without being able to recover the abstract compositional content of the graphic.
Actually, a graphic is foremost a composition of basic shapes and color. It is not their absolute values (that is absolute spatial and color coordinates) but their relations that matters. This is even more true because our visual perceptive chain processes its inputs in a relative way, as paradoxical visual games highlight it.
As a consequence, XRVG strives to get rid of these absolutes, by using shapes and functions as numerical patterns to compute shapes and composition. Thus, if you want to draw five circles in a regular way, you must be able to do it without using trigonometric formulae to figure out where these circles have to be drawn. Instead, you just need to use a first circle and “sample” it five times to have subcircle centers.