projectmesa / mesa

Mesa is an open-source Python library for agent-based modeling, ideal for simulating complex systems and exploring emergent behaviors.
https://mesa.readthedocs.io
Other
2.3k stars 846 forks source link

Rotate Shape based on Heading #1150

Open aiwhoo opened 2 years ago

aiwhoo commented 2 years ago

What's the problem this feature will solve? Relay visual feedback of heading for debugging and verification.

Describe the solution you'd like It'd be nice to be able to load in an image of the agent and rotate it based on the heading. For example, in the continous space, if a boid flocker is moving at a 45 degree angle, instead of the red dot, an image of a bird could be loaded which is facing at the 45 degree angle.

Additional context This is primarily working with the boid flocker example in the mesa/examples directory.

EwoutH commented 2 years ago

Yes, I strongly agree this should be implemented. Thanks for reporting!

On my personal list is first finishing the big project of implementing different agent types in Mesa (called breeds in NetLogo) (#1142), but after that I will try to take a look into this.

If anyone else is up to speed with this part of the code and wants to implement this, please do so, since I'm not.

aiwhoo commented 2 years ago

@EwoutH there was an individual that just recently shared a video Showcasing his model which happened to have this. Mesa admin should view his code and consider integration. His video demonstrates core agent based modeling functionality that should be within mesa.

https://youtu.be/pOF1H84xPik

He stated he’ll upload to GitHub by end of week.

EwoutH commented 2 years ago

That looks awesome! I would love to see the source code, it might even be useful for the Example library: https://github.com/projectmesa/mesa/tree/main/examples

aiwhoo commented 2 years ago

@EwoutH reach out to him to show Interest! That will encourage him to share the code.

The main issue with the mesa/examples is that it lacks examples. The flocker example is the only one using the continuous space, but it doesn’t encompass the other mesa coding styles/features. Anything added to the examples would be a win in my book!

aiwhoo commented 2 years ago

@EwoutH The author posted his github link: https://github.com/ValerioB88/EvoAgent/tree/master!!!!