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

Fibonacci lattice as additional sampling method #979

Open
mcontim opened this issue Aug 5, 2024 · 9 comments
Open

Fibonacci lattice as additional sampling method #979

mcontim opened this issue Aug 5, 2024 · 9 comments
Labels
feature help wanted Extra attention is needed

Comments

@mcontim
Copy link

mcontim commented Aug 5, 2024

Hi,

I was looking at the available sampling algorithms in the package and I was wondering if it would be of interest adding an area preserving method for evenly distributing points on a sphere. I'm currently using the Fibonacci lattice for this task.

Let me know if you think this could be an interesting addition, so I can propose an implementation :)

@juliohm
Copy link
Member

juliohm commented Aug 5, 2024 via email

@juliohm juliohm added the question Further information is requested label Aug 5, 2024
@mcontim
Copy link
Author

mcontim commented Aug 5, 2024

Hi @juliohm!

Yes exactly, you're for sure more familiar than me with this method but here a quick reference: https://observablehq.com/@meetamit/fibonacci-lattices

That would be nice in order to have a "tesselation method" for the sphere, avoiding more complicated implementations like the icosahedral Goldberg polyhedra.

I work in SatCom and for example I use the Fibonacci lattice on a sphere to obtain a "grid" of points regularly distributed (preserving density per area) on Earth to collect statistics (of course here there is an approximation when you translate to lat-lon on the ellipsoid).

@juliohm
Copy link
Member

juliohm commented Aug 5, 2024

That is great @mcontim. Appreciate if you can submit a PR for review. We need to figure out if this is a new case of the HomogeneousSampling or if it requires a new sampling method.

I understand that this algorithm you are interested in is deterministic, even though we can create some randomness as explained here: https://www.johndcook.com/blog/2023/08/12/fibonacci-lattice/

Let's brainstorm the best place in the PR.

@juliohm juliohm added help wanted Extra attention is needed feature and removed question Further information is requested labels Aug 5, 2024
@mcontim
Copy link
Author

mcontim commented Aug 5, 2024

Thank you @juliohm for the quick reaction!
I iwll submit a PR, then we can discuss on how to proceed :)

@juliohm juliohm changed the title Fibonacci lattice as additional sapling method Fibonacci lattice as additional sampling method Aug 6, 2024
@juliohm
Copy link
Member

juliohm commented Aug 6, 2024

@mcontim I think this method deserves a new FibonacciSampling struct. It works on various geometries as shown in the link you shared. It could be deterministic instead of random.

Did you have a chance to take a look into it?

@mcontim
Copy link
Author

mcontim commented Aug 9, 2024

@juliohm I'm planning to work on the PR in the next couple of days (it was a busy week of coding this one :D ).

I agree on the new FibonacciSampling struct, however, I think the sampling will be a method limited to the only Sphere and Ball.

@juliohm
Copy link
Member

juliohm commented Aug 9, 2024

I think the sampling will be a method limited to the only Sphere and Ball.

Thank you @mcontim, you mean that you only have time to contribute the Sphere case, right? That is nice already. Let me know if you need assistance with the codebase. Try to follow the code style as much as possible from the other sampling methods.

@davibarreira
Copy link

Hey, @juliohm . I've implemented this for Disk and Sphere. Does the PR usually comes together with an updated docs, or are docs PR done separately?

@juliohm
Copy link
Member

juliohm commented Sep 27, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants