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

gganimation of fish schooling #17

Open
alexpghayes opened this issue Mar 4, 2019 · 0 comments
Open

gganimation of fish schooling #17

alexpghayes opened this issue Mar 4, 2019 · 0 comments

Comments

@alexpghayes
Copy link

alexpghayes commented Mar 4, 2019

I recall seeing an animation of schooling fish somewhere a while back a long time ago and it could be interesting to recreate with R and gganimate as a tutorial touching on gganimate and perhaps on a workflow using both matrices / arrays and tibbles.

Anyway, if you have a bunch of "fish" (points (x1, y1), (x2, y2), ..., (xn, yn)), IIRC you can simulate schooling behavior by moving each fish toward the center of the school, but adding some random noise so they don't go exactly in the direction of the center.

I'm fairly sure this is right. Part of the adventure would be that it could be totally wrong.

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