### Navigation

- index
- modules |
- next |
- pymunk 4.0.0 documentation »

# pymunk

pymunk is a easy-to-use pythonic 2d physics library that can be used whenever you need 2d rigid body physics from Python. Perfect when you need 2d physics in your game, demo or other application! It is built on top of the very nice 2d physics library Chipmunk.

## Getting Started

To get started quickly take a look in the Readme, it contains a summary of the most important things and is quick to read. When done its a good idea to take a look at the included Examples, read the Tutorials and take a look in the API Reference.

## The pymunk Vision

> “Make 2d physics easy to include in your game“

It is (or is striving to be):

- Easy to use - It should be easy to use, no complicated stuff should be needed to add physics to your game/program.
- “Pythonic” - It should not be visible that a c-library (chipmunk) is in the bottom, it should feel like a python library (no strange naming, OO, no memory handling and more)
- Simple to build & install - You shouldn’t need to have a zillion of libraries installed to make it install, or do a lot of command line tricks.
- Multi-platform - Should work on both Windows, *nix and OSX.
- Non-intrusive - It should not put restrictions on how you structure your program and not force you to use a special game loop, it should be possible to use with other libraries like pygame and pyglet.

## Python 2 & Python 3

pymunk has been tested and runs fine on both Python 2 and Python 3. It has been tested on recent versions of CPython (2 and 3) and Pypy. For an exact list of tested versions see the Readme.

## Contact & Support

Stackoverflow
  You can ask questions/browse old ones at stackoverflow, just look for the pymunk tag. http://stackoverflow.com/questions/tagged/pymunk
Forum
  Currently pymunk has no separate forum, but uses the general Chipmunk forum at http://chipmunk-physics.net/forum/index.php Many issues are the same, like how to create a rag doll or why a fast moving object pass through a wall. If you have a pymunk specific question feel free to mark your post with [pymunk] to make it stand out a bit.
E-Mail
  You can email me directly at vb@viblo.se
Issue Tracker
  Please use the issue tracker at google code to report any issues you find: http://code.google.com/p/pymunk/

Regardless of the method you use I will try to answer your questions as soon as I see them. (And if you ask on SO or the forum other people might help as well!)

Attention

If you like pymunk and find it useful and have a few minutes to spare I would love to hear from you. What would really be nice is a real postcard from the place where you are! :)

pymunk’s address is:
  pymunk c/o Victor Blomqvist
  Carl Thunbergs Vag 9
  169 69 Solna
  SWEDEN

## Contents

- Readme
  - About
  - How to Use
  - Example
  - Dependencies / Requirements
  - Chipmunk
- News
  - pymunk 4.0.0
  - pymunk 3.0.0
  - pymunk 2.1.0
  - pymunk 2.0.0
  - Older news
- Installation
  - Without installation
  - Install pymunk
  - Compile Chipmunk
- API Reference
  - `pymunk` Package
    - `pymunk.constraint` Module
    - `pymunk.vec2d` Module
    - `pymunk.util` Module
    - `pymunk.pygame_util` Module
    - `pymunk.pyglet_util` Module
    - `pymunkoptions` Module
- Examples
  - balls_and_lines.py
  - pyglet_util_demo.py
  - arrows.py
  - no_debug.py
  - box2d_vertical_stack.py
  - polygon_triangulation.py
  - shapes_for_draw_demos.py
  - damped_rotary_spring_pointer.py
  - platformer.py
  - py2exe_setup__basic_test.py
  - spiderweb.py
  - contact_with_friction.py
  - flipper.py
  - playground.py
  - breakout.py
  - run.py
  - basic_test.py
  - slide_and_pinjoint.py
  - using_sprites_pyglet.py
  - pygame_util_demo.py
  - box2d_pyramid.py
  - bouncing_balls.py
  - newtons_cradle.py
  - contact_and_no_flipy.py
  - py2exe_setup__breakout.py
  - point_query.py
  - using_sprites.py
- Tutorials
  - Arrows and other pointy sticky things
    - Before we start
    - Basic scene
  - Slide and Pin Joint Demo Step by Step
    - Before we start
    - An empty simulation
    - Falling balls
    - A static L
    - Joints (1)
    - Joints (2)
    - The end
- Advanced
  - Why ctypes?
  - Code Layout
  - Tests
  - Working with non-wrapped parts of Chipmunk
  - Regenerate bindings to Chipmunk
- Issue Tracker
- Source Repository
- Downloads
- License

## Indices and tables

- Index
- Module Index
- Search Page

### Navigation

- index
- modules |
- next |
- pymunk 4.0.0 documentation »