Message Boards Message Boards

Create a 3D WordCloud ?

Posted 10 years ago

Hi, I was wondering how a 3D version of WordCloud could be made :

WordCloud[EntityValue[CountryData[],{"Name","Population"}]]
POSTED BY: nfaterpe
6 Replies
Posted 3 years ago

The software is Mathematica, the language is Wolfram Language.

POSTED BY: Rohit Namjoshi
Posted 3 years ago

Where can I find this software? Actually, I did not find any 3d word cloud application.

POSTED BY: Xiaoyu Xia

Nice 3D versions of WordCloud. Here is how @Jaebum Jung word clouds look like:

enter image description here

POSTED BY: Bernat Espigulé
Posted 9 years ago

Examples using texture,

icloud = Graphics[WordCloud[data][[1]], Background -> Black];

ParametricPlot3D[{Sin[u] Cos[v], Sin[u] Sin[v], Cos[u]}, {u, 0, 
  Pi}, {v, -Pi, Pi}, 
 PlotStyle -> Directive[Opacity[.8], Texture[Image[ic]]], 
 TextureCoordinateFunction -> ({-#5, #4} &), Mesh -> None, 
 PlotRange -> All, Boxed -> False, Axes -> False, 
 Lighting -> "Neutral", Background -> Black]

ParametricPlot3D[{Cos[t] (3 + Cos[u]), Sin[t] (3 + Cos[u]), 
  Sin[u]}, {t, 0, 2 Pi}, {u, 0, 2 Pi}, 
 PlotStyle -> Directive[Opacity[.8], Texture[Image[ic]]], 
 TextureCoordinateFunction -> ({#4, #5} &), Mesh -> None, 
 PlotRange -> All, Boxed -> False, Axes -> False, 
 Lighting -> "Neutral", Background -> Black]

p.s. image upload doesn't work so I just put codes.

POSTED BY: Jaebum Jung

enter image description here

This is an easy transformation of 2D -> 3D cloud. We add another z-dimension by distributing words randomly along z-axis. Get the data:

data = EntityValue[CountryData[], {"Name", "Population"}];

Define a function to add 3rd z-coordinate:

wordcloud3D[data_] := Module[{
   pr, wc = WordCloud[data]},

  pr = First[PlotRange /. AbsoluteOptions[wc]];

  Graphics3D[
   First[wc] /. Inset[s_, {x_, y_}] :>
     Text[s, {x, y, RandomReal[pr]}],
   Boxed -> False, SphericalRegion -> True]
  ]

wordcloud3D[data]

This will produce the image above.

POSTED BY: Vitaliy Kaurov

There isn't exactly a simple way to do this. In Mathematica, you make 3D graphics with Graphics3D.

Graphics3D doesn't have any support for Text directly, but you could make a Texture out of a text and apply it to a polygon.

I would begin by understanding Graphics3D and Texture.

POSTED BY: Sean Clarke
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