you can see the hurricane a bit

This commit is contained in:
Robin
2025-01-19 00:26:15 +01:00
16 changed files with 324 additions and 192 deletions

View File

@@ -5,12 +5,6 @@
#include <cmath>
// --------------------------- Basic Constants ---------------------------
// const int VOLUME_WIDTH = 576; // lon
const int VOLUME_WIDTH = 97; // lon
// const int VOLUME_HEIGHT = 361; // lat
const int VOLUME_HEIGHT = 71; // lat
const int VOLUME_DEPTH = 42; // lev
const int INITIAL_WINDOW_WIDTH = 1200;
const int INITIAL_WINDOW_HEIGHT = 900;
@@ -18,17 +12,26 @@ const double epsilon = 1e-10f;
const double infty = 1e15f; // This value is used to represent missing values in data
// --------------------------- Dataset Constants ---------------------------
// const int VOLUME_WIDTH = 576; // lon
// const int VOLUME_WIDTH = 97; // lon
const int VOLUME_WIDTH = 57; // lon
// const int VOLUME_HEIGHT = 361; // lat
// const int VOLUME_HEIGHT = 71; // lat
const int VOLUME_HEIGHT = 121; // lat
const int VOLUME_DEPTH = 42; // lev
const float DLON = 35.0f / VOLUME_WIDTH; // 35 for current trimmed data set range
const float DLAT = 60.0f / VOLUME_HEIGHT; // 60 for current trimmed data set range
const float DLEV = 1000.0f / VOLUME_DEPTH; // 1000 from max pressure (hPa) but not sure here
const float MIN_TEMP = 210.0f;
const float MAX_TEMP = 240.0f;
const float MAX_TEMP = 293.0f;
const float MIN_SPEED = 0.0F;
const float MAX_SPEED = 14.0f;
// --------------------------- Raycasting Constants ---------------------------
const int SAMPLES_PER_PIXEL = 4;
const float alphaAcumLimit = 0.4f; // TODO: Atm, this only works with sigmoid
const float minAllowedDensity = 0.001f;
const float stepSize = 0.02f;
@@ -58,16 +61,28 @@ struct ColorStop {
Color3 color;
};
// factor for the opacity function
// factor for the gradient opacity function
extern __device__ float d_opacityK;
// sigmoid function variables
extern __device__ float d_sigmoidOne;
extern __device__ float d_sigmoidTwo;
extern __device__ float d_sigmoidShift;
extern __device__ float d_sigmoidExp;
// alpha accumulation limit
extern __device__ float d_alphaAcumLimit;
// combo box index
extern __device__ int d_tfComboSelected;
extern __device__ int d_tfComboSelectedColor;
// constant opacity option
extern __device__ float d_opacityConst;
// samples per pixel
extern __device__ int d_samplesPerPixel;
// Silhouettes
extern __device__ bool d_showSilhouettes;
extern __device__ float d_silhouettesThreshold;
const int lenStopsPythonLike = 5;
const int lenStopsPythonLike = 11;
const int lenStopsGrayscale = 2;
const int lenStopsBluePurpleRed = 3;
extern __constant__ ColorStop d_stopsPythonLike[5];
extern __constant__ ColorStop d_stopsPythonLike[11];
extern __constant__ ColorStop d_stopsGrayscale[2];
extern __constant__ ColorStop d_stopsBluePurleRed[3];