State of Diagrams (April 2012)

28 views
Skip to first unread message

Brent Yorgey

unread,
Apr 16, 2012, 8:50:00 PM4/16/12
to diagrams...@googlegroups.com
Well, so much for my idea to write one of these every month! But one
every few months is probably still useful. =) Here's what's going on
in the diagrams world (that I know of; feel free to add!).

0.5 release
-----------

We (finally) got version 0.5 released, which includes a bunch of cool
new features (basic animation; much better text support; improved
performance; lots of new combinators and support functions;
diagrams-contrib package), much improved documentation, and a
redesigned website to boot.

SVG backend
-----------

Deepak Jois has been working on a Haskell-native (i.e. no FFI) SVG
backend, and has released an early version to Hackage. It's still
missing some features but the plan is to have it ready to replace
diagrams-cairo as the 'out-of-the-box' backend (i.e. what you get when
you 'cabal install diagrams') for the 0.6 release of diagrams.

Exposing tree structure to backends
-----------------------------------

Related to this is the need to expose more of the tree structure of
diagrams' internal representation to backends. Currently, backends
are simply given a sequence of primitives, with a bunch of accumulated
attributes along with each primitive. However, this can be
inefficient, and precludes future extensions (such as being able to
specify node IDs when creating interactive SVGs). Unfortunately, this
is much trickier than it sounds because of the need to deal properly
with the effect of transformations on attributes. See

http://www.haskell.org/haskellwiki/Diagrams/Dev/Freezing

for some notes on the relevant issues.

TikZ backend
------------

Chris Mears (TSC in #diagrams) has revived the TikZ backend and
updated it to work with the 0.5 release of diagrams. Check out the
repo here:

http://www.cmears.id.au/repos/diagrams-tikz

Where to next?
--------------

Some of the big things I want to tackle next include:

+ Caching for Envelopes -- this should speed up certain diagrams
doing lots of "beside" operations (especially nested ones)
considerably.

+ A complement to Envelopes which I've been calling "traces" --
essentially embedding a raytracer at every point; useful for
finding points which are actually on the boundary of a diagram.

+ Better compilation/backends for animation. This may involve
generalizing the Active representation.

+ Finding a nice way to specify and compile *interactive* diagrams.

+ 3D diagrams! The very beginnings of a 3D standard library and
POV-Ray backend are already in place, and just need a lot more
work. An OpenGL backend would also make sense, of course.

If you have any ideas on any of these topics (or are interested in
hacking on them), send a message to the mailing list!

-Brent

Brent Yorgey

unread,
Apr 21, 2012, 5:43:15 PM4/21/12
to diagrams...@googlegroups.com
A couple things I forgot to put in the "where to next" section:

+ Arrows, with arrowheads! You can of course make arrowheads "from
scratch" but there is a lot that the framework could do for you:
drawing certain standard types of arrowheads at the right angle;
drawing a (possibly curved) arrow between two named points;
shortening the length of the path a bit if you want; etc.

+ Connected to the above is that I want to implement Metafont's
spline-generation algorithm, which will give a nice API for
creating curvilinear paths with various kinds of constraints.

-Brent

Reply all
Reply to author
Forward
0 new messages