About Store Forum Documentation Contact



Post Reply 
Poisson Disk Sampling - thoughts about incorporating it
Author Message
aceio76 Offline
Source Licensee

Post: #1
Poisson Disk Sampling - thoughts about incorporating it
You can find the link to one of the available sources here:

https://github.com/corporateshark/poisso...-generator
(This post was last modified: 06-12-2017 05:29 PM by aceio76.)
06-12-2017 05:26 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Poisson Disk Sampling - thoughts about incorporating it
Hi,

You can generate random points inside a circle using:
Vec2 Randomizer::operator()(C Circle &circle, Bool inside)

Is this not what you're after?
06-13-2017 12:47 AM
Find all posts by this user Quote this message in a reply
aceio76 Offline
Source Licensee

Post: #3
RE: Poisson Disk Sampling - thoughts about incorporating it
Similar, but not quite. This algorithm is simple that I figured I'd ask if it makes sense to incorporate into the engine as it's very reusable.

As an excerpt:
Poisson disk sampling has many applications in games:

-random object placement;
-sampling for graphics applications;
-procedural texture algorithms; and
-mesh algorithms.


The image below shows 3 different algorithms on how you may randomly fill a box with dots. The 3rd one shows the Poisson Disk Sampling's result.


Attached File(s) Image(s)
   
(This post was last modified: 06-13-2017 03:07 AM by aceio76.)
06-13-2017 03:01 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: Poisson Disk Sampling - thoughts about incorporating it
Hi,

Thank you for the links and information.
More likely I'd rather implement my own solution that's more flexible, however right now I'm busy with other features.
06-15-2017 03:14 AM
Find all posts by this user Quote this message in a reply
aceio76 Offline
Source Licensee

Post: #5
RE: Poisson Disk Sampling - thoughts about incorporating it
Yup, no worries, just wanted to share especially since I've used this often for a few years.
(This post was last modified: 06-15-2017 05:04 AM by aceio76.)
06-15-2017 05:04 AM
Visit this user's website Find all posts by this user Quote this message in a reply
aceio76 Offline
Source Licensee

Post: #6
RE: Poisson Disk Sampling - thoughts about incorporating it
In case you just mean writing your own algorithm but still using the formula, here's the write-up on the formula. This formula isn't just used for games, but for many, many things, including finance, scientific experiments, electronics, etc: http://people.cs.ubc.ca/~rbridson/docs/b...ondisk.pdf

I think creating an alternative mathematical formula would be far harder smile
06-15-2017 03:38 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply