Physically Based Modeling

Kevin Gilpin


Source Code

PBM Waves Demo


This Physically Based Modeling library is a C++ implementation of the techniques and interfaces described in the book
Physically Based Modeling for Computer Graphics (ISBN 0-12-079880-08) by Ronen Barzel.

Physically Based Modeling is a member of the family of projects.


There is no documentation other than Barzel's book. However, the book is a very complete description of all the modules and interfaces implemented in the library.


Physically Based Modeling includes a self-extracting ZIP file which includes some programs which demonstrate various features of the library. You can get it here, on the SourceForge 'Files' page.

Demo Programs

Figure8Demonstrates how to animate a body through a fixed kinematic path
PendulumAnimates a Pendulum swinging through a magnetic field
RigidBodiesAnimates several rigid bodies connected to fixed points in space, and to each other
SpringsAndSpheresAnimates several spheres connected with springs to fixed points in space and to each other
ViewerThis is a generic program which reads in a description of geometry and constraints from a text file, and animates the results. The grammar is contained in the file PBM.yac in the parser package
WavesThis demo animates droplets falling into a liquid pool. It can run as a standalone program or as a screensaver.
WreckingBallDemonstrates combining kinematic motion with force-calculated motion.

Source Code

You may access the source code by anonymous CVS, or you may browse it on-line. See the
CVS Page at SourceForge for more information. There are 4 modules that you may 'checkout':

Other Libraries Required to Build PBM

In addition to the code in the external package, there are some other libraries you'll need to build PBM. Free implementations are available of all the required libraries. The packages are quite large so I do not include them in the PBM source tree.

Finally, PBM currently builds with Microsoft Visual C++. The code is not written to reference any Windows-specific functionality, so there shouldn't be any major roadblocks to building it on a UNIX platform. ( The only one problem I can think of is how good the support for templates is in GCC ). Certainly, if you build PBM on any non-Windows platform please let me know about it. In fact, by the terms of the LGPL license, you are required to send me your modifications. The Visual C++ build uses the multi-threaded DLL runtime library ( msvcrt and msvcirt ). If you try and link it with other code that was built for the static C runtime ( libc ) you will get nasty un-resolvable link errors. You'll have to re-compile one library or the other in order to make them compatible.

PBM Viewer Demo Showing

Physically Based Modeling is hosted by SourceForge