Fluids Demonstration
Description: USES: Project Code: #include <stdlib.h> #include <GL/glut.h> #include<time.h> #include<stdio.h> #include<math.h> void display(void); void fluids(); /* for cuboid*/ GLfloat vertices[][3] = {{-1.0,-1.8,-1.0},{1.0,-1.8,-1.0}, {1.0,1.8,-1.0}, {-1.0,1.8,-1.0}, {-1.0,-1.8,1.0}, {1.0,-1.8,1.0}, {1.0,1.8,1.0}, {-1.0,1.8,1.0}}; GLfloat normals[][3] = {{-1.0,-1.0,-1.0},{1.0,-1.0,-1.0}, {1.0,1.0,-1.0}, {-1.0,1.0,-1.0}, {-1.0,-1.0,1.0}, {1.0,-1.0,1.0}, {1.0,1.0,1.0}, {-1.0,1.0,1.0}}; GLfloat colors[][3] = {{0.137225,0.556863,0.137255},{0.137225,0.556863,0.137255},{0.137225,0.556863,0.137255},{0.137225,0.556863,0.137255}, {0.137225,0.556863,0.137255},{0.137225,0.556863,0.137255},{0.137225,0.556863,0.137255},{0.137225,0.556863,0.137255}}; /* for loop */ GLfloat vertice[][3]={{ 0.5,1.0,0.25},{2.5,1.0,0.25},{2.5,0.25,0.25},{2.0,0.25,0.25},{2.0,0.0,0.25},{2.5,0.0,0.25}, {2.5,-0.75,0.25},{0.5,-0.75,0.25},{0.5,0.0,0.25},{1.25,0.0,0.25},{1.25,0.25,0.25},{0.5,0.25,0.25}, {0.75,0.75,0.…