You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: