VB.NET でワード クラウドを作成していますが、パフォーマンスに問題があります。四分木を試しましたが、実装が遅いです。
私はこのチュートリアルに従いました: http://gamedevelopment.tutsplus.com/tutorials/quick-tip-use-quadtrees-to-detect-likely-collisions-in-2d-space--gamedev-374
しかし、私の主な問題は、「キャンバス」に単語を配置するときにチェックを頻繁に行うことです。これは、半径ステップの例が 0.01 で中心への最適なタイト パッキングがあるためです。角度ステップ 0.5 にも同じことが当てはまります。
1 take word
2 place it to center of canvas
3 while it collides with other(I am testing all other objects)
move it by little bit on the spiral
4 set radius to 0, so I start at center again, angle is not changed
5 step 1
私の質問は、チェックの頻度を減らしたり、その他のパフォーマンスを調整したりするために何をお勧めしますか? 前もって感謝します
結果がどのように見えるかのスクリーンショットを次に示します。