cannot distribute in 0-1 range? (contrary to fast implementation)
See original GitHub issueHi, thanks for this really nice lib!
I just tested both this implementation and the fast-2d-poisson-disk-sampling implementation.
With the fast implementation, I can generate normalized positions values in the 0-1 range, but cannot with this implementation: using fill()
only returns 1 point, trying to use next()
returns null
code used:
var pds = new PoissonDiskSampling({
shape: [1, 1],
minDistance: 0.05,
tries: 10,
});
I want to use a distanceFunction, so my workaround will be to use shape: [10, 10]
and divide everything back, but it’s not elegant and might lead to errors.
Do you see a reason why it fails?
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Fastest implementation of sine, cosine and square root in C++ ...
Here's the guaranteed fastest possible sine function in C++: ... in the approximation is equally distributed across the range of outputs.
Read more >ranger: A Fast Implementation of Random Forests
Ranger is a fast implementation of random forests (Breiman 2001) or recursive partitioning, par- ticularly suited for high dimensional data.
Read more >Network Traffic Distribution – Elastic Load Balancing FAQs
Elastic Load Balancing automatically distributes incoming application traffic across multiple targets in one or more Availability Zones (AZs).
Read more >Designing the Distribution Network in a Supply Chain
Based on the choices for the two decisions, there are six distinct distribution network designs that are classified as follows: 1. Manufacturer storage...
Read more >Web Content Accessibility Guidelines (WCAG) 2.1 - W3C
The publication of WCAG 2.1 does not deprecate or supersede WCAG 2.0. ... 1.4.1 Use of Color; 1.4.2 Audio Control; 1.4.3 Contrast (Minimum) ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi! Thanks a lot for the super quick reply 😃🙏👍🚀
I’m using the min.js from the CDN URL on the readme (wanted to test it quick! 😅😄)
The CDN issue is now resolved.
The updated URL is
https://cdn.jsdelivr.net/gh/kchapelier/poisson-disk-sampling@2.2.3/build/poisson-disk-sampling.min.js