Showing posts with label processing. Show all posts
Showing posts with label processing. Show all posts

Sunday, November 22, 2009

Entry #07 : Testing Box2D physics engine








For a few projects that I have in mind I've been looking at physics engine which are programming libraries that let you simulate some laws of physics and are usually used in games to give a more realistic feelings to thing. Some games are even only based on the physics simulation, like Perfect Balance.

After ruling out the possibility of writing my own engine - it is VERY complicated when you start to go beyond Newton's law of motion and try to implement collision detection and response - I found Box2D, a free open source engine initially written in C++ but also available for Java (JBox2D).

The library let's you define and position bodies and define how they work with each other using joints.

In this experiment I created a landscape using solid static bodies and moving ones that react to other bodies. I created a bridge by linking bodies with joints and a rotating thingy with a joint that act as a motor.

Unfortunately I'm not able to record the animation so dowload the Processing sketch and try out yourself. You will also need to download JBox2D here and copy it to you Processing libraries folder.


Friday, November 20, 2009

Entry #04 : Kosmos 360

This time I was experimenting with OpenGL in Processing.

I found this tutorial on making a sphere with a texture in C++. I'd really like to learn more of OpenGL so I might do another post on it later.

It is our own planet Earth, but mirrored (yep there is something wrong :D).
The sound track comes from this very interesting collection of space sounds.

Get the Processing sketch.


Monday, November 16, 2009

Entry #01 : A bit before dinner

A little fun with a looping video panoramic. Click to get the Processing sketch.

It's interactive, you can control direction and speed by moving the mouse left or right, closer/further away from the center of the frame.

Notice the disc at the bottom showing where you are in the panoramic.

Here is a video.

.
The cracking comes from the tripod.