-
Notifications
You must be signed in to change notification settings - Fork 429
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
Added Fibonacci spiral and test for it #3013
Conversation
Hello @Atharva-Shah-2298, Thank you for updating ! Cheers ! There are no PEP8 issues in this Pull Request. 🍻 Comment last updated at 2023-12-29 03:46:05 UTC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this! See below an initial review of your PR. Thank you for your future update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, Can you squash your pep8 commit ? thank you
3a56564
to
d32ca92
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #3013 +/- ##
==========================================
+ Coverage 81.72% 82.09% +0.37%
==========================================
Files 147 146 -1
Lines 20569 20465 -104
Branches 3279 3260 -19
==========================================
- Hits 16809 16800 -9
+ Misses 2932 2855 -77
+ Partials 828 810 -18
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, looks good and much better! thank you for the update.
See below my last comment but it seems ready to be merged.
Updated for PEP-8 Updated for PEP8
01995ec
to
eccf30b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. here the results:
with the following code:
In [1]: from dipy.core.sphere import fibonacci_sphere,Sphere
In [2]: points = fibonacci_sphere(n_points=1000, randomize=True)
In [3]: points = fibonacci_sphere(n_points=323, randomize=True)
In [4]: sph = Sphere(xyz = points)
In [5]: from dipy.viz import window, actor
In [6]: scene = window.Scene()
...: scene.SetBackground(1, 1, 1)
In [7]: scene.add(actor.point(sph.vertices, window.colors.red, point_radius=0.05))
In [8]: window.show(scene)
I will go ahead and merge this PR.
Thank you for this work @Atharva-Shah-2298
Fibonacci Sphere Method for Sphere Vertices
The
fibonacci_sphere
method is designed for efficiently generating points on the surface of a sphere, such as in the iterations of disperse charges. The time complexity is reduced because of the analytical solution as opposed to an optimization problem solution in disperse chargesMethod Signature:
Example Usage