Hi guys,
I am trying to make an animation of a school of fish in matlab and I have the code working for that but in the animation I can't seem to get the fish to sense other fish over the edges like on a torus.
Each fish has a Circular zone in which any fish inside is interacted with but they cannot sense over the edge for I have got the fish traversing the edgesusing a mod function. I am aware a mod function would be useful in this but I am not quite sure how to implement it. I would be very thankful for a prompt response because I have a deadline coming up.
Thanks in advance
I am trying to make an animation of a school of fish in matlab and I have the code working for that but in the animation I can't seem to get the fish to sense other fish over the edges like on a torus.
Each fish has a Circular zone in which any fish inside is interacted with but they cannot sense over the edge for I have got the fish traversing the edgesusing a mod function. I am aware a mod function would be useful in this but I am not quite sure how to implement it. I would be very thankful for a prompt response because I have a deadline coming up.
Thanks in advance