What is Nostr?
Alexandre B A Villares 🐍 /
npub13qa…alcv
2023-11-23 00:18:16
in reply to nevent1q…6kjr

Alexandre B A Villares 🐍 on Nostr: Almost there, I'm very happy! I have removed the matplotlib dependency from the ...

Almost there, I'm very happy! I have removed the matplotlib dependency from the wonderful npub188p9239859nlpdjxt5cp6vvsuzxvvs2wfe46p4qcdnnpvckvs2cs63n7mm (npub188p…n7mm)'s flocking example code, and added very little #py5 for drawing.

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

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.

Author Public Key
npub13qa4ushxn7jwk2lwwmj4tsshq2953hrkwmmpg57875r06x3n4d3qenalcv