summaryrefslogtreecommitdiffstats
path: root/Smoke/fluids.c
diff options
context:
space:
mode:
Diffstat (limited to 'Smoke/fluids.c')
-rw-r--r--Smoke/fluids.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/Smoke/fluids.c b/Smoke/fluids.c
index e56fcc9..d1fc279 100644
--- a/Smoke/fluids.c
+++ b/Smoke/fluids.c
@@ -469,40 +469,6 @@ void calculate_one_simulation_step(struct vis_data_arrays *vis_data)
}
//------ VISUALIZATION CODE STARTS HERE -----------------------------------------------------------------
-
-//direction_to_color: Set the current color by mapping a direction vector (x,y), using
-// the color mapping method 'method'. If method==1, map the vector direction
-// using a rainbow colormap. If method==0, simply use the white color
-void direction_to_color(float x, float y, int method)
-{
- float r,g,b,f;
-
- switch (method) {
- case 3:
- g = 1;
- break;
- case 2:
- r = 1;
- g = b = 0;
- break;
- case 1:
- f = (float)(atan2((double)y, (double)x) / 3.1415927 + 1);
- r = f;
- if(r > 1) r = 2 - r;
- g = f + 0.66667f;
- if(g > 2) g -= 2;
- if(g > 1) g = 2 - g;
- b = f + 2.0f * 0.66667f;
- if(b > 2) b -= 2;
- if(b > 1) b = 2 - b;
- break;
- case 0:
- default: r = g = b = 1;
- break;
- }
- glColor3f(r,g,b);
-}
-
float get_dataset(int index)
{
fftw_real cell_x = (fftw_real)winWidth / (fftw_real)(DIM + 1); // Grid cell width