There are lots of articles and algorithms on the subject including doing the calculations on the GPU. This is totally unrelated to whether you are using Qt or not. I have an implementation that does what you want (more or less, it is for calculating graph node distribution) in Qt with quite decent performance using a number of algorithms (both 2D using Graphics View and 3D using OpenGL).
Bookmarks