Simulation of Worm Motion with OpenGL

Supervisor: Dr. Tathagata Ray

Duration: May 2012 - July 2012

Project details:

During the electve course of computer graphics, all of us were extremely eager to create our first ever programmed animation scene. After learning the basics of computer graphics using openGL, we formed a group of three to take up this porject, to be evaluated as a part of the course. Our aim was to follow the paper published by Dr. Gavin S.P Miller, regarding creating worm and snake motion n graphics, by applying physics. This was the first time, we programmed our own animation scene.

The Worm : The worm is modelled as a three mass two spring system. Directional friction acts in such a way that at any time only one of the masses can move. Here we have assumed only elongation of spring to be possible and neglected the compressive action. Thus the first mass moves till its velocity becomes zero, and the other masses move till natural length of the worm is regained. This ensures single directional motion.

The Context of the Scene : Just modelling the worm was not enough. It was also highly important to bring in some context, a setting, to make the animation attractive to the audience. Thus we came up with a story which goes like this :

Atop the hill of West Shire sits the house of late Jeremy Brown, the great wizard of Middle Ages. Years have passed but the house is still haunted with his spells. Stories of this mystery house are wide spread. As darkness envelopes the house, magic slowly unfolds and the music of Jeremy's enchanted cello fills the air. The night orchestrates a bizarre game of wizardy and every object in the house springs to life and frolics in the resonating music of the cello
A window overlooking the green knoll is in view. There is a teapot sitting on a table near the window. The scene starts with bright daylight entering through the window and slowly the sky gets darker and darker as night approaches. Lamps brighten up the the room and at midnight, the window handles suddenly lose their inanimity and transform into little worms, which start crawling. The teapot levitates and starts dancing in the air.

Snap Shots: The following snapshots show the change in the outside scenery as daylight passes and night approaches. Consequently it goes darker and darker.
scene1 scene2 scene3 scene4

The following snapshots show, how the house becomes enchanted at midnight. The teapot starts floating and the window handles transform into worms. The worms start moving up and down.
scene5 scene6 scene6 scene5

Work Division: The work was divided into three main tasks

I was involved mainly in the creationo of the back ground scene and also in the mathematical modelling of the worm. Other details, including the code can be found int the presentation whose link has been given below.

link :