Bounce with image pixels

Hi, i’m trying to do a ball bounce with a simply black stroke (image), but im starting at the world of “Open Frameworks” and i don’t now exactly how i can take the position of the black pixels of the image and use them like a wall for do a bounce.

Could you help me find a solution?

Thanks and sorry for my English, is not the best.

Hi @oboix could you clarify what you are trying to do? Is it something like this

Where you draw a line and then a ball bounces off of that line?

If so, I’d recommend taking a look at @vanderlin’s https://github.com/vanderlin/ofxBox2d addon for using Box2d

yeah, i tested ofxbox2d to do a wall using rectangles with no gravity but the problem is that i need that particles to bounce into a dinamic curve, in other words, a large image moving in “Y” axis like a game map. So i don’t know how to draw a lot of ofbox2d particles to fit the path of that curve.

There’s an example i found into creative applications: but my walls need to be more organic:
http://www.creativeapplications.net/games/lilt-line-iphone-games/