![]() #define PREVIUS_HEIGHTMAP (* simulation2) ![]() #define CURRENT_HEIGHTMAP (* simulation1) To make everything move, use the following algorithm:.In order to animate, we will need an other array: int simulation2, with the exact same dimension as simulation1.This is done via a double array ( int simulation1), olding the height of each wave, Take the screen and slice it as a grid (the more slices, the better it looks).This water simulation uses a very old algorithm based on two heightmaps:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |