Tuesday, April 24, 2012

Support User Generated Forces

Support user generated forces
Instead of voice volume input, I use mouse motion to generate the force added to water. Now, it supports user generated forces. When the user drags the mouse, generate a corresponding wave.

Including these processes:
1、Screen To World

2、Mouse Pick Ray

3、Ray Intersection

4、Force Generation

Demo:


Sunday, April 22, 2012

An introduction to openFramework

An simple introduction to openFramework
website: http://www.openframeworks.cc/


openFrameworks is an open source C++ toolkit designed to assist the creative process by providing a simple and intuitive framework for experimentation. The toolkit is designed to work as a general purpose glue, and wraps together several commonly used libraries, including:
The code is written to be massively cross-compatible. Right now we support five operating systems (Windows, OSX, Linux, iOS, Android) and four IDEs (XCode, Code::Blocks, and Visual Studio and Eclipse). The API is designed to be minimal and easy to grasp.
Simply put, openFrameworks is a tool that makes it much easier to make things with code. We find it super useful, and we hope you do too.
openFrameworks is actively developed by Zach LiebermanTheodore Watson, and Arturo Castro, with help from the OF community. openFrameworks is indebted to two significant precursors: the Processing development environment, created by Casey ReasBen Fry and the Processing community; and the ACU Toolkit, a privately distributed C++ library developed by Ben Fry and others in the MIT Media Lab's Aesthetics and Computation Group.


3D Version of Tides

3D version of height filed water simulation
So far, we extend the 2d version to 3d version, rendering with cubes,you can see the cubes clearly when closing up, which we will work with in the next process.
The force added to the left-up of the water is still controlled by voice volume.

There is also a link to the video: http://youtu.be/92EHZ6hGztA


Friday, April 20, 2012

Interactions between heightfield water and object



There are several ways to deal with the interaction between fluid and rigid body:

Quote:
There are mainly two different ways of interacting with a height field. Either the height field and flow are modified directly or the boundary conditions are modified.
The first approach is used in [CL95, Tes04a] to simulate the motion of rigid objects. In the approach used by [Tes04a] the height of the water is in-creased in front of a moving object and decreased behind it. When an object is submerged the height is increased above it corresponding to the volume of the object and when an object emerges the height is decreased. This approach can also be used to add and remove water.
The other approach is to use handle interaction by applying pressure. When an object is floating in the water pressure is applied to the height field resulting in a lower height below the object.
End Quote  --from Real-time Interactive Water Waves(KTH computer Science and communication)

In this project, we are tyring to use the method discribed in Wave Particles(Cem Yuksel, Donald H.House, John Keyser) for the Fluid to Object Coupling  part.
  • The buoyancy force:
  • The dynamic forces:  are computed over the interface of fluid and object and they are based on the relative motion of the object sufface to the fluid.  The dynamic force consists drag force and and lift force, they can be computed by the following fomula:
The mechanism of Object to Fluid Coupling is shown briefly in the following picture: