Progressive poisson disk?
category: offtopic [glöplog]
Any idea on how to create a random point distribution in a disk where with the increasing random number of points they keep a poisson like distribution (~equally spread)?
disk or disc?
disc. sorry, I was thinking about dicks.
basically you want a normal poisson distribution but simply limited, by a circle, right?
should this be realtime or for pre-processing?
pre.
Do you need an exact number of points? or you would be ok with a given density ?
Just to give some ideas.
Generate a 50/50 density random distribution of point in a square.
This step is actually trivial.
Then scale the coord to your desired density and reject points outside the disc.
The scale factor is your density, if you started with 32K samples:
1x will represent 25735 samples on the disc 2x 6433, 4x 1608, ...
So just scale to control your density to any levels.
Generate a 50/50 density random distribution of point in a square.
This step is actually trivial.
Then scale the coord to your desired density and reject points outside the disc.
The scale factor is your density, if you started with 32K samples:
1x will represent 25735 samples on the disc 2x 6433, 4x 1608, ...
So just scale to control your density to any levels.
but poisson disk has a better uniform distribution than 'pure' randomness..
this is some new stuff coming out: http://graphics.uni-konstanz.de/publikationen/2011/farthestpoints/Schloemer.etal-2011-FPOPSwMMD.pdf
this is some older, but rather simple stuff: http://www.cc.gatech.edu/~yuting/OtherProjects_files/report.pdf
in general i would recommend to simply use low discrepancy points which are transformed to the disc (polar mapping or concentric mapping)..
another option is to use dart throwing onto the unit square and keeping only these that hit the disc, then some passes of lloyd relaxation afterwards..
this is some new stuff coming out: http://graphics.uni-konstanz.de/publikationen/2011/farthestpoints/Schloemer.etal-2011-FPOPSwMMD.pdf
this is some older, but rather simple stuff: http://www.cc.gatech.edu/~yuting/OtherProjects_files/report.pdf
in general i would recommend to simply use low discrepancy points which are transformed to the disc (polar mapping or concentric mapping)..
another option is to use dart throwing onto the unit square and keeping only these that hit the disc, then some passes of lloyd relaxation afterwards..
uhm, and answering the progressiveness question: thats what my comment on low discrepancy points/sequences are about.. a simple one would be a rank-1 lattice or using halton or sobol'..
xernobyl: To add a point to a set, generate n candidate points inside a circle. Then select the one which is the furthest away from all points currently in the set.
Quote:
furthest away from all points
should that be the max distance, distance sum, average, median?
What toxie said. Do it.
I think I'm getting an idea on how to do it. Thanks for the suggestions.
I'm not convinced any method more complicated than what I proposed will give you better results...
I will write an implementation later on for reference.
I will write an implementation later on for reference.
i always use the Sobol sequence for raytracing/sampling 2d spaces
xernobyl: The minimum of all distances. Sorry for not being clear.
xernobyl: Considered just modelling a bunch of particles that repel one another, constrained to a disk of whatever size and shape you need? Like this except you won't need to model velocity or anything, just soft distance constraints.
♥: But he was asking for a progressive set, no? So you'd always want to add the point that gives the most possion-like distribution, without having to re-calculate the previous points...
kusma: I guess it depends what he needs it for. I can imagine cases where you'd prefer to recalculate the whole set if it meant better distribution, or cases where you'd want to select points from a precalculated set so that you'll reach an ideal distribution in the end. Hard to tell what he's actually working on, though.
♥: No, it's actually very easy to tell; he used the word "progressive".
Why don't you use a rectangular Poisson and then you discard points outside the circle? Why do you need Poisson? Any real reason for it?
kusma: can't that be done by fixing every n new values? Like adding a few points, repel them, add a few more points, repel only the new ones fixing the old ones where they are. repeat.
I'm not sure how good that looks without implementing it.
I'm not sure how good that looks without implementing it.
We're using poisson disc distribution for our incremental super-sampling at work, and the technique I described works fine for this purpose.
I don't see why you want to add points to the solution, just to repel them later. Why not just generate a set of random candidates, and pick the best one?
I don't see why you want to add points to the solution, just to repel them later. Why not just generate a set of random candidates, and pick the best one?
Well, you could repel just the best of the random candidates, so it slips into the nearest equilibrium position at least.