2 ms·
You're welcome and thanks for all the ideas!!! Moving the points to the center of each voronoi-cell sounds like a really fun (and easy) addition to the project
by EllipticCurve 11y ago
You're welcome and thanks for all the ideas!!!
Moving the points to the center of each voronoi-cell sounds like a really fun (and easy) addition to the project, I will get on that the next couple of days!
I came across rejection-sampling before, might have a closer look at it!
I worked quite a lot on OpenGL-stuff with and without shaders. So that actually combines some more interests of mine quite well, thank you :)
- dahart 11y agoIn that case, you might have a bunch of fun combining your interests implementing this paper: http://www.dgp.toronto.edu/papers/ahausner_SIGGRAPH2001.pdf http://www.dgp.toronto.edu/papers/ahausner_SIGGRAPH2001.pdf For rejection sampling, btw, there is an infinite variety of ways to do it. Rejection can be used to generate a Poisson distribution, by enforcing a minimum radius from other points, which has a somewhat similar result to a converged Lloyds algorithm. But you can also sample randomly from the 2d brightness function that is an image. You can also combine those two things to get well spaced points whose density is proportional to brightness, by enforcing a minimum radius that is proportional to brightness. (Or inverse brightness!) And best of all, it's ridiculously easy to implement. For an extra good time, you can learn how to importance sample that distribution directly, an alternative to rejection sampling that doesn't waste any points. Glad to hear you're digging it, I love this kind of stuff! Send me a link if/when you get some results with Lloyd's.