diff options
author | Oliver Schinagl <oliver@schinagl.nl> | 2008-01-09 11:31:25 (GMT) |
---|---|---|
committer | Oliver Schinagl <oliver@schinagl.nl> | 2008-01-09 11:31:25 (GMT) |
commit | 4da3ab92496c596274a5efb2304a3e80f927c95a (patch) | |
tree | fa389ec594ba44d50408650ca9492e6d3ad3e051 /Smoke/fluids.c | |
parent | f946564b55211d2550488e09c997db75a013d49e (diff) | |
download | 2iv35-4da3ab92496c596274a5efb2304a3e80f927c95a.zip 2iv35-4da3ab92496c596274a5efb2304a3e80f927c95a.tar.gz 2iv35-4da3ab92496c596274a5efb2304a3e80f927c95a.tar.bz2 |
new palettes
Diffstat (limited to 'Smoke/fluids.c')
-rw-r--r-- | Smoke/fluids.c | 34 |
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 |