Message Boards Message Boards

GROUPS:

How to place 3D objects like WordCloud?

Posted 6 years ago
4346 Views
|
2 Replies
|
6 Total Likes
|

Hi all,

I have built an individual figure which look like:

enter image description here

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: enter image description here

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:
2 Replies

Nice hijacking of the WordCloud! But isn't it a packing problem? @Frank Kampas recently had a few posts:

Ellipse Packing Via Hierarchical Optimization

Packing Ellipses Into a Circle - Preprint of WriteUp

Seems sensible to place figures in the ellipses?

enter image description here

Dear Vitaliy, yes, of course this is a packing problem! I have been missing that interpretation completely. Thank you very much!

Regards -- Henrik

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract