Catapult Physics

hello

I am currently working on an iphone game using Cocos2d with box2d, which involves implementing the physics for a catapult. 🙁

the catapult physics is similar to the link beside  http://www.miniclip.com/games/catapult/en/ 🙄

I would like to know the physics behind the working of a catapult and a way it can be implemented. 😉
any help or information  on the same is highly appreciated. 🙂
maybe this example can help you, it is on flash:

http://www.emanueleferonato.com/2010/04/07/real-world-catapult-prototype-using-box2d/
hello

i have been able to make all the bodies using box2d and joints for the movement..
but i was a bit stuck at the how the string physics and the front barrier sliding backwards(the hydraulics part) was implemented.

the catapult physics is similar to the link beside http://www.miniclip.com/games/catapult/en/

i would like to have some suggestions on the same as to how to deal with these two things

Thanks 🙂

Original thread: https://box2d.org/forum/viewtopic.php?t=6471