3 ms·
The layout algorithm for the word cloud is awesome! How is it made?
by TuringTest 10y ago
The layout algorithm for the word cloud is awesome! How is it made?
- jamessb 10y agoThis is explained in the README of the project's Github repository: https://github.com/anvaka/common-words#how-are-word-clouds-rendered https://github.com/anvaka/common-words#how-are-word-clouds-r...
- delfaras 10y agoThere's a description of the method in the Readme https://github.com/anvaka/common-words#how-are-word-clouds-rendered https://github.com/anvaka/common-words#how-are-word-clouds-r...
- sambeau 10y agoUnfortunately it's not using size as a metric like mouse word clouds. This confused me at first. Look at the size of 'err' in the go layout.
- gjm11 10y agoIt looks to me as if it is. There just are a lot of uses of "err" in typical Go code.
- deleted 10y ago[deleted]
- BoorishBears 10y agoIt's humorous that in Go err/nil happens so often that it's "unbelievable" in a literal sense
- anvaka 10y agoIt uses it as long as there is enough space. Once it fails to find a rectangle to fit a new word, it tries to reduce the size of the word. In general, word clouds are bad for comparing sizes. For that reason I used plain list in the sidebar on the left (or at the bottom if you are on mobile)