Message Boards Message Boards

3
|
6807 Views
|
2 Replies
|
6 Total Likes
View groups...
Share
Share this post:

How to place 3D objects like WordCloud?

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:
POSTED BY: Henrik Schachner
2 Replies

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

Regards -- Henrik

POSTED BY: Henrik Schachner

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

POSTED BY: Vitaliy Kaurov
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