More
See all Show me
14. ofxRuiPhysics2d example
7 months ago
13. Parque
7 months ago
11. vortex
9 months ago
10. metaballs study
10 months ago
9. Untitled (2006)
11 months ago
8. Soft Body test1
11 months ago
7. air doom
1 year ago
6. Criaturas
1 year ago
5. slugs
1 year ago
2. blood rush
2 years ago
A simple 2d Verlet physics addon for OpenFrameworks.
it includes particles, constraints and collisions and is based on this article: teknikus.dk/tj/gdc2001.htm
It was created for the Parque installation where it is heavily used (vimeo.com/4789754)
it can be downloaded here: ruicode.googlecode.com , includes the example in this video.

Credits

12 Likes

  • moka 7 months ago
    sweet! I am almost finished with mine too, but I will definatelly look into yours! Do you have any optimizations for the collisions? What I found really weird is that when I use square root approximation instead of sqrt() for collisions it was even slightly slower instead of faster.
  • Rui Madeira plus 7 months ago
    Hi,
    no, i dont have any optimizations, its pretty straight forward.
    the article where this is all based from has an approximation of the square root which seems really good but i never got to make it work, i dont know why but i got weird results...
    i've tried other sqrt approximations and i got the exact same results, it was a slower. i think it because modern processors already come optimized for square roots.
    im working a lot on improving this, i'm adding polygon to polygon collision and i really want to implement some sort of broad phase algorithm to speed things up.
  • moka 7 months ago
    sounds great! I will make mine really simple since i only made it to learn a little more about how those things work. The fastest way of speeding up collisions for now is to sort all particles depending on their x position and then using a smart loop that breaks; at a certain point. That only seems to be useful if all particles collide though!
  • Rui Madeira plus 7 months ago
    yea i saw an example from Zach Lieberman where he had the particles sorted that way.
    i've also downloaded some articles explaining the prune and sort algorithm, if its not too hardcore to implement i might go that way, otherwise i'll use Zach's algorithm :)
  • moka 7 months ago
    hehe, I just read some things about it. it seems pretty similar to the sorting i described only that it's bounding box based and a little more complex if I am not totally mistaken?
  • Rui Madeira plus 7 months ago
    from the little i've read about it, yes thats pretty much it :)
  •  
  • João Pacheco 7 months ago
    yeeees!! todo physics!

    boa pa! ;)
  • Rui Madeira plus 7 months ago
    oh yeah!!!
  •  
  • Randy Jones 7 days ago
    Looks just right. I'm curious why you did not make a wrapper for Box2D instead.
  • Rui Madeira plus 7 days ago
    Hi,
    this is a little different than Box2D and it suits just fine what i needed it for: animating particles with forces and constraints.
    At the time i though Box2D would be overkill and im also really interested in generative animation so it was also an excuse for me to learn a lot more about the subject.
    :)
  • Randy Jones 7 days ago
    Makes sense, thanks for sharing.
  •  
This conversation is missing your voice. Take five seconds to join Vimeo or log in.

Advertisement

2 Related collections

Statistics

  •  
    plays
    likes
    comments
  • Total
    plays 499
    likes 12
    comments 11
  • Dec 29th
    plays 0
    likes 0
    comments 0
  • Dec 28th
    plays 4
    likes 0
    comments 0
  • Dec 27th
    plays 2
    likes 1
    comments 0
  • Dec 26th
    plays 1
    likes 0
    comments 0
  • Dec 25th
    plays 6
    likes 0
    comments 0
  • Dec 24th
    plays 3
    likes 0
    comments 0
  • Dec 23rd
    plays 3
    likes 0
    comments 0
  • Dec 22nd
    plays 6
    likes 0
    comments 0
Previous Week

Downloads

Please join Vimeo or log in to download the original file. It only takes a few seconds.