villares,
@villares@ciberlandia.pt avatar

Almost there, I'm very happy! I have removed the matplotlib dependency from the wonderful @rougier's flocking example code, and added very little for drawing.

https://github.com/villares/sketch-a-day/blob/4a7a0d6d65b35556f7726678a73740e34fab2308/2023/sketch_2023_11_22/sketch_2023_11_22.py

I'm just struggling with "normalizing" the velocity for drawing my triangular boids the same size...
I didn't want to use atan2 to get the heading direction. I thought normalizing velocity would be simpler, but I must be making some silly conceptual mistake. The varying sizes are nice, but I want to understand what I'm doing wrong.

trianglular white "boids" flocking on a black background (the simulation is inspired on murmurations of birds)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • python
  • everett
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • ngwrru68w68
  • Youngstown
  • slotface
  • rosin
  • love
  • kavyap
  • tacticalgear
  • Durango
  • osvaldo12
  • mdbf
  • megavids
  • thenastyranch
  • khanakhh
  • ethstaker
  • cubers
  • modclub
  • cisconetworking
  • normalnudes
  • GTA5RPClips
  • Leos
  • tester
  • anitta
  • provamag3
  • JUstTest
  • All magazines