how to make simple fluid

Hi~ I'm Korean developer.

first sorry for poor english skill.

I'm trying to make fluid with box2d in cocos2d.

Very very simple like this
http://www.youtube.com/watch?v=0uX-1GXYIss

I already read about bravetheboris b2buoyancyController.

But i can't implement to my program.

Is any other solution? or some code?

I'm in trouble for 2 week.

please help me..
That example (with circles) is simply using Archimedes' principle http://en.wikipedia.org/wiki/Buoyancy

It applies a force proportional to the density of water and the area of water displaced so when its completley submerged it applies pi*r^2*waterdensity upwards from the centre of gravity of the object.

Its much harder with other shapes, I once made general polygon water physics. Its the same principle, just harder to work out how much of the shape is underwater and where the centre of gravity is.
Oh!! Thank you for your advise.

I will try it and reply result 🙂

Original thread: https://box2d.org/forum/viewtopic.php?t=4848