Please note: While the bounty is no longer available, I\'m still keen for anyone with an answer to this question to contribute; I\'m still watching it, and I\'m
I don't know of any software that can generate such diagrams. However, If I had to tackle your problem I would probably explore the possibility of using Scalable Vector Graphics (SVG). I think you can translate your DSL for RCC into SVG XML, and then you can render it (maybe in a Web browser). You can easily find examples on the Web by searching for "svg venn diagram". A nice one is here: here's a diagram that I generate from that website
and here's the corresponding SVG code (also from the website):
There's also an Apache toolkit for SVG called Batik, which should support display, generation or manipulation of SVGs.
Another option is to use TikZ & PGF with LaTeX: there you have powerful macros that let you programmatically place shapes, and the rendering is done by LaTeX. Here's an example:
\documentclass[a4paper,10pt]{article}
\usepackage{tikz}
\usetikzlibrary{shapes,calc}
\begin{document}
\pagestyle{empty}
\begin{tikzpicture}
\node (TPP) {X TPP Y};
\node
[ circle,
draw,
minimum width=2cm,
label={[label distance=-0.7cm]145:X},
] (X) [right of=TPP,xshift=1cm] {};
\node
[ circle,
draw,
minimum width=1cm,
anchor=south east,
] (Y) at (X.south east) {Y};
\end{tikzpicture}
\end{document}
which produces the following (i.e. the RCC8 TPP relation):
You can see from the LaTeX code that you can draw the Y circle at south west of X (X.south west
) saying that Y's anchor is also at south west (anchor=south west
). You can find a more complex example here, and some additional discussion here.
Although this is not yet a layout algorithm that draws RCC8 relation for you, I think you can define LaTeX macro that translate RCC8 relations into PGF/TikZ macros. The drawback is that you must then compile the LaTeX code.
I hope this helps and good luck!