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

consider golden spiral in RegionSearchClusterData #6

Open
cchris28 opened this issue Jul 19, 2023 · 0 comments
Open

consider golden spiral in RegionSearchClusterData #6

cchris28 opened this issue Jul 19, 2023 · 0 comments

Comments

@cchris28
Copy link
Collaborator

Consider the golden spiral method to generate a list of evenly distributed points on a unit disk. Then select a random subset to use as cluster offsets in RegionSearchClusterData instead of the random angular offsets currently used. This has the advantage of closer to even distribution around the cluster pointing at any part of the sphere for small angular radius. For larger angular radius the distribution is denser near the cluster. Probably this could be fixed. But the link below gives easily adapted python.

https://stackoverflow.com/questions/9600801/evenly-distributing-n-points-on-a-sphere/44164075#44164075

The spiral generation code example:

from numpy import pi, cos, sin, sqrt, arange
import matplotlib.pyplot as pp

num_pts = 100
indices = arange(0, num_pts, dtype=float) + 0.5

r = sqrt(indices/num_pts)
theta = pi * (1 + 5**0.5) * indices

pp.scatter(rcos(theta), rsin(theta))
pp.show()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant