Skip to content
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

Variable Density Poisson Disk Sampling #15

Open
TerraCouto opened this issue Feb 27, 2020 · 0 comments
Open

Variable Density Poisson Disk Sampling #15

TerraCouto opened this issue Feb 27, 2020 · 0 comments
Labels
good first issue Good for newcomers

Comments

@TerraCouto
Copy link
Contributor

TerraCouto commented Feb 27, 2020

API should be

IEnumerable<float2> vdpoisson(Func<float2,float> densityFunction)

The density function ranges from 0 to 1, with 0 indicating no points should be generated, and 1 indicating maximum density. Returned results should be in the range of 0-1. Additional parameters may be added at your discretion, such as minimum and maximum distance between samples and total sample count.

You can test your code using the Galaxy Editor interface, located in Assets/Scripts/Editor/GalaxyEditor.cs, and accessible by inspecting the test galaxy in the Unity Editor at Assets/Resources/Test Galaxy. The current star generation implementation samples a Hilbert curve, sampling the density map into an accumulator to decide when to place a star. This guarantees that the spatial distribution of points follows the density map as evaluated at GalaxyEditor.cs:173, but does not guarantee a minimum spacing between points, which is the purpose of the Poisson Disk Sampling algorithm.

@TerraCouto TerraCouto self-assigned this Feb 27, 2020
@TerraCouto TerraCouto added this to To do in Pre-Alpha Sprint 1 via automation Feb 27, 2020
@TerraCouto TerraCouto moved this from To do to In progress in Pre-Alpha Sprint 1 Feb 28, 2020
@rwvens rwvens added the good first issue Good for newcomers label Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
No open projects
Pre-Alpha Sprint 1
  
In progress
Development

No branches or pull requests

2 participants