Hi all,
I have built an individual figure which look like:
Using this I would like to create a whole happy crowd - randomly placed, with random size, randomly oriented, BUT (of course!) nonoverlapping, the biggest ones in the middle of the crowd, no one is looking back. The mentioned conditions are exactly satisfied by the WordCloud
functionality. So one can create a "dummy wordcloud" and then extract {rotation, scale, {position}} parameters using:
{#1 /. Style[Rotate[_, \[Phi]_], FontSize -> Scaled[s_], __] :> Sequence[\[Phi], s], Append[#2, 0]/400} &
@@@ (List @@@ wordcloud[[1, 2]]);
This seems to work (more ore less), I end up with:
But I regard this approach as a kind of misuse of WordCloud
. So my question is: How can this be achieved in a more rigorous and elegant way? One can find the complete code attached.
(Background: In our radiotherapy planning system a very similar figure is used to symbolize patient orientation - and very present in our daily work. I am trying to create a birthday card for a colleague, which he hopefully will find funny. But I think the question is more fundamental though...)
Regards -- Henrik
Attachments: