Step 4: Implement Kelager's suggested algorithm
As no progress was made using Unity's Rigidbody system, we decided to implement Kelager's algorithm fully. Most of the algorithm was already in place, as we used it to calculate forces when using the rigidbodies. What we needed to implement was the LeagFrog algorithm to calculate the next position and next velocity of each water particle and correct these using collision detection and management. In the video below the a first iteration of the algorithm can be seen. In the beginning the spheres fall in a promising manner, however they are quickly misplaced.
In the following pictures, as a video could not be recorded, the results of a second interation of the algorithm can be seen. Notice how the water does move and stay inside the boundaries, however the forces do not seem to be acting on the particles correctly. The velocities seem to be too high, which could either be a result from miscalculating the velocities themselves or from incorrect internal forces. Observe that what the pictures show are three frames right after each other - no fluid motion, only large changes in position.
Our next step is to try to figure out why these miscalculations occur and to find out if any other Kernel-functions can be used, other than the ones suggested by Kelager. We suspect that Kelager's suggested kernels might result in values that imply to large differences in positions in Unity's framwork at the scale we are using.
In the following pictures, as a video could not be recorded, the results of a second interation of the algorithm can be seen. Notice how the water does move and stay inside the boundaries, however the forces do not seem to be acting on the particles correctly. The velocities seem to be too high, which could either be a result from miscalculating the velocities themselves or from incorrect internal forces. Observe that what the pictures show are three frames right after each other - no fluid motion, only large changes in position.
Our next step is to try to figure out why these miscalculations occur and to find out if any other Kernel-functions can be used, other than the ones suggested by Kelager. We suspect that Kelager's suggested kernels might result in values that imply to large differences in positions in Unity's framwork at the scale we are using.
Kommentarer
Skicka en kommentar