-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make CenterIdx in VoronoiTessellator
consistent/seed-dependent
#43
Comments
I've done the math; in order to have a 95% chance of never having a "region collision", you'd need at least (approx) 156 region indices (i.e. draw numbers from a uniform distribution with an upper limit of 156). This seems low enough as a default value for (For a 99% chance, you'd need 796 region indices...). In case of a 3D tessellation, you'd need 273 as |
This number is also reduced when |
What kind of magnet length to grainsize ratio did you use to get to this number? 🤔 But good to hear that an upper limit is probably physically fine. I still don't like bottom-up-filling due to the history dependency, so I would take some "random" number modulo maxRegions? Although this leaves a lot of "holes" in InterParameter |
The number 156 comes from the fact that a certain region typically has no more than 6-7 neighboring regions (2D). The upper limit of 156 of a uniform integer distribution assures that the chance of 2 neighboring regions having the same region index is less than 5%. If the grainsize is relatively big, this typical number of neighbors decreases, leading to a smaller upper limit. I don't want to use a modulo operator because this is very susceptible for correlations between different region indices, screwing with the (pseudo) randomness. |
@ilateur : Should be consistent, if ever we wanted to implement a moving frame.
How though? user defined
maxRegion
, and otherwise an educated guess?After some thought, I would suggest to simply take a region between 0 and
maxRegion
. The educated guess can be an extra python function, which the user can call themselves. For example a function to guess the total number of regions that would be generated, or a function that guesses how many regions you need in order to almost never have a "region collision" (I'm guessing this is is huge though).The text was updated successfully, but these errors were encountered: