1D Water

1D Water
  • Running Status

    Running with Macbook pro retina 13 at 180 ~ 185 fps.

  • Implementation Details

    1D water is implemented in 2D in processing. The animation will start after the user clicks in the screen. And after that clicking in the screen will result in a water drop with height of the mouse at the location. The initial water status is a s-function(Sigmoid function) that is configured to shape perfectly for the screen and for better illustration. The shallow water equation is inspired from the website mentioned above.
    The main difficulty when we faced this problem was that the equations are in partial differential forms and we did not have the knowledge of such equations. We googled online for better understanding and found the paper mentioned before and after hours of trying and test, it now works pretty good. We are satisfied with the results except for the waved created by the water drop. We looked into a lot of things that could effect this but due to time limit we did not succeed in fixing it.

  • Problem Faces

  • Video with Sound

2D Water

2D Water
  • Running Status

    Running with Macbook pro retina 13 at 180 ~ 185 fps.

  • Implementation Details

    2D water is implemented in 3D in processing. Pressing 's' will start and pause the animation. Pressing 'd' will release a water drop at the middle of the water surface. The inital configuration is a function that is based on the position of x and z coordinates.
    We incountered many problems in this animation. We managed to fix some, however, we lack the time and energy to do something more awesome. One of the problems we faced was transforming the 1D shallow water equation into 2D. We tried many fancy version of the equations, but they did not look good. So we went with a easier way for just considering the 4 points near by and the results were good. Another problem we had and we did not have the time to fix it was when adding lights and fill the quads with color, every will look super bad. The lights are very confused so each cell will either be dark or light. And since we only have a limited number of cells the lights looked like we have mosaic all over the place and it is kind of gross.

  • Problem Faces

3D deformable object

3D deformable object
  • Running Status

    Running with GIGABYTE p35k at 115 ~ 145 fps.

  • Implementation Details

    3D deformable object is implemented by Processing 3.0 version. User could control the action of the object generated in the scene through keyboard. And the angle of view could also be manipulated by mouse. We chose mass-spring method to implement our 3D deformable object. Implemented its collision with boundary. We generated ball for this simulation but haven't make ball collision with deformable object successfully so we didn't add it to scene.

  • Problem Faces

      Finding suitable spring constant(ks) and damping factor(kd) which may result in undesirable animation and action of cloth when set those to unfitting values.
      Generated ball but confronted problem in implementing collision.

3D Cloth(Mass-spring)

3D Cloth(Mass-spring)
  • Running Status

    Running with GIGABYTE p35k at 105 ~ 145 fps.

  • Implementation Details

    Cloth is implemented by Processing 3.0 version. User could control the action of both ball and cloth generated in the scene through keyboard. And the angle of view could also be manipulated by mouse. We chose mass-spring method to implement our cloth. Implemented both cloth's and ball's collision with boundary.

  • Problem Faces

    Finding suitable spring constant(ks) and damping factor(kd) which may result in undesirable animation and action of cloth when set those to unfitting values.

    At the start in understanding how to simulate mass-spring system through code. It is hard to convert formula to real code.

    Got confused by which functionality we should implement. There is no specific indication about which functionality we have to implement.

    Tried drag and done with processing calculating air force. However, do not have enough time to put it into actual implementation.

    Tried using spatial-data structure to optimize it but failed to get in actual implementation.

SPH

SPH
  • Running Status

    Running with Macbook pro retina 13 at 60 fps when under a few hundred particles. Framerate significantly drops when particle numbers exceed a few thousand to around 10 fps with ellipse and 30 fps with points.

  • Implementation Details

    SPH is inspired by the animation showed during class from here. We implemented a simple 2D sph with cells of width 10. And we had a particle system that can be turned on and off by pressing "s". And a toggle to show particles as circles or points with hotkey "p".
    We encountered a lot of problems in this animation. The biggest problem is when we first implemented the math, we observed a stange pattern. The particles at the very bottom does not act as expected. After digesting the equations used, we found out that the particles at the very bottom will only be taking forces from the upper and left or right particles. So it is impossible for them to have a velocity that is towards the top. And as a result every particle that makes to the bottom it will stay in the bottom. This leads to our animation very unstable and every particle that enters the bottom does not leave. To solve this, we considered adding a random offset at each time step that the particle will move up/down/left/right 2 pixels at a possiblity of 20%. After adding this offset everythings looks way better.

  • Problem Faces