Creating a physical mechanism is difficult. (Very difficult). But it can also be a lot of fun. Well, fun in "Why am I doing this with myself?" kind of way.
Assuming you have a fair understanding of the math involved *, and assuming you are interested in the dynamics of a rigid body, there are a few classic references to start with:
These are good places to start and will provide you with more than enough for you.
You can also watch Box2D Erin Catto and related GDC tutorials that you can download.
For more specific help, Bullet forums also contain a section where you can discuss and ask questions as soon as you understand some basics.
* If you do not have this honest understanding, find out. If you do not want, do not try to use an existing engine. If this is your first programming experience, focus on programming first. Do not overload.
Good luck.
source share