I've been experimenting a bit with a rotate command (just for fun and for getting to know the internals of Lilypond better). The result of the experiment is in the attached patch. Seems to work well enough, but the implementation could probably be better :-)