We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi processers! I created a new Python Example for the Fisica Library, it is called CircleMutualAttraction. I hope it will be added to python examples, because there is only one example for the Fisica Library... https://gist.github.com/Speykious/8f65778e439f242f42e71294351c0853
Comments
Are you going to submit a pull request to the Fisica source repository?
https://github.com/rikrd/fisica
Your Python Mode sketch didn't run here. I had to make a tiny fix. 8-|
But then I've decided to fork your gist and do a refactor for the whole code. :ar!
Still, I couldn't figure out what's its logic. X_X
Some balls move to the bottom-right mostly. But most of them never moves at all. :-/
On a side note, most of PVector's methods aren't chainable like they are in Java Mode! :-<
P.S.: Fixed that chaining problem by adding
from processing.core import PVector as Vec
for (v2.3+). *-:)As a welcome bonus, it's now gotten much faster than Python Mode's own PVector! \m/
As an alternative to
import
, we can simply use the hidden global __pvector__:Vec = __pvector__
. ;;)Anyways, here's my fork's link: B-)
https://Gist.GitHub.com/GoToLoop/1861619991354ed7d063026658270689