├── .gitignore ├── tests ├── frame2.png ├── frame2b.png ├── grid_2.hdf5 ├── grid_3.hdf5 ├── grid_2b.hdf5 ├── frame_cosmo_box.png ├── frame_tng100_cutout.png ├── frame_tng100_density.png ├── param_tng100_cutout.txt ├── config_2b.txt ├── config_2.txt ├── config_cosmo_box.txt ├── config_3.txt ├── param.txt ├── param_cosmo_box.txt └── config_tng100_cutout.txt ├── colortables ├── mpl_tab10.tbl ├── idl_13_rainbow.tbl ├── idl_3_red-temp.tbl ├── idl_33_blue-red.tbl ├── cubehelix_1_50.tbl └── gist_heat.tbl ├── src ├── fileio_img.h ├── keyframe.h ├── arepoTree.h ├── renderer.h ├── sampler.h ├── voronoi_3db.h ├── snapio.h ├── fileio.h ├── geometry.cpp ├── transfer.h ├── volume.cpp ├── volume.h ├── arepo.h ├── integrator.h ├── ArepoRT.h ├── spectrum.h ├── util.h └── camera.h ├── Makefile └── examples ├── spoon_config_movie.txt ├── spoon_config_rot.txt ├── spoon_config_end.txt ├── spoon_param.txt ├── cosmoRot_param.txt ├── cosmoRot_config.txt ├── illustris_box1820_config_cellgrad.txt ├── illustris_subbox0_config_4k.txt ├── illustris_box1820_config_sphTree.txt ├── cosmoRot_config_temp.txt ├── cosmoRot_config_dens.txt ├── illustris_subbox0_config_360.txt ├── illustris_subbox0_config_8k.txt ├── illustris_subbox0_config_360_C1.txt ├── illustris_box1820_param.txt ├── tng_subbox0_param.txt ├── illustris_box1820_128k_nni_param.txt ├── zoom_Nelson16_param.txt ├── zoom_Nelson16_config.txt ├── illustris_subbox0_param.txt ├── tng_subbox0_config24.txt └── illustris_subbox0_config_1080p.txt /.gitignore: -------------------------------------------------------------------------------- 1 | ArepoRT 2 | build/* 3 | arepo/ 4 | libpng/ 5 | output/ 6 | -------------------------------------------------------------------------------- /tests/frame2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnelson86/ArepoVTK/HEAD/tests/frame2.png -------------------------------------------------------------------------------- /tests/frame2b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnelson86/ArepoVTK/HEAD/tests/frame2b.png -------------------------------------------------------------------------------- /tests/grid_2.hdf5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnelson86/ArepoVTK/HEAD/tests/grid_2.hdf5 -------------------------------------------------------------------------------- /tests/grid_3.hdf5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnelson86/ArepoVTK/HEAD/tests/grid_3.hdf5 -------------------------------------------------------------------------------- /tests/grid_2b.hdf5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnelson86/ArepoVTK/HEAD/tests/grid_2b.hdf5 -------------------------------------------------------------------------------- /tests/frame_cosmo_box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnelson86/ArepoVTK/HEAD/tests/frame_cosmo_box.png -------------------------------------------------------------------------------- /tests/frame_tng100_cutout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnelson86/ArepoVTK/HEAD/tests/frame_tng100_cutout.png -------------------------------------------------------------------------------- /tests/frame_tng100_density.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dnelson86/ArepoVTK/HEAD/tests/frame_tng100_density.png -------------------------------------------------------------------------------- /colortables/mpl_tab10.tbl: -------------------------------------------------------------------------------- 1 | # comment 2 | 10 3 | 31.0 119.0 180.0 1.00 4 | 255.0 127.0 14.0 1.00 5 | 44.0 160.0 44.0 1.00 6 | 214.0 39.0 40.0 1.00 7 | 148.0 103.0 189.0 1.00 8 | 140.0 86.0 75.0 1.00 9 | 227.0 119.0 194.0 1.00 10 | 127.0 127.0 127.0 1.00 11 | 188.0 189.0 34.0 1.00 12 | 23.0 190.0 207.0 1.00 13 | -------------------------------------------------------------------------------- /src/fileio_img.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fileio_img.h 3 | * dnelson 4 | */ 5 | 6 | #ifndef AREPO_RT_FILEIO_IMG_H 7 | #define AREPO_RT_FILEIO_IMG_H 8 | 9 | #include 10 | using std::string; 11 | 12 | void WriteImageTGA(const string &name, float *pixels, float *alpha, int xRes, int yRes, 13 | int totalXRes, int totalYRes, int xOffset, int yOffset); 14 | //void RGBSpectrum *ReadImageTGA(const string &name, int *w, int *h); 15 | 16 | void WriteImagePNG(const string &name, float *pixels, float *alpha, int xRes, int yRes, 17 | int totalXRes, int totalYRes, int xOffset, int yOffset); 18 | 19 | #endif // AREPO_RT_FILEIO_IMG_H 20 | -------------------------------------------------------------------------------- /src/keyframe.h: -------------------------------------------------------------------------------- 1 | /* 2 | * keyframe.h 3 | * dnelson 4 | */ 5 | 6 | #ifndef AREPO_RT_KEYFRAME_H 7 | #define AREPO_RT_KEYFRAME_H 8 | 9 | #include "transform.h" 10 | 11 | class FrameManager { 12 | public: 13 | // construction 14 | FrameManager(vector kfSet); 15 | ~FrameManager(); 16 | 17 | // return values at current frame 18 | Transform SetCamera(); 19 | 20 | // frame management 21 | void Advance(int curFrame); 22 | 23 | private: 24 | void AddParseString(string &addTFstr); 25 | 26 | // data 27 | float curTime; 28 | int curFrame; 29 | 30 | vector start; 31 | vector stop; 32 | vector start_val; 33 | vector stop_val; 34 | vector method; 35 | vector quantity; 36 | 37 | // quantities 38 | float cameraPosition[3]; 39 | float cameraLookAt[3]; 40 | }; 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/arepoTree.h: -------------------------------------------------------------------------------- 1 | /* 2 | * arepoTree.h 3 | * dnelson 4 | */ 5 | 6 | #ifndef AREPO_RT_AREPOTREE_H 7 | #define AREPO_RT_AREPOTREE_H 8 | 9 | #include "transfer.h" 10 | 11 | #if (NUM_THREADS > 1) 12 | #include 13 | #endif 14 | 15 | // ArepoTree: expose the neighbor tree data structures and encapsulate tree related functions 16 | class ArepoTree { 17 | public: 18 | // construction 19 | ArepoTree(const TransferFunction *tf); 20 | ~ArepoTree(); 21 | 22 | // methods 23 | BBox WorldBound() const { return extent; } 24 | BBox VolumeBound() const { return extent; } 25 | 26 | // world geometry 27 | bool IntersectP(const Ray &r, double *t0, double *t1) const { 28 | return extent.IntersectP(r, t0, t1); 29 | } 30 | 31 | // tree search traversal 32 | bool FindNeighborList(Point &pt, float hsml, int *numngb_int, vector &vals); 33 | 34 | // sampling / interpolation 35 | bool AdvanceRayOneStep(const Ray &ray, double *t0, double *t1, Spectrum &Lv, Spectrum &Tr, int threadNum); 36 | 37 | // data 38 | 39 | private: 40 | // rendering 41 | BBox extent; 42 | const TransferFunction *transferFunction; 43 | 44 | //vector varNGBLists; 45 | //int *varNGBList; 46 | }; 47 | 48 | #endif //AREPO_RT_AREPOTREE_H 49 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # ArepoVTK 3 | # Dylan Nelson 4 | # 5 | 6 | # user-configurable 7 | # ----------------- 8 | 9 | EXECNAME = ArepoRT 10 | 11 | #OPT += -DDEBUG # enable verbose diagnostics and checks 12 | #OPT += -DENABLE_OPENGL # unused 13 | #OPT += -DENABLE_CUDA # unused 14 | 15 | # system 16 | # ------- 17 | 18 | ARCH = $(shell uname) 19 | 20 | OPTIMIZE = -Wall -g -m64 -O3 #-pg #enable profiler 21 | INCL = -I ./arepo/ 22 | 23 | CC = mpicxx 24 | LIBS = -fopenmp -lm -L ./arepo/ 25 | 26 | CFLAGS = $(OPTIMIZE) -DH5_USE_16_API 27 | 28 | # module load gcc gsl fftw-serial hdf5-serial impi 29 | CFLAGS += -I${GSL_HOME}/include -I${HDF5_HOME}/include -I./libpng/ 30 | LIBS += -L${GSL_HOME}/lib -L${HDF5_HOME}/lib -L./libpng/ 31 | 32 | OBJS = ArepoRT.o camera.o fileio.o fileio_img.o geometry.o integrator.o keyframe.o renderer.o sampler.o transfer.o transform.o util.o volume.o snapio.o 33 | HEAD = ArepoRT.h camera.h fileio.h fileio_img.h geometry.h integrator.h keyframe.h renderer.h sampler.h spectrum.h transfer.h transform.h util.h volume.h snapio.h 34 | MISC_RM = frame.raw.txt frame.tga 35 | 36 | # ENABLE_AREPO 37 | OBJS += arepo.o arepoTree.o arepoInterp.o voronoi_3db.o 38 | HEAD += arepo.h arepoTree.h 39 | LIBS += -lgsl -lgslcblas -lgmp -lhdf5 -pthread -larepo -lpng16 #-lhwloc 40 | 41 | OBJS := $(addprefix build/,$(OBJS)) 42 | INCL := $(addprefix src/,$(INCL)) 43 | 44 | $(EXECNAME): libarepo.a $(OBJS) 45 | $(CC) $(CFLAGS) $(OBJS) $(OPT) -o $(EXECNAME) $(LIBS) 46 | 47 | libarepo.a: 48 | @cd arepo; make libarepo.a; 49 | 50 | clean: 51 | @cd arepo; make clean; 52 | rm -f $(OBJS) $(EXECNAME) $(MISC_RM) 53 | 54 | build/%.o: src/%.cpp 55 | $(CC) $(CFLAGS) $(OPT) -c $< -o $@ 56 | -------------------------------------------------------------------------------- /src/renderer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * renderer.h 3 | * dnelson 4 | */ 5 | 6 | #ifndef AREPO_RT_RENDERER_H 7 | #define AREPO_RT_RENDERER_H 8 | 9 | #include "ArepoRT.h" 10 | #include "util.h" 11 | 12 | // Renderer 13 | class Renderer { 14 | public: 15 | // construction 16 | Renderer(Sampler *s, Camera *c, VolumeIntegrator *vi); 17 | ~Renderer(); 18 | 19 | // methods 20 | void Render(const Scene *scene, int frameNum); 21 | void RasterizeStage(const Scene *scene); 22 | 23 | Spectrum Li(const Scene *scene, const Ray &ray, const Sample *sample, RNG &rng, Spectrum *T = NULL, 24 | int *prevEntryCell = NULL, int *prevEntryTetra = NULL, int threadNum = -1) const; 25 | Spectrum Transmittance(const Scene *scene, const Ray &ray, const Sample *sample, RNG &rng) const; 26 | 27 | //writeStatusBar(int cur, int total); 28 | 29 | private: 30 | // data 31 | Sampler *sampler; 32 | Camera *camera; 33 | VolumeIntegrator *volumeIntegrator; 34 | }; 35 | 36 | // RendererTask 37 | class RendererTask : public Task { 38 | public: 39 | // construction 40 | RendererTask(const Scene *sc, Renderer *ren, Camera *c, Sampler *ms, Sample *sam, int tn, int tc) 41 | { 42 | IF_DEBUG(cout << "RendererTask(" << tn << ", " << tc << ") constructor." << endl); 43 | 44 | scene = sc; renderer = ren; camera = c; mainSampler = ms; 45 | origSample = sam; taskNum = tn; taskCount = tc; 46 | } 47 | void Run(int threadNum); 48 | 49 | private: 50 | // data (good spot for thread dependent stuff) 51 | const Renderer *renderer; 52 | const Scene *scene; 53 | Camera *camera; 54 | Sampler *mainSampler; 55 | Sample *origSample; 56 | int taskNum, taskCount; 57 | }; 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /src/sampler.h: -------------------------------------------------------------------------------- 1 | /* 2 | * sampler.h 3 | * dnelson 4 | */ 5 | 6 | #ifndef AREPO_RT_SAMPLER_H 7 | #define AREPO_RT_SAMPLER_H 8 | 9 | #include "ArepoRT.h" 10 | #include "util.h" 11 | 12 | class Sampler { 13 | public: 14 | // construction 15 | virtual ~Sampler(); 16 | Sampler(int xstart, int xend, int ystart, int yend, int spp, float sopen, float sclose); 17 | virtual int GetMoreSamples(Sample *sample, RNG &rng) = 0; 18 | virtual int MaximumSampleCount() = 0; 19 | virtual bool ReportResults(Sample *samples, const Ray *rays, const Spectrum *Ls, int count); 20 | virtual Sampler *GetSubSampler(int num, int count) = 0; 21 | virtual int RoundSize(int size) const = 0; 22 | 23 | // data 24 | const int xPixelStart, xPixelEnd, yPixelStart, yPixelEnd; 25 | const int samplesPerPixel; 26 | const float shutterOpen, shutterClose; 27 | protected: 28 | void ComputeSubWindow(int num, int count, int *xstart, int *xend, int *ystart, int *yend) const; 29 | }; 30 | 31 | struct CameraSample { 32 | float imageX, imageY; 33 | float lensU, lensV; 34 | float time; 35 | }; 36 | 37 | struct Sample : public CameraSample { 38 | // public methods 39 | Sample(Sampler *sampler, VolumeIntegrator *vol, const Scene *scene); 40 | uint32_t Add1D(uint32_t num) { 41 | n1D.push_back(num); 42 | return n1D.size()-1; 43 | } 44 | uint32_t Add2D(uint32_t num) { 45 | n2D.push_back(num); 46 | return n2D.size()-1; 47 | } 48 | ~Sample() { 49 | if (oneD != NULL) { 50 | FreeAligned(oneD[0]); 51 | FreeAligned(oneD); 52 | } 53 | } 54 | Sample *Duplicate(int count) const; 55 | 56 | // data 57 | vector n1D, n2D; 58 | float **oneD, **twoD; 59 | 60 | private: 61 | // private methods 62 | void AllocateSampleMemory(); 63 | Sample() { oneD = twoD = NULL; } 64 | }; 65 | 66 | class StratifiedSampler : public Sampler { 67 | public: 68 | // construction 69 | StratifiedSampler(int xstart, int xend, int ystart, int yend, 70 | int xs, int ys, bool jitter, float sopen, float sclose); 71 | ~StratifiedSampler(); 72 | 73 | // methods 74 | int RoundSize(int size) const { return size; } 75 | Sampler *GetSubSampler(int num, int count); 76 | int GetMoreSamples(Sample *sample, RNG &rng); 77 | int MaximumSampleCount() { return xPixelSamples * yPixelSamples; } 78 | private: 79 | // data 80 | int xPixelSamples, yPixelSamples; 81 | bool jitterSamples; 82 | int xPos, yPos; 83 | float *sampleBuf; 84 | }; 85 | 86 | StratifiedSampler *CreateStratifiedSampler(const Film *film, const Camera *camera); 87 | 88 | #endif 89 | -------------------------------------------------------------------------------- /src/voronoi_3db.h: -------------------------------------------------------------------------------- 1 | /* 2 | * voronoi_3db.h 3 | * dnelson 4 | */ 5 | 6 | #ifndef VORONOI_3DB_H 7 | #define VORONOI_3DB_H 8 | 9 | #include "ArepoRT.h" 10 | // otherwise this file doesn't seem to know about the preprocessor definitions from Config.sh 11 | #include "../arepo/build/arepoconfig.h" 12 | #include "../arepo/src/utils/dtypes.h" 13 | 14 | #define MAX_DOUBLE_NUMBER 1e306 15 | 16 | #ifndef SPECIAL_BOUNDARY 17 | #ifndef LONGIDS 18 | typedef unsigned int MyIDType; 19 | #define MPI_MYIDTYPE MPI_UNSIGNED 20 | #else 21 | typedef unsigned long long MyIDType; 22 | #define MPI_MYIDTYPE MPI_UNSIGNED_LONG_LONG 23 | #endif 24 | #else 25 | #ifndef LONGIDS 26 | typedef int MyIDType; 27 | #define MPI_MYIDTYPE MPI_INT 28 | #else 29 | typedef long long MyIDType; 30 | #define MPI_MYIDTYPE MPI_LONG_LONG_INT 31 | #endif 32 | #endif 33 | 34 | #ifndef DOUBLEPRECISION // default is single-precision 35 | typedef float MyFloat; 36 | typedef float MyDouble; 37 | #define MPI_MYFLOAT MPI_FLOAT 38 | #define MPI_MYDOUBLE MPI_FLOAT 39 | #else 40 | #if (DOUBLEPRECISION == 2) // mixed precision 41 | typedef float MyFloat; 42 | typedef double MyDouble; 43 | #define MPI_MYFLOAT MPI_FLOAT 44 | #define MPI_MYDOUBLE MPI_DOUBLE 45 | #else // everything double-precision 46 | typedef double MyFloat; 47 | typedef double MyDouble; 48 | #define MPI_MYFLOAT MPI_DOUBLE 49 | #define MPI_MYDOUBLE MPI_DOUBLE 50 | #endif 51 | #endif 52 | 53 | #define MAXGRADIENTS 5 54 | 55 | #include "mpi.h" //as in Sunrise, need to include outside the C-linkage block 56 | #include 57 | #include 58 | #include 59 | #include 60 | #include 61 | #include 62 | #include "gmp.h" 63 | 64 | extern "C" { 65 | #include "../arepo/build/arepoconfig.h" 66 | #include "../arepo/src/utils/dtypes.h" 67 | #include "../arepo/src/mesh/mesh.h" 68 | #include "../arepo/src/mesh/voronoi/voronoi.h" //gmp 69 | } 70 | 71 | //#include "../arepo/src/main/allvars.h" 72 | #include "allvars.h" 73 | 74 | void init_clear_auxmesh(tessellation * T); 75 | int insert_point_new(tessellation * T, int pp, int ttstart); 76 | void make_an_edge_split_new(tessellation * T, int tt0, int edge_nr, int count, int pp, int *ttlist); 77 | void compute_auxmesh_volumes(tessellation *T, double *vol); 78 | void derefine_refine_process_edge_new(tessellation * T, double *vol, int tt, int nr, unsigned char *visited_edges); 79 | 80 | // for DC connectivity 81 | int find_next_cell_DC(tessellation *T, int cell, double p0[3], double dir[3], int previous, double *length); 82 | 83 | // for delaunay based NNI 84 | bool calc_circumcenter(tessellation *T, point *p0, int dp1, int dp2, int dp3, double *cp); 85 | 86 | #endif // VORONOI_3DB_H 87 | -------------------------------------------------------------------------------- /src/snapio.h: -------------------------------------------------------------------------------- 1 | /* 2 | * snapio.h 3 | * dnelson 4 | */ 5 | 6 | #ifndef AREPO_RT_SNAPIO_H 7 | #define AREPO_RT_SNAPIO_H 8 | 9 | #include "ArepoRT.h" 10 | #include "hdf5.h" 11 | 12 | // ArepoSnapshot: handle HDF5 I/O related to snapshots 13 | class ArepoSnapshot 14 | { 15 | public: 16 | // construction 17 | ArepoSnapshot(string fB) { fileBase = fB; } 18 | 19 | // methods 20 | void read_ic(); 21 | template void recenterBoxCoords(vector &pos_xyz, int index); 22 | 23 | // HDF5 helpers 24 | template hid_t getDataType(void); 25 | bool groupExists(string fileName, string groupName, string objName); 26 | void getDatasetExtent(string fileName, string groupName, string objName, vector &Extent); 27 | int getDatasetTypeSize(string fileName, string groupName, string objName); 28 | bool hasGroupAttribute(string fileName, string groupName, string objName); 29 | 30 | template void readGroupAttribute(string fileName, 31 | string groupName, string objName, vector &Data); 32 | template int readGroupDataset(string fileName, 33 | string groupName, string objName, int objVectorIndex, vector &Data); 34 | template int readGroupDatasetSelect(string fileName, 35 | string groupName, string objName, vector indList, int objVectorIndex, vector &Data); 36 | template int writeGroupDataset(string fileName, 37 | string groupName, string objName, vector &Data, int flag2d = 0, int dim0 = 0, int dim1 = 0); 38 | 39 | void createNewFile(string fileName); 40 | void createNewGroup(string fileName, string groupName); 41 | 42 | private: 43 | // methods 44 | unsigned long hash_djb2( string str ) 45 | { 46 | const char *cstr = str.c_str(); 47 | unsigned long hash = 5381; 48 | int c; 49 | 50 | while ((c = *cstr++)) 51 | hash = ((hash << 5) + hash) + c; 52 | return hash; 53 | } 54 | 55 | void makeNewMaskFile( string maskFileName, vector snapFilenames ); 56 | void loadAllChunksWithMask( string maskFileName, vector snapFilenames ); 57 | void loadAllChunksNoMask( vector snapFilenames ); 58 | 59 | struct cameraParams { 60 | float zMin; 61 | float zMax; 62 | float yMin; 63 | float yMax; 64 | float xMin; 65 | float xMax; 66 | }; 67 | 68 | void calcSubCamera( struct cameraParams &cP, int jobNum ); 69 | void convertUthermToKelvin( vector &utherm, vector &nelec ); 70 | 71 | // data 72 | string fileBase; 73 | 74 | hid_t HDF_Type; 75 | hid_t HDF_FileID; 76 | hid_t HDF_GroupID; 77 | hid_t HDF_DatasetID; 78 | hid_t HDF_AttributeID; 79 | 80 | hid_t HDF_DataspaceID; 81 | hid_t HDF_MemspaceID; 82 | 83 | hsize_t HDF_Dims; 84 | hsize_t HDF_Dims_2D[2]; 85 | }; 86 | 87 | #endif 88 | -------------------------------------------------------------------------------- /src/fileio.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fileio.h 3 | * dnelson 4 | */ 5 | 6 | #ifndef AREPO_RT_FILEIO_H 7 | #define AREPO_RT_FILEIO_H 8 | 9 | #include "ArepoRT.h" 10 | 11 | // configuration options 12 | class ConfigSet { 13 | public: 14 | // construction 15 | ConfigSet() { 16 | delim = "="; 17 | comment = "%"; 18 | } 19 | 20 | // methods 21 | void ReadFile(string cfgfile); 22 | void print(); 23 | 24 | template T readValue(const string &key) const; 25 | template T readValue(const string &key, const T &defaultValue) const; 26 | 27 | void splitStrArray(const string str, float *rgb); // size 3 28 | 29 | // Input/Output 30 | string imageFile, rawRGBFile; 31 | string filename, paramFilename; 32 | bool writeRGB8bit, writeRGB16bit, writeRGBA8bit; 33 | 34 | bool dumpMeshText, dumpMeshBinary, dumpMeshCells; 35 | 36 | // General 37 | int nTasks, nCores; 38 | bool quickRender, verbose, openWindow; 39 | 40 | int totNumJobs, curJobNum; 41 | int jobExpansionFac, expandedJobNum; 42 | string maskFileBase; 43 | float maskPadFac; 44 | 45 | // Frame/Camera 46 | int imageXPixels, imageYPixels; 47 | float swScale; // screenWindow mult factor * [-1,1] 48 | 49 | string cameraType; 50 | float cameraFOV; 51 | float cameraPosition[3], cameraLookAt[3], cameraUp[3]; 52 | 53 | // Data Processing 54 | float recenterBoxCoords[3]; 55 | bool convertUthermToKelvin; 56 | bool takeLogUtherm, takeLogDens; 57 | 58 | // Transfer Functions 59 | int readPartType; 60 | vector tfSet; 61 | 62 | // Animation 63 | vector kfSet; // key frames 64 | 65 | int startFrame, numFrames; 66 | float timePerFrame; 67 | float minScale, maxScale; // scale all RGB values from [min,max]->[0,1] 68 | float minAlpha, maxAlpha; // scale raw density integrals from [min,max]->[0,1] and write as alpha channel 69 | 70 | // Render 71 | bool drawBBox, drawTetra, drawVoronoi, drawSphere; 72 | bool projColDens; 73 | 74 | int nTreeNGB; 75 | float viStepSize; 76 | float rayMaxT; 77 | float rgbLine[3], rgbTetra[3], rgbVoronoi[3]; 78 | float rgbAbsorb[3]; 79 | 80 | private: 81 | // for reading config file 82 | map parsedParams; 83 | 84 | string delim, comment; 85 | 86 | typedef map::iterator map_i; 87 | typedef map::const_iterator map_ci; 88 | 89 | template static T string_to_T(const string& str); 90 | }; 91 | 92 | bool ReadFloatFile(const char *filename, vector *values); 93 | bool WriteFloatFile(const char *filename, float *values, int nx, int ny); 94 | int parseSceneFile(const string &filename, int &nx, int &ny, int &nz, vector *data); 95 | 96 | int loadDiscreteColorTable(const string &filename, vector *colorTableVals); 97 | 98 | void WriteImage(const string &name, float *pixels, float *alpha, int XRes, int YRes, 99 | int totalXRes, int totalYRes, int xOffset, int yOffset); 100 | 101 | #endif 102 | -------------------------------------------------------------------------------- /tests/param_tng100_cutout.txt: -------------------------------------------------------------------------------- 1 | % Arepo Parameter File (ArepoVTK Testing) 2 | 3 | % ---- Relevant for ArepoVTK: ---- 4 | 5 | ICFormat 3 % inputs are HDF5 snapshots 6 | MaxMemSize 500 % sets maximum memory use in MByte 7 | %BoxSize 75000.0 % TNG100* 8 | BoxSize 2000.0 % we re-center to place the system at xyz=1000 9 | 10 | % ---- System of units ---- 11 | 12 | UnitLength_in_cm 3.085678e21 % 1.0 kpc 13 | UnitMass_in_g 1.989e43 % 1.0e10 solar masses 14 | UnitVelocity_in_cm_per_s 1e5 % 1 km/sec 15 | GravityConstantInternal 0 16 | 17 | % ---- Unused in ArepoVTK: ---- 18 | 19 | InitCondFile ./dummy 20 | OutputDir ./output 21 | 22 | SnapshotFileBase snap 23 | OutputListFilename output_list.txt 24 | 25 | SnapFormat 3 26 | 27 | TimeLimitCPU 0 28 | CpuTimeBetRestartFile 0 % unused 29 | ResubmitOn 0 % unused 30 | ResubmitCommand z % unused 31 | 32 | MultipleDomains 1 33 | TopNodeFactor 5 34 | ActivePartFracForNewDomainDecomp 0.1 35 | 36 | CellShapingFactor 0.2 % sets threshold for CM-displacement 37 | CellShapingSpeed 0.5 % sets speed of CM correction 38 | 39 | TimeBegin 0.0 % Begin of the simulation 40 | TimeMax 1.0 % End of the simulation 41 | 42 | ComovingIntegrationOn 0 43 | PeriodicBoundariesOn 1 44 | CoolingOn 0 45 | StarformationOn 0 46 | 47 | Omega0 0 48 | OmegaLambda 0 49 | OmegaBaryon 0 50 | HubbleParam 1.0 51 | 52 | OutputListOn 0 53 | TimeBetSnapshot 0.1 54 | TimeOfFirstSnapshot 0.0 55 | TimeBetStatistics 0.01 56 | NumFilesPerSnapshot 1 57 | NumFilesWrittenInParallel 1 58 | 59 | TypeOfTimestepCriterion 0 60 | ErrTolIntAccuracy 0.025 61 | CourantFac 0.4 62 | MaxSizeTimestep 1e-2 63 | MinSizeTimestep 1e-10 64 | 65 | MinimumDensityOnStartUp 1.0e-20 66 | LimitUBelowThisDensity 1.0e-20 67 | LimitUBelowCertainDensityToThisValue 1.0 68 | 69 | InitGasTemp 0 70 | MinGasTemp 0 71 | MinEgySpec 0 72 | 73 | TypeOfOpeningCriterion 1 74 | ErrTolTheta 0.7 75 | ErrTolForceAcc 0.0025 76 | 77 | DesNumNgb 32 78 | MaxNumNgbDeviation 2 79 | 80 | %---- Gravitational softening lengths 81 | 82 | GasSoftFactor 1.5 83 | 84 | SofteningComovingType0 1.0 % obsolete 85 | SofteningComovingType1 0.0 86 | SofteningComovingType2 0.0 87 | SofteningComovingType3 0.0 88 | SofteningComovingType4 0.0 89 | SofteningComovingType5 0.0 90 | 91 | SofteningMaxPhysType0 1.0 92 | SofteningMaxPhysType1 0.0 93 | SofteningMaxPhysType2 0.0 94 | SofteningMaxPhysType3 0.0 95 | SofteningMaxPhysType4 0.0 96 | SofteningMaxPhysType5 0.0 97 | 98 | SofteningTypeOfPartType0 0 99 | SofteningTypeOfPartType1 1 100 | SofteningTypeOfPartType2 1 101 | SofteningTypeOfPartType3 1 102 | SofteningTypeOfPartType4 1 103 | SofteningTypeOfPartType5 1 104 | 105 | % End 106 | 107 | -------------------------------------------------------------------------------- /tests/config_2b.txt: -------------------------------------------------------------------------------- 1 | % Sample ArepoVTK Configuration File 2 | 3 | % Input/Output 4 | % ------------ 5 | imageFile = frame2b.png % output: TGA/PNG image filename 6 | filename = tests/grid_2 % input: AREPO hdf5 snapshot 7 | paramFilename = tests/param.txt % input: AREPO parameterfile 8 | 9 | % General 10 | % ------- 11 | nCores = 4 % number of cores to use (0=all) 12 | nTasks = 64 % number of tasks/threads to run (0=auto) 13 | quickRender = false % unused 14 | openWindow = false % unused 15 | verbose = false % report more information 16 | totNumJobs = 0 % set >1 to split single image render across multiple jobs 17 | maskFileBase = mask % create/use maskfile for job based frustrum culling 18 | maskPadFac = 0.0 % frustrum padding factor in code spatial units 19 | dumpMeshCells = false % write cell positions and gradients to stdout 20 | 21 | % Frame/Camera 22 | % ------------ 23 | imageXPixels = 600 % frame resolution (X), e.g. 1024, 1920 24 | imageYPixels = 600 % frame resolution (Y), e.g. 768, 1080 25 | swScale = 0.7 % screenWindow mult factor * [-1,1] 26 | % 0.52 ortho face, 0.80 angled above, boxsize/2 in 27 | % general if centering camera at [boxsize/2,boxsize/2,0] 28 | cameraFOV = 0.0 % degrees (0=orthographic camera) 29 | cameraPosition = 0.7 0.8 -0.4 % (XYZ) camera position in world coord system 30 | cameraLookAt = 0.5 0.5 0.5 % (XYZ) point centered in camera FOV 31 | cameraUp = 0.0 1.0 0.0 % (XYZ) camera "up" vector 32 | 33 | % Data Processing 34 | % --------------- 35 | recenterBoxCoords = -1 -1 -1 % (XYZ) shift all points for new center (-1 tuple=disable) 36 | convertUthermToKelvin = false % convert SphP.Utherm field to temp in Kelvin 37 | 38 | % Transfer Function 39 | % ----------------- 40 | addTF_01 = constant Density 1.0 0.2 0.0 41 | 42 | % Animation 43 | % --------- 44 | numFrames = 1 % total number of frames 45 | timePerFrame = 1.0 % establish unit system of time/frame 46 | 47 | % Render 48 | % ------ 49 | drawBBox = true % draw simulation bounding box 50 | drawTetra = false % draw delaunay tetrahedra 51 | drawVoronoi = true % draw voronoi polyhedra faces 52 | projColDens = false % integrate quantities (density, etc) along each path 53 | % length, to make e.g. a "projected column density" image 54 | viStepSize = 0.05 % volume integration sub-stepping size (0=disabled) 55 | % in (Arepo) code units 56 | rayMaxT = 0.0 % maximum ray integration parametric length 57 | rgbLine = 1.0 1.0 1.0 % (RGB) bounding box 58 | rgbTetra = 0.02 0.0 0.0 % (RGB) tetra edges 59 | rgbVoronoi = 0.02 0.02 0.02 % (RGB) voronoi edges 60 | rgbAbsorb = 0.0 0.0 0.0 % (RGB) absorption 61 | 62 | % End. 63 | -------------------------------------------------------------------------------- /tests/config_2.txt: -------------------------------------------------------------------------------- 1 | % Sample ArepoVTK Configuration File 2 | 3 | % Input/Output 4 | % ------------ 5 | imageFile = frame2.png % output: TGA/PNG image filename 6 | filename = tests/grid_2 % input: AREPO hdf5 snapshot 7 | paramFilename = tests/param.txt % input: AREPO parameterfile 8 | 9 | % General 10 | % ------- 11 | nCores = 2 % number of cores to use (0=all) 12 | nTasks = 40 % number of tasks/threads to run (0=auto) 13 | quickRender = false % unused 14 | openWindow = false % unused 15 | verbose = false % report more information 16 | totNumJobs = 0 % set >1 to split single image render across multiple jobs 17 | maskFileBase = mask % create/use maskfile for job based frustrum culling 18 | maskPadFac = 0.0 % frustrum padding factor in code spatial units 19 | dumpMeshCells = false % write cell positions and gradients to stdout 20 | 21 | % Frame/Camera 22 | % ------------ 23 | imageXPixels = 600 % frame resolution (X), e.g. 1024, 1920 24 | imageYPixels = 600 % frame resolution (Y), e.g. 768, 1080 25 | swScale = 0.52 % screenWindow mult factor * [-1,1] 26 | % 0.52 ortho face, 0.80 angled above, boxsize/2 in 27 | % general if centering camera at [boxsize/2,boxsize/2,0] 28 | cameraFOV = 0.0 % degrees (0=orthographic camera) 29 | cameraPosition = 0.5 0.5 1e-2 % (XYZ) camera position in world coord system 30 | cameraLookAt = 0.5 0.5 0.5 % (XYZ) point centered in camera FOV 31 | cameraUp = 0.0 1.0 0.0 % (XYZ) camera "up" vector 32 | 33 | % Data Processing 34 | % --------------- 35 | recenterBoxCoords = -1 -1 -1 % (XYZ) shift all points for new center (-1 tuple=disable) 36 | convertUthermToKelvin = false % convert SphP.Utherm field to temp in Kelvin 37 | 38 | % Transfer Function 39 | % ----------------- 40 | addTF_01 = constant_table Density idl_33_blue-red 0.5 20 41 | 42 | % Animation 43 | % --------- 44 | numFrames = 1 % total number of frames 45 | timePerFrame = 1.0 % establish unit system of time/frame 46 | 47 | % Render 48 | % ------ 49 | drawBBox = true % draw simulation bounding box 50 | drawTetra = false % draw delaunay tetrahedra 51 | drawVoronoi = true % draw voronoi polyhedra faces 52 | projColDens = false % integrate quantities (density, etc) along each path 53 | % length, to make e.g. a "projected column density" image 54 | viStepSize = 0 % volume integration sub-stepping size (0=disabled) 55 | % in (Arepo) code units 56 | rayMaxT = 0.0 % maximum ray integration parametric length 57 | rgbLine = 0.6 0.6 0.6 % (RGB) bounding box 58 | rgbTetra = 0.02 0.0 0.0 % (RGB) tetra edges 59 | rgbVoronoi = 0.02 0.02 0.02 % (RGB) voronoi edges 60 | rgbAbsorb = 0.0 0.0 0.0 % (RGB) absorption 61 | 62 | % End. 63 | -------------------------------------------------------------------------------- /src/geometry.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * geometry.cpp 3 | * dnelson 4 | */ 5 | 6 | #include "ArepoRT.h" 7 | #include "geometry.h" 8 | 9 | //BBox 10 | 11 | bool BBox::Edges(vector *edges) 12 | { 13 | //edges->push_back(Line(Point(pMin.x,pMin.y,pMin.z),Point(pMax.x,pMax.y,pMax.z))); //LL->UR diag debug 14 | 15 | edges->push_back(Line(Point(pMin.x,pMin.y,pMin.z),Point(pMin.x,pMax.y,pMin.z))); //1 - FF Left 16 | edges->push_back(Line(Point(pMin.x,pMax.y,pMin.z),Point(pMax.x,pMax.y,pMin.z))); //2 - FF Top 17 | edges->push_back(Line(Point(pMax.x,pMax.y,pMin.z),Point(pMax.x,pMin.y,pMin.z))); //3 - FF Right 18 | edges->push_back(Line(Point(pMax.x,pMin.y,pMin.z),Point(pMin.x,pMin.y,pMin.z))); //4 - FF Bottom 19 | edges->push_back(Line(Point(pMin.x,pMax.y,pMin.z),Point(pMin.x,pMax.y,pMax.z))); //5 - connect 1/2+12/9 20 | edges->push_back(Line(Point(pMax.x,pMax.y,pMin.z),Point(pMax.x,pMax.y,pMax.z))); //6 - connect 2/3+9/10 21 | edges->push_back(Line(Point(pMax.x,pMin.y,pMin.z),Point(pMax.x,pMin.y,pMax.z))); //7 - connect 3/4+10/11 22 | edges->push_back(Line(Point(pMin.x,pMin.y,pMin.z),Point(pMin.x,pMin.y,pMax.z))); //8 - connect 4/1+11/12 23 | edges->push_back(Line(Point(pMin.x,pMin.y,pMax.z),Point(pMin.x,pMax.y,pMax.z))); //9 - RF Left 24 | edges->push_back(Line(Point(pMin.x,pMax.y,pMax.z),Point(pMax.x,pMax.y,pMax.z))); //10 - RF Top 25 | edges->push_back(Line(Point(pMax.x,pMax.y,pMax.z),Point(pMax.x,pMin.y,pMax.z))); //11 - RF Right 26 | edges->push_back(Line(Point(pMax.x,pMin.y,pMax.z),Point(pMin.x,pMin.y,pMax.z))); //12 - RF Bottom 27 | 28 | return true; 29 | } 30 | 31 | bool BBox::IntersectP(const Ray &ray, double *hitt0, 32 | double *hitt1) const 33 | { 34 | double t0 = ray.min_t, t1 = ray.max_t; 35 | 36 | IF_DEBUG(cout << "BBox:IntersectP(t0 = " << t0 << " t1 = " << t1 << ") ray o.x=" << ray.o.x 37 | << " o.y=" << ray.o.y << " o.z=" << ray.o.z << " d.x=" << ray.d.x 38 | << " d.y=" << ray.d.y << " d.z=" << ray.d.z << endl); 39 | 40 | for (int i = 0; i < 3; ++i) { 41 | // Update interval for _i_th bounding box slab 42 | double invRayDir = 1.0 / ray.d[i]; 43 | double tNear = (pMin[i] - ray.o[i]) * invRayDir; 44 | double tFar = (pMax[i] - ray.o[i]) * invRayDir; 45 | 46 | // Update parametric interval from slab intersection $t$s 47 | if (tNear > tFar) swap(tNear, tFar); 48 | t0 = tNear > t0 ? tNear : t0; 49 | t1 = tFar < t1 ? tFar : t1; 50 | IF_DEBUG(cout << " i[" << i << "] t0 = " << t0 << " t1 = " << t1 << endl); 51 | if (t0 > t1) return false; 52 | } 53 | if (hitt0) *hitt0 = t0; 54 | if (hitt1) *hitt1 = t1; 55 | return true; 56 | } 57 | 58 | BBox Union(const BBox &b, const Point &p) { 59 | BBox ret = b; 60 | ret.pMin.x = min(b.pMin.x, p.x); 61 | ret.pMin.y = min(b.pMin.y, p.y); 62 | ret.pMin.z = min(b.pMin.z, p.z); 63 | ret.pMax.x = max(b.pMax.x, p.x); 64 | ret.pMax.y = max(b.pMax.y, p.y); 65 | ret.pMax.z = max(b.pMax.z, p.z); 66 | return ret; 67 | } 68 | 69 | 70 | BBox Union(const BBox &b, const BBox &b2) { 71 | BBox ret; 72 | ret.pMin.x = min(b.pMin.x, b2.pMin.x); 73 | ret.pMin.y = min(b.pMin.y, b2.pMin.y); 74 | ret.pMin.z = min(b.pMin.z, b2.pMin.z); 75 | ret.pMax.x = max(b.pMax.x, b2.pMax.x); 76 | ret.pMax.y = max(b.pMax.y, b2.pMax.y); 77 | ret.pMax.z = max(b.pMax.z, b2.pMax.z); 78 | return ret; 79 | } 80 | -------------------------------------------------------------------------------- /tests/config_cosmo_box.txt: -------------------------------------------------------------------------------- 1 | % Sample ArepoVTK Configuration File 2 | 3 | % Input/Output 4 | % ------------ 5 | imageFile = frame_cosmo_box.png 6 | filename = arepo/run/examples/cosmo_box_star_formation_3d/output/snap_005 7 | paramFilename = tests/param_cosmo_box.txt 8 | 9 | % General 10 | % ------- 11 | nCores = 20 % number of cores to use (0=all) 12 | nTasks = 80 % number of tasks/threads to run (0=auto) 13 | quickRender = false % unused 14 | openWindow = false % unused 15 | verbose = false % report more information 16 | totNumJobs = 0 % set >=1 to split single image render across multiple jobs (0=disable) 17 | maskFileBase = mask % create/use maskfile for job based frustrum culling 18 | maskPadFac = 0.0 % frustrum padding factor in code spatial units 19 | 20 | % Frame/Camera 21 | % ------------ 22 | imageXPixels = 800 % frame resolution (X), e.g. 1024, 1920 23 | imageYPixels = 800 % frame resolution (Y), e.g. 768, 1080 24 | swScale = 1.0 % screenWindow mult factor * [-1,1] 25 | cameraType = perspective % ortho, persp, fisheye, env 26 | cameraFOV = 17.0 % degrees (0=orthographic camera) 27 | cameraPosition = 12000 40000 5000 % (XYZ) camera position in world coord system 28 | cameraLookAt = 3750 3750 3750 % (XYZ) point centered in camera FOV (the box center) 29 | cameraUp = 0.0 1.0 0.0 % (XYZ) camera "up" vector 30 | 31 | % Data Processing 32 | % --------------- 33 | recenterBoxCoords = -1 -1 -1 % (XYZ) shift all points for new center (-1 tuple=disable) 34 | convertUthermToKelvin = true % convert SphP.Utherm field to temp in Kelvin 35 | 36 | % Transfer Function 37 | % ----------------- 38 | addTF_01 = gaussian_table Temp idl_33_blue-red 1000 90000 2000 100 39 | addTF_02 = gaussian_table Temp mpl_magma 10000 90000 20000 2000 40 | addTF_03 = gaussian_table Temp mpl_magma 10000 90000 60000 4000 41 | addTF_04 = gaussian_table Temp mpl_magma 10000 90000 80000 5000 42 | addTF_05 = gaussian_table Temp idl_3_red-temp 200000 500000 350000 30000 43 | 44 | % Animation 45 | % --------- 46 | numFrames = 1 % total number of frames 47 | 48 | % Render 49 | % ------ 50 | drawBBox = true % draw simulation bounding box 51 | drawTetra = false % draw delaunay tetrahedra 52 | drawVoronoi = false % draw voronoi polyhedra faces 53 | projColDens = false % integrate quantities (density, etc) along each path 54 | % length, to make e.g. a "projected column density" image 55 | nTreeNGB = 0 % use tree-based search integrator instead of mesh (0=disabled) 56 | viStepSize = 20.0 % volume integration sub-stepping size (0=disabled) 57 | % in (Arepo) code units 58 | rayMaxT = 1000000.0 % maximum ray integration parametric length 59 | rgbLine = 1000 1000 1000 % (RGB) bounding box 60 | rgbTetra = 0.01 0.01 0.01 % (RGB) tetra edges 61 | rgbVoronoi = 0.0 0.05 0.0 % (RGB) voronoi edges 62 | rgbAbsorb = 0.0 0.0 0.0 % (RGB) absorption 63 | 64 | % End. 65 | 66 | -------------------------------------------------------------------------------- /tests/config_3.txt: -------------------------------------------------------------------------------- 1 | % Sample ArepoVTK Configuration File 2 | 3 | % Input/Output 4 | % ------------ 5 | imageFile = frame3.png % output: TGA/PNG image filename 6 | filename = tests/grid_3 7 | paramFilename = tests/param.txt 8 | 9 | % General 10 | % ------- 11 | nCores = 2 % number of cores to use (0=all) 12 | nTasks = 8 % number of tasks/threads to run (0=auto) 13 | quickRender = false % unused 14 | openWindow = false % unused 15 | verbose = true % report more information 16 | totNumJobs = 0 % set >1 to split single image render across multiple jobs 17 | maskFileBase = mask % create/use maskfile for job based frustrum culling 18 | maskPadFac = 0.0 % frustrum padding factor in code spatial units 19 | 20 | % Frame/Camera 21 | % ------------ 22 | imageXPixels = 800 % frame resolution (X), e.g. 1024, 1920 23 | imageYPixels = 800 % frame resolution (Y), e.g. 768, 1080 24 | swScale = 0.26 % screenWindow mult factor * [-1,1] 25 | % 0.52 ortho face, 0.80 angled above, boxsize/2 in 26 | % general if centering camera at [boxsize/2,boxsize/2,0] 27 | cameraFOV = 0.0 % degrees (0=orthographic camera) 28 | cameraPosition = 0.5 0.5 0.0 % (XYZ) camera position in world coord system 29 | cameraLookAt = 0.5 0.5 0.5 % (XYZ) point centered in camera FOV 30 | cameraUp = 0.0 0.0 1.0 % (XYZ) camera "up" vector 31 | 32 | % Data Processing 33 | % --------------- 34 | recenterBoxCoords = -1 -1 -1 % (XYZ) shift all points for new center (-1 tuple=disable) 35 | convertUthermToKelvin = false % convert SphP.Utherm field to temp in Kelvin 36 | 37 | % Transfer Function 38 | % ----------------- 39 | %addTF_01 = constant Density 1e6 0.0 0.0 40 | addTF_02 = gaussian Density 15.0 0.5 red 41 | addTF_03 = gaussian Density 4 0.25 0.0 0.1 0.0 42 | addTF_04 = gaussian Density 2.0 0.0625 blue 43 | %addTF_01 = gaussian_table Density idl_33_blue-red 0.1 10.0 3.0 0.2 44 | %addTF_02 = gaussian_table Density idl_33_blue-red 12.0 20.0 16.0 1.0 45 | %addTF_03 = gaussian_table Density cubehelix_1 1.0 2.0 1.5 0.2 46 | 47 | % Animation 48 | % --------- 49 | numFrames = 1 % total number of frames 50 | timePerFrame = 1.0 % establish unit system of time/frame 51 | 52 | % Render 53 | % ------ 54 | drawBBox = false % draw simulation bounding box 55 | drawTetra = false % draw delaunay tetrahedra 56 | drawVoronoi = false % draw voronoi polyhedra faces 57 | projColDens = false % integrate quantities (density, etc) along each path 58 | % length, to make e.g. a "projected column density" image 59 | viStepSize = 0.01 % volume integration sub-stepping size (0=disabled) 60 | % in (Arepo) code units 61 | rayMaxT = 0.0 % maximum ray integration parametric length 62 | rgbLine = 0.1 0.1 0.1 % (RGB) bounding box 63 | rgbTetra = 0.02 0.0 0.0 % (RGB) tetra edges 64 | rgbVoronoi = 0.0 0.02 0.0 % (RGB) voronoi edges 65 | rgbAbsorb = 0.0 0.0 0.0 % (RGB) absorption 66 | 67 | % End. 68 | 69 | -------------------------------------------------------------------------------- /tests/param.txt: -------------------------------------------------------------------------------- 1 | % Arepo Parameter File (ArepoVTK Testing) 2 | 3 | %---- Relevant files 4 | 5 | InitCondFile ./dummy 6 | OutputDir ./output 7 | 8 | SnapshotFileBase snap 9 | OutputListFilename output_list.txt 10 | 11 | %---- File formats 12 | 13 | ICFormat 3 14 | SnapFormat 3 15 | 16 | %---- CPU-time limits 17 | 18 | TimeLimitCPU 81000 % in seconds 19 | CpuTimeBetRestartFile 7200 % in seconds 20 | ResubmitOn 0 21 | ResubmitCommand my-scriptfile 22 | 23 | %----- Memory alloction 24 | 25 | MaxMemSize 500 % sets maximum memory use in MByte 26 | 27 | %----- New 28 | 29 | MultipleDomains 1 30 | TopNodeFactor 5 31 | ActivePartFracForNewDomainDecomp 0.1 32 | 33 | %----- Mesh regularization options 34 | 35 | CellShapingFactor 0.2 % sets threshold for CM-displacement 36 | CellShapingSpeed 0.5 % sets speed of CM correction 37 | 38 | %---- Caracteristics of run 39 | 40 | TimeBegin 0.0 % Begin of the simulation 41 | TimeMax 1.0 % End of the simulation 42 | BoxSize 1.0 43 | 44 | %---- Basic code options that set the type of simulation 45 | 46 | ComovingIntegrationOn 0 47 | PeriodicBoundariesOn 1 48 | CoolingOn 0 49 | StarformationOn 0 50 | 51 | %---- Cosmological parameters 52 | 53 | Omega0 0 54 | OmegaLambda 0 55 | OmegaBaryon 0 56 | HubbleParam 1.0 57 | 58 | %---- Output frequency and output paramaters 59 | 60 | OutputListOn 0 61 | TimeBetSnapshot 0.1 62 | TimeOfFirstSnapshot 0.0 63 | TimeBetStatistics 0.01 64 | NumFilesPerSnapshot 1 65 | NumFilesWrittenInParallel 1 66 | 67 | %---- Accuracy of time integration 68 | 69 | TypeOfTimestepCriterion 0 70 | ErrTolIntAccuracy 0.025 71 | CourantFac 0.4 72 | MaxSizeTimestep 1e-2 73 | MinSizeTimestep 1e-10 74 | 75 | %---- Treatment of empty space and temperature limits 76 | 77 | MinimumDensityOnStartUp 1.0e-20 78 | LimitUBelowThisDensity 1.0e-20 79 | LimitUBelowCertainDensityToThisValue 1.0 80 | 81 | InitGasTemp 0 82 | MinGasTemp 0 83 | MinEgySpec 0 84 | 85 | %---- Tree algorithm, force accuracy, domain update frequency 86 | 87 | TypeOfOpeningCriterion 1 88 | ErrTolTheta 0.7 89 | ErrTolForceAcc 0.0025 90 | 91 | %---- Initial density estimate 92 | 93 | DesNumNgb 32 94 | MaxNumNgbDeviation 2 95 | 96 | %---- System of units 97 | 98 | UnitLength_in_cm 1.0 99 | UnitMass_in_g 1.0 100 | UnitVelocity_in_cm_per_s 1.0 101 | GravityConstantInternal 0 102 | 103 | %---- Gravitational softening lengths 104 | 105 | GasSoftFactor 1.5 106 | 107 | SofteningComovingType0 1.0 % obsolete 108 | SofteningComovingType1 0.0 109 | SofteningComovingType2 0.0 110 | SofteningComovingType3 0.0 111 | SofteningComovingType4 0.0 112 | SofteningComovingType5 0.0 113 | 114 | SofteningMaxPhysType0 1.0 115 | SofteningMaxPhysType1 0.0 116 | SofteningMaxPhysType2 0.0 117 | SofteningMaxPhysType3 0.0 118 | SofteningMaxPhysType4 0.0 119 | SofteningMaxPhysType5 0.0 120 | 121 | SofteningTypeOfPartType0 0 122 | SofteningTypeOfPartType1 1 123 | SofteningTypeOfPartType2 1 124 | SofteningTypeOfPartType3 1 125 | SofteningTypeOfPartType4 1 126 | SofteningTypeOfPartType5 1 127 | 128 | % End 129 | 130 | -------------------------------------------------------------------------------- /tests/param_cosmo_box.txt: -------------------------------------------------------------------------------- 1 | % Arepo Parameter File (ArepoVTK Testing) 2 | 3 | %---- Relevant files 4 | 5 | InitCondFile ./dummy 6 | OutputDir ./output 7 | 8 | SnapshotFileBase snap 9 | OutputListFilename output_list.txt 10 | 11 | %---- File formats 12 | 13 | ICFormat 3 14 | SnapFormat 3 15 | 16 | %---- CPU-time limits 17 | 18 | TimeLimitCPU 81000 % in seconds 19 | CpuTimeBetRestartFile 7200 % in seconds 20 | ResubmitOn 0 21 | ResubmitCommand my-scriptfile 22 | 23 | %----- Memory alloction 24 | 25 | MaxMemSize 500 % sets maximum memory use in MByte 26 | 27 | %----- New 28 | 29 | MultipleDomains 1 30 | TopNodeFactor 5 31 | ActivePartFracForNewDomainDecomp 0.1 32 | 33 | %----- Mesh regularization options 34 | 35 | CellShapingFactor 0.2 % sets threshold for CM-displacement 36 | CellShapingSpeed 0.5 % sets speed of CM correction 37 | 38 | %---- Caracteristics of run 39 | 40 | TimeBegin 0.0 % Begin of the simulation 41 | TimeMax 1.0 % End of the simulation 42 | BoxSize 7500 % examples/cosmo_box_star_formation_3d 43 | 44 | %---- Basic code options that set the type of simulation 45 | 46 | ComovingIntegrationOn 0 47 | PeriodicBoundariesOn 1 48 | CoolingOn 0 49 | StarformationOn 0 50 | 51 | %---- Cosmological parameters 52 | 53 | Omega0 0 54 | OmegaLambda 0 55 | OmegaBaryon 0 56 | HubbleParam 1.0 57 | 58 | %---- Output frequency and output paramaters 59 | 60 | OutputListOn 0 61 | TimeBetSnapshot 0.1 62 | TimeOfFirstSnapshot 0.0 63 | TimeBetStatistics 0.01 64 | NumFilesPerSnapshot 1 65 | NumFilesWrittenInParallel 1 66 | 67 | %---- Accuracy of time integration 68 | 69 | TypeOfTimestepCriterion 0 70 | ErrTolIntAccuracy 0.025 71 | CourantFac 0.4 72 | MaxSizeTimestep 1e-2 73 | MinSizeTimestep 1e-10 74 | 75 | %---- Treatment of empty space and temperature limits 76 | 77 | MinimumDensityOnStartUp 1.0e-20 78 | LimitUBelowThisDensity 1.0e-20 79 | LimitUBelowCertainDensityToThisValue 1.0 80 | 81 | InitGasTemp 0 82 | MinGasTemp 0 83 | MinEgySpec 0 84 | 85 | %---- Tree algorithm, force accuracy, domain update frequency 86 | 87 | TypeOfOpeningCriterion 1 88 | ErrTolTheta 0.7 89 | ErrTolForceAcc 0.0025 90 | 91 | %---- Initial density estimate 92 | 93 | DesNumNgb 32 94 | MaxNumNgbDeviation 2 95 | 96 | %---- System of units 97 | UnitLength_in_cm 3.085678e21 % 1.0 kpc 98 | UnitMass_in_g 1.989e43 % 1.0e10 solar masses 99 | UnitVelocity_in_cm_per_s 1e5 % 1 km/sec 100 | GravityConstantInternal 0 101 | 102 | %---- Gravitational softening lengths 103 | 104 | GasSoftFactor 1.5 105 | 106 | SofteningComovingType0 1.0 % obsolete 107 | SofteningComovingType1 0.0 108 | SofteningComovingType2 0.0 109 | SofteningComovingType3 0.0 110 | SofteningComovingType4 0.0 111 | SofteningComovingType5 0.0 112 | 113 | SofteningMaxPhysType0 1.0 114 | SofteningMaxPhysType1 0.0 115 | SofteningMaxPhysType2 0.0 116 | SofteningMaxPhysType3 0.0 117 | SofteningMaxPhysType4 0.0 118 | SofteningMaxPhysType5 0.0 119 | 120 | SofteningTypeOfPartType0 0 121 | SofteningTypeOfPartType1 1 122 | SofteningTypeOfPartType2 1 123 | SofteningTypeOfPartType3 1 124 | SofteningTypeOfPartType4 1 125 | SofteningTypeOfPartType5 1 126 | 127 | % End 128 | 129 | -------------------------------------------------------------------------------- /src/transfer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * transfer.h 3 | * dnelson 4 | */ 5 | 6 | #ifndef AREPO_RT_TRANSFER_H 7 | #define AREPO_RT_TRANSFER_H 8 | 9 | #include "spectrum.h" 10 | 11 | // TODO: bit field approach, such that TransferFunction keeps a record of all the 12 | // SphP fields it will need to evaluate Lve(), and returns this upon request 13 | // to AdvanceRayOneCell() which will use it to form vals[] of the needed elements 14 | 15 | #define TF_VAL_DENS 0 16 | #define TF_VAL_TEMP 1 17 | #define TF_VAL_VMAG 2 18 | #define TF_VAL_ENTROPY 3 19 | #define TF_VAL_METAL 4 20 | #define TF_VAL_SZY 5 21 | #define TF_VAL_XRAY 6 22 | #define TF_VAL_BMAG 7 23 | #define TF_VAL_SHOCKDEDT 8 24 | 25 | class TransferFunc1D { 26 | public: 27 | TransferFunc1D(short int ty, short int vn, vector ¶ms, vector &spec, string ctName); 28 | ~TransferFunc1D(); 29 | 30 | void CheckReverse(); 31 | bool InRange(const vector &vals); 32 | Spectrum Lve(const vector &vals) const; 33 | 34 | private: 35 | short int valNum; // 1 - density, 2 - temp (etc, 1 greater than defined above) 36 | short int type; // 1 - constant, 2 - tophat, 3 - gaussian, 37 | // 4 - constant (discrete), 5 - tophat (discrete), 6 - gaussian (discrete) 38 | // 7 - linear (interpolation between two colors based on value between min/max) 39 | 40 | // all the following parameters only apply to certain types of transfer functions 41 | bool clamp; // false - return zero outside range 42 | // true - extrapolate constant values above/below range 43 | 44 | float range[2]; // min,max of val to calculate TF on 45 | Spectrum le; 46 | float gaussParam[2]; // mean, sigma 47 | 48 | // discrete only 49 | string colorTable; 50 | int colorTableLen; 51 | vector colorTableVals; 52 | float ctMinMax[2]; 53 | float ctStep; 54 | 55 | // linear only 56 | float rgb_a[3]; 57 | float rgb_b[3]; 58 | }; 59 | 60 | class TransferFunction { 61 | public: 62 | // construction 63 | TransferFunction(const Spectrum &sig_a); 64 | ~TransferFunction(); 65 | 66 | // methods (one rgb color) 67 | bool AddGaussian(int valNum, float midp, float sigma, Spectrum &spec); 68 | bool AddTophat(int valNum, float min, float max, Spectrum &spec); 69 | bool AddConstant(int valNum, Spectrum &spec); 70 | 71 | // methods (discrete color table) 72 | bool AddConstantDiscrete(int valNum, string ctName, float ctMin, float ctMax); 73 | bool AddTophatDiscrete(int valNum, string ctName, float ctMin, float ctMax, float min, float max); 74 | bool AddGaussianDiscrete(int valNum, string ctName, float ctMin, float ctMax, float midp, float sigma); 75 | 76 | // methods (matplotlib 'linear segmented') 77 | bool AddLinear(int valNum, float min, float max, Spectrum &s_min, Spectrum &s_max); 78 | 79 | // handle inputs 80 | bool AddParseString(string &addTFstr); 81 | 82 | // evaluation 83 | //Spectrum sigma_a(const Point &p, const Vector &, float) const { } 84 | //Spectrum sigma_s(const Point &p, const Vector &, float) const { } 85 | Spectrum sigma_t() const { return sig_t; } 86 | bool InRange(const vector &vals) const; 87 | Spectrum Lve(const vector &vals) const; 88 | //Spectrum tau(const Ray &r, float stepSize, float offset) const { } 89 | 90 | private: 91 | // data 92 | short int numFuncs; 93 | vector f_1D; 94 | 95 | map valNums; 96 | 97 | // tau = scatter + abs 98 | Spectrum sig_a, sig_s, sig_t; 99 | }; 100 | 101 | #endif 102 | -------------------------------------------------------------------------------- /examples/spoon_config_movie.txt: -------------------------------------------------------------------------------- 1 | % Sample ArepoVTK Configuration File 2 | 3 | % Input/Output 4 | % ------------ 5 | imageFile = frames_final/frame_NUMM.tga % output: TGA image filename 6 | rawRGBFile = frame.raw.txt % output: raw dump of floats (debug only) 7 | filename = snapshots/snap_NUM % input: simulation snapshot (no extension) 8 | paramFilename = param.txt % input: Arepo parameter file 9 | 10 | % General 11 | % ------- 12 | nCores = 8 % number of cores to use (0=all) 13 | nTasks = 64 % number of tasks/threads to run (0=auto) 14 | quickRender = false % unused 15 | openWindow = false % unused 16 | verbose = true % report more information 17 | totNumJobs = 0 % set >1 to split single image render across multiple jobs 18 | maskFileBase = mask % create/use maskfile for job based frustrum culling 19 | maskPadFac = 0.0 % frustrum padding factor in code spatial units 20 | 21 | % Frame/Camera 22 | % ------------ 23 | imageXPixels = 1920 % frame resolution (X), e.g. 1024, 1920 24 | imageYPixels = 1080 % frame resolution (Y), e.g. 768, 1080 25 | swScale = 1.0 % screenWindow mult factor * [-1,1] 26 | % want to plot (x,z) or (y,z) 27 | cameraFOV = 20.0 % degrees (0=orthographic camera) 28 | cameraPosition = -3.0 0.5 0.5 % (XYZ) camera position in world coord system 29 | cameraLookAt = 0.5 0.5 0.5 % (XYZ) point centered in camera FOV 30 | cameraUp = 0.0 0.0 1.0 % (XYZ) camera "up" vector 31 | 32 | % Data Processing 33 | % --------------- 34 | recenterBoxCoords = -1 -1 -1 % (XYZ) shift all points for new center (-1 tuple=disable) 35 | convertUthermToKelvin = false % convert SphP.Utherm field to temp in Kelvin 36 | 37 | % Transfer Function 38 | % ----------------- 39 | %addTF_01 = gaussian_table Density cubehelix_1_50 3.1 3.5 3.3 0.1 40 | 41 | addTF_01 = gaussian_table Density idl_33_blue-red 2.05 3.2 2.2 0.1 42 | addTF_02 = gaussian_table Density idl_33_blue-red 2.05 3.2 2.6 0.1 43 | addTF_03 = gaussian_table Density idl_33_blue-red 2.05 3.2 3.0 0.1 44 | 45 | addTF_04 = gaussian_table Density idl_3_red-temp 3.0 12.0 4.0 0.3 46 | addTF_05 = gaussian_table Density idl_3_red-temp 3.0 12.0 6.0 0.3 47 | addTF_06 = gaussian_table Density idl_3_red-temp 3.0 12.0 8.0 0.3 48 | addTF_07 = gaussian_table Density idl_3_red-temp 3.0 12.0 10.0 0.3 49 | 50 | addTF_08 = gaussian Density 800.0 200.0 2.0 2.0 2.0 % non-log spoon 51 | 52 | %addTF_09 = gaussian_table Density idl_13_rainbow 2.02 2.18 2.1 0.02 53 | addTF_09 = gaussian_table Density idl_13_rainbow 1.05 1.95 1.5 0.15 54 | 55 | % Animation 56 | % --------- 57 | numFrames = 1 % total number of frames 58 | timePerFrame = 1.0 % establish unit system of time/frame 59 | 60 | % Render 61 | % ------ 62 | drawBBox = true % draw simulation bounding box 63 | drawTetra = false % draw delaunay tetrahedra 64 | drawVoronoi = false % DO NOT CHANGE 65 | projColDens = false % integrate quantities (density, etc) along each path 66 | % length, to make e.g. a "projected column density" image 67 | viStepSize = 0.0005 % volume integration sub-stepping size (0=disabled) 68 | % in (Arepo) code units 69 | rayMaxT = 10.0 % maximum ray integration parametric length 70 | rgbLine = 0.01 0.01 0.01 % (RGB) bounding box 71 | rgbTetra = 0.01 0.01 0.01 % (RGB) tetra edges 72 | rgbVoronoi = 0.0 0.05 0.0 % (RGB) voronoi edges 73 | rgbAbsorb = 0.0 0.0 0.0 % (RGB) absorption 74 | 75 | % End. 76 | 77 | -------------------------------------------------------------------------------- /src/volume.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * volume.cpp 3 | * dnelson 4 | */ 5 | 6 | #include "volume.h" 7 | #include "spectrum.h" 8 | 9 | // Scene 10 | Scene::Scene(VolumeRegion *vr, ArepoMesh *am, ArepoTree *at) 11 | { 12 | IF_DEBUG(cout << "Scene() constructor." << endl); 13 | 14 | volumeRegion = vr; 15 | arepoMesh = am; 16 | arepoTree = at; 17 | 18 | if (volumeRegion) bound = volumeRegion->WorldBound(); 19 | if (arepoMesh) bound = Union(bound, arepoMesh->WorldBound()); 20 | if (arepoTree) bound = Union(bound, arepoTree->WorldBound()); 21 | } 22 | 23 | Scene::~Scene() 24 | { 25 | delete volumeRegion; 26 | delete arepoMesh; 27 | delete arepoTree; 28 | } 29 | 30 | const BBox &Scene::WorldBound() const 31 | { 32 | return bound; 33 | } 34 | 35 | 36 | VolumeRegion::~VolumeRegion() 37 | { 38 | } 39 | 40 | Spectrum DensityRegion::tau(const Ray &r, float stepSize, float u) const 41 | { 42 | double t0, t1; 43 | float length = r.d.Length(); 44 | if (length == 0.f) return 0.f; 45 | Ray rn(r.o, r.d / length, r.min_t * length, r.max_t * length, r.time); 46 | if (!IntersectP(rn, &t0, &t1)) return 0.; 47 | Spectrum tau(0.0); 48 | t0 += u * stepSize; 49 | while (t0 < t1) { 50 | tau += sigma_t(rn(t0), -rn.d, r.time); 51 | t0 += stepSize; 52 | } 53 | return tau * stepSize; 54 | } 55 | 56 | float VolumeGridDensity::Density(const Point &Pobj) const 57 | { 58 | if (!extent.Inside(Pobj)) return 0; 59 | 60 | // compute voxel coordinates and offsets for Pobj 61 | Vector vox = extent.Offset(Pobj); 62 | vox.x = vox.x * nx - 0.5f; 63 | vox.y = vox.y * ny - 0.5f; 64 | vox.z = vox.z * nz - 0.5f; 65 | 66 | int vx = (int)(vox.x); 67 | int vy = (int)(vox.y); 68 | int vz = (int)(vox.z); 69 | 70 | float dx = vox.x - vx; 71 | float dy = vox.y - vy; 72 | float dz = vox.z - vz; 73 | 74 | IF_DEBUG(cout << " Density: vox.x = " << vox.x << " vox.y = " << vox.y << " vox.z = " << vox.z 75 | << " vx = " << vx << " vy = " << vy << " vz = " << vz << endl); 76 | 77 | // Trilinearly interpolate density values to compute local density 78 | float d00 = Lerp(dx, D(vx, vy, vz), D(vx+1, vy, vz)); 79 | float d10 = Lerp(dx, D(vx, vy+1, vz), D(vx+1, vy+1, vz)); 80 | float d01 = Lerp(dx, D(vx, vy, vz+1), D(vx+1, vy, vz+1)); 81 | float d11 = Lerp(dx, D(vx, vy+1, vz+1), D(vx+1, vy+1, vz+1)); 82 | float d0 = Lerp(dy, d00, d10); 83 | float d1 = Lerp(dy, d01, d11); 84 | 85 | IF_DEBUG(cout << " Density: d00 = " << d00 << " d10 = " << d10 << " d01 = " << d01 << " d11 = " 86 | << d11 << " d0 = " << d0 << " d1 = " << d1 << endl); 87 | return Lerp(dz, d0, d1); 88 | } 89 | 90 | VolumeGridDensity *CreateGridVolumeRegion(const Transform &volume2world, const string &filename) 91 | { 92 | // Initialize common volume region parameters 93 | Spectrum sigma_a = 0.0; 94 | Spectrum sigma_s = 0.0; 95 | Spectrum Le = Spectrum::FromNamed("red"); 96 | Point p0 = Point(0,0,0); 97 | Point p1 = Point(1,1,1); 98 | 99 | int ni,nx,ny,nz; 100 | vector data; 101 | 102 | if (!(ni = parseSceneFile(filename, nx, ny, nz, &data))) { 103 | cout << "ERROR: Couldn't open scene file: " << filename << endl; 104 | return 0; 105 | } 106 | 107 | cout << "Read [" << ni << "] points from scene file: " << filename << endl; 108 | 109 | if (data.empty()) { 110 | cout << "No \"density\" values provided for volume grid?" << endl; 111 | return NULL; 112 | } 113 | if (ni != nx*ny*nz) { 114 | cout << "VolumeGridDensity has " << ni << " density values but nx*ny*nz = " 115 | << nx*ny*nz << endl; 116 | return NULL; 117 | } 118 | 119 | #if defined(DEBUG) && 0 120 | for (int i=0; i < data.size(); i++) 121 | cout << " CGVR data[" << i << "] = " << data[i] << endl; 122 | #endif 123 | 124 | return new VolumeGridDensity(sigma_a, sigma_s, Le, BBox(p0, p1), 125 | volume2world, nx, ny, nz, (float*)&data[0]); 126 | } 127 | 128 | -------------------------------------------------------------------------------- /examples/spoon_config_rot.txt: -------------------------------------------------------------------------------- 1 | % Sample ArepoVTK Configuration File 2 | 3 | % Input/Output 4 | % ------------ 5 | imageFile = frames_rot2/frame_test.tga % output: TGA image filename 6 | rawRGBFile = frame.raw.txt % output: raw dump of floats (debug only) 7 | filename = snapshots/snap_000 % input: simulation snapshot (no extension) 8 | paramFilename = param.txt % input: Arepo parameter file 9 | 10 | % General 11 | % ------- 12 | nCores = 64 % number of cores to use (0=all) 13 | nTasks = 128 % number of tasks/threads to run (0=auto) 14 | quickRender = false % unused 15 | openWindow = false % unused 16 | verbose = true % report more information 17 | totNumJobs = 0 % set >1 to split single image render across multiple jobs 18 | maskFileBase = mask % create/use maskfile for job based frustrum culling 19 | maskPadFac = 0.0 % frustrum padding factor in code spatial units 20 | 21 | % Frame/Camera 22 | % ------------ 23 | imageXPixels = 1920 % frame resolution (X), e.g. 1024, 1920 24 | imageYPixels = 1080 % frame resolution (Y), e.g. 768, 1080 25 | swScale = 1.0 % screenWindow mult factor * [-1,1] 26 | % want to plot (x,z) or (y,z) 27 | cameraFOV = 20.0 % degrees (0=orthographic camera) 28 | cameraPosition = 0.499 0.5 -3.001 % (XYZ) camera position in world coord system 29 | cameraLookAt = 0.5 0.5 0.5 % (XYZ) point centered in camera FOV 30 | cameraUp = 0.0 0.0 1.0 % (XYZ) camera "up" vector 31 | 32 | % Data Processing 33 | % --------------- 34 | recenterBoxCoords = -1 -1 -1 % (XYZ) shift all points for new center (-1 tuple=disable) 35 | convertUthermToKelvin = false % convert SphP.Utherm field to temp in Kelvin 36 | 37 | % Transfer Function 38 | % ----------------- 39 | %addTF_01 = gaussian_table Density cubehelix_1_50 3.1 3.5 3.3 0.1 40 | 41 | addTF_01 = gaussian_table Density idl_33_blue-red 2.05 3.2 2.2 0.1 42 | addTF_02 = gaussian_table Density idl_33_blue-red 2.05 3.2 2.6 0.1 43 | addTF_03 = gaussian_table Density idl_33_blue-red 2.05 3.2 3.0 0.1 44 | 45 | addTF_04 = gaussian_table Density idl_3_red-temp 3.0 12.0 4.0 0.3 46 | addTF_05 = gaussian_table Density idl_3_red-temp 3.0 12.0 6.0 0.3 47 | addTF_06 = gaussian_table Density idl_3_red-temp 3.0 12.0 8.0 0.3 48 | addTF_07 = gaussian_table Density idl_3_red-temp 3.0 12.0 10.0 0.3 49 | 50 | addTF_08 = gaussian Density 800.0 200.0 2.0 2.0 2.0 % non-log spoon 51 | 52 | %addTF_09 = gaussian_table Density idl_13_rainbow 2.02 2.18 2.1 0.02 53 | addTF_09 = gaussian_table Density idl_13_rainbow 1.05 1.95 1.5 0.15 54 | 55 | % Animation 56 | % --------- 57 | numFrames = 91 % total number of frames 58 | timePerFrame = 0.0333333 % establish unit system of time/frames (30 frames -> t=1) 59 | 60 | %addKF = startTime stopTime property value tween 61 | addKF = 0.0 3.0 cameraX -3.0 quadratic_inout 62 | addKF = 0.0 3.0 cameraZ 0.5 quadratic_inout 63 | 64 | % Render 65 | % ------ 66 | drawBBox = true % draw simulation bounding box 67 | drawTetra = false % draw delaunay tetrahedra 68 | drawVoronoi = false % DO NOT CHANGE 69 | projColDens = false % integrate quantities (density, etc) along each path 70 | % length, to make e.g. a "projected column density" image 71 | viStepSize = 0.0005 % volume integration sub-stepping size (0=disabled) 72 | % in (Arepo) code units 73 | rayMaxT = 10.0 % maximum ray integration parametric length 74 | rgbLine = 0.01 0.01 0.01 % (RGB) bounding box 75 | rgbTetra = 0.01 0.01 0.01 % (RGB) tetra edges 76 | rgbVoronoi = 0.0 0.05 0.0 % (RGB) voronoi edges 77 | rgbAbsorb = 0.0 0.0 0.0 % (RGB) absorption 78 | 79 | % End. 80 | 81 | -------------------------------------------------------------------------------- /examples/spoon_config_end.txt: -------------------------------------------------------------------------------- 1 | % Sample ArepoVTK Configuration File 2 | 3 | % Input/Output 4 | % ------------ 5 | imageFile = frames_end2/frame_test.tga % output: TGA image filename 6 | rawRGBFile = frame.raw.txt % output: raw dump of floats (debug only) 7 | filename = snapshots/snap_1000 % input: simulation snapshot (no extension) 8 | paramFilename = param.txt % input: Arepo parameter file 9 | 10 | % General 11 | % ------- 12 | nCores = 64 % number of cores to use (0=all) 13 | nTasks = 256 % number of tasks/threads to run (0=auto) 14 | quickRender = false % unused 15 | openWindow = false % unused 16 | verbose = true % report more information 17 | totNumJobs = 0 % set >1 to split single image render across multiple jobs 18 | maskFileBase = mask % create/use maskfile for job based frustrum culling 19 | maskPadFac = 0.0 % frustrum padding factor in code spatial units 20 | 21 | % Frame/Camera 22 | % ------------ 23 | imageXPixels = 1920 % frame resolution (X), e.g. 1024, 1920 24 | imageYPixels = 1080 % frame resolution (Y), e.g. 768, 1080 25 | swScale = 1.0 % screenWindow mult factor * [-1,1] 26 | % want to plot (x,z) or (y,z) 27 | cameraFOV = 20.0 % degrees (0=orthographic camera) 28 | cameraPosition = -3.0 0.5 0.5 % (XYZ) camera position in world coord system 29 | cameraLookAt = 1.5 0.5 0.5 % (XYZ) point centered in camera FOV 30 | cameraUp = 0.0 0.0 1.0 % (XYZ) camera "up" vector 31 | 32 | % Data Processing 33 | % --------------- 34 | recenterBoxCoords = -1 -1 -1 % (XYZ) shift all points for new center (-1 tuple=disable) 35 | convertUthermToKelvin = false % convert SphP.Utherm field to temp in Kelvin 36 | 37 | % Transfer Function 38 | % ----------------- 39 | %addTF_01 = gaussian_table Density cubehelix_1_50 3.1 3.5 3.3 0.1 40 | 41 | addTF_01 = gaussian_table Density idl_33_blue-red 2.05 3.2 2.2 0.1 42 | addTF_02 = gaussian_table Density idl_33_blue-red 2.05 3.2 2.6 0.1 43 | addTF_03 = gaussian_table Density idl_33_blue-red 2.05 3.2 3.0 0.1 44 | 45 | addTF_04 = gaussian_table Density idl_3_red-temp 3.0 12.0 4.0 0.3 46 | addTF_05 = gaussian_table Density idl_3_red-temp 3.0 12.0 6.0 0.3 47 | addTF_06 = gaussian_table Density idl_3_red-temp 3.0 12.0 8.0 0.3 48 | addTF_07 = gaussian_table Density idl_3_red-temp 3.0 12.0 10.0 0.3 49 | 50 | addTF_08 = gaussian Density 800.0 200.0 2.0 2.0 2.0 % non-log spoon 51 | 52 | %addTF_09 = gaussian_table Density idl_13_rainbow 2.02 2.18 2.1 0.02 53 | addTF_09 = gaussian_table Density idl_13_rainbow 1.05 1.95 1.5 0.15 54 | 55 | % Animation 56 | % --------- 57 | numFrames = 91 % total number of frames 58 | timePerFrame = 0.0333333 % establish unit system of time/frames (30 frames -> t=1) 59 | 60 | %addKF = startTime stopTime property value tween 61 | %addKF = 0.0 7.0 rotXY 6.2831853 quadratic_inout 62 | addKF = 0.5 3.0 cameraX 1.1 quadratic_inout 63 | 64 | % Render 65 | % ------ 66 | drawBBox = true % draw simulation bounding box 67 | drawTetra = false % draw delaunay tetrahedra 68 | drawVoronoi = false % DO NOT CHANGE 69 | projColDens = false % integrate quantities (density, etc) along each path 70 | % length, to make e.g. a "projected column density" image 71 | viStepSize = 0.0005 % volume integration sub-stepping size (0=disabled) 72 | % in (Arepo) code units 73 | rayMaxT = 10.0 % maximum ray integration parametric length 74 | rgbLine = 0.01 0.01 0.01 % (RGB) bounding box 75 | rgbTetra = 0.01 0.01 0.01 % (RGB) tetra edges 76 | rgbVoronoi = 0.0 0.05 0.0 % (RGB) voronoi edges 77 | rgbAbsorb = 0.0 0.0 0.0 % (RGB) absorption 78 | 79 | % End. 80 | 81 | -------------------------------------------------------------------------------- /src/volume.h: -------------------------------------------------------------------------------- 1 | /* 2 | * volume.h 3 | * dnelson 4 | */ 5 | 6 | #ifndef AREPO_RT_VOLUME_H 7 | #define AREPO_RT_VOLUME_H 8 | 9 | #include "ArepoRT.h" 10 | #include "transform.h" 11 | 12 | class VolumeRegion { 13 | public: 14 | // construction 15 | virtual ~VolumeRegion(); 16 | 17 | // pure virtual methods 18 | virtual BBox WorldBound() const = 0; 19 | virtual bool IntersectP(const Ray &ray, double *t0, double *t1) const = 0; 20 | virtual Spectrum sigma_a(const Point &, const Vector &, float time) const = 0; 21 | virtual Spectrum sigma_s(const Point &, const Vector &, float time) const = 0; 22 | virtual Spectrum Lve(const Point &, const Vector &, float time) const = 0; 23 | virtual Spectrum sigma_t(const Point &p, const Vector &wo, float time) const = 0; 24 | virtual Spectrum tau(const Ray &ray, float step = 1.f, float offset = 0.5) const = 0; 25 | }; 26 | 27 | #include "arepo.h" 28 | #include "arepoTree.h" 29 | 30 | // Scene 31 | class Scene { 32 | public: 33 | // construction 34 | Scene(VolumeRegion *vr, ArepoMesh* am, ArepoTree* at); 35 | ~Scene(); 36 | 37 | bool IntersectP(const Ray &ray, double *t0, double *t1) const { 38 | bool hit = volumeRegion->IntersectP(ray, t0, t1); 39 | return hit; 40 | } 41 | const BBox &WorldBound() const; 42 | 43 | // data 44 | VolumeRegion *volumeRegion; 45 | ArepoMesh *arepoMesh; 46 | ArepoTree *arepoTree; 47 | BBox bound; 48 | }; 49 | 50 | class DensityRegion : public VolumeRegion { 51 | public: 52 | // construction 53 | DensityRegion(const Spectrum &sa, const Spectrum &ss, 54 | const Spectrum &emit, const Transform &VolumeToWorld) 55 | : sig_a(sa), sig_s(ss), le(emit), WorldToVolume(Inverse(VolumeToWorld)) { } 56 | 57 | // virtuals 58 | virtual float Density(const Point &Pobj) const = 0; 59 | 60 | // defined as simple scalings with density 61 | Spectrum sigma_a(const Point &p, const Vector &, float) const { 62 | return Density(WorldToVolume(p)) * sig_a; 63 | } 64 | Spectrum sigma_s(const Point &p, const Vector &, float) const { 65 | return Density(WorldToVolume(p)) * sig_s; 66 | } 67 | Spectrum sigma_t(const Point &p, const Vector &, float) const { 68 | return Density(WorldToVolume(p)) * (sig_a + sig_s); 69 | } 70 | Spectrum Lve(const Point &p, const Vector &, float) const { 71 | return Density(WorldToVolume(p)) * le; 72 | } 73 | Spectrum tau(const Ray &r, float stepSize, float offset) const; 74 | 75 | protected: 76 | // data 77 | Spectrum sig_a, sig_s, le; 78 | Transform WorldToVolume; 79 | }; 80 | 81 | class VolumeGridDensity : public DensityRegion { 82 | public: 83 | // construction 84 | VolumeGridDensity(const Spectrum &sa, const Spectrum &ss, 85 | const Spectrum &emit, const BBox &e, const Transform &v2w, 86 | int x, int y, int z, const float *d) 87 | : DensityRegion(sa, ss, emit, v2w), nx(x), ny(y), nz(z), extent(e) 88 | { 89 | IF_DEBUG(cout << "VolumeGridDensity(" << nx << ", " << ny << ", " << nz << ") constructor." << endl); 90 | 91 | density = new float[nx*ny*nz]; 92 | memcpy(density, d, nx*ny*nz*sizeof(float)); 93 | } 94 | ~VolumeGridDensity() { delete[] density; } 95 | 96 | // methods 97 | BBox WorldBound() const { return Inverse(WorldToVolume)(extent); } 98 | BBox VolumeBound() const { return extent; } 99 | bool IntersectP(const Ray &r, double *t0, double *t1) const { 100 | Ray ray = WorldToVolume(r); 101 | return extent.IntersectP(ray, t0, t1); 102 | } 103 | float Density(const Point &Pobj) const; 104 | float D(int x, int y, int z) const { 105 | x = Clamp(x, 0, nx-1); 106 | y = Clamp(y, 0, ny-1); 107 | z = Clamp(z, 0, nz-1); 108 | return density[z*nx*ny + y*nx + x]; 109 | } 110 | private: 111 | // data 112 | float *density; 113 | const int nx, ny, nz; 114 | const BBox extent; 115 | }; 116 | 117 | VolumeGridDensity *CreateGridVolumeRegion(const Transform &volume2world, const string &filename); 118 | 119 | #endif 120 | -------------------------------------------------------------------------------- /examples/spoon_param.txt: -------------------------------------------------------------------------------- 1 | % Arepo Parameter File (ArepoVTK Testing) 2 | 3 | %---- Relevant files 4 | 5 | InitCondFile ./Arepo2 6 | OutputDir ./output/ 7 | 8 | EnergyFile energy.txt 9 | InfoFile info.txt 10 | TimingsFile timings.txt 11 | CpuFile cpu.txt 12 | RestartFile restart 13 | SnapshotFileBase snap 14 | OutputListFilename output_list.txt 15 | 16 | %---- File formats 17 | 18 | ICFormat 3 19 | SnapFormat 3 20 | 21 | %---- CPU-time limits 22 | 23 | TimeLimitCPU 81000 % in seconds 24 | CpuTimeBetRestartFile 7200 % in seconds 25 | ResubmitOn 0 26 | ResubmitCommand my-scriptfile 27 | 28 | %----- Memory alloction 29 | 30 | MaxMemSize 20000 % sets maximum memory use in MByte 31 | BufferSize 100 % in MByte 32 | BufferSizeGravity 100 33 | 34 | %----- New 35 | 36 | MultipleDomains 1 37 | TopNodeFactor 5 38 | MaxTimeBinsWithoutDomainDecomposition 5 39 | 40 | %----- Mesh regularization options 41 | 42 | CellShapingFactor 0.2 % sets threshold for CM-displacement 43 | CellShapingSpeed 0.5 % sets speed of CM correction 44 | 45 | %ErrTolThetaInZeldovich 0.5 % tree opening parameter for inverse Zeldovich mesh correction 46 | %MeanVolume 1.0e30 % desired maximum volume of cells for Zeldovich mesh corrrection 47 | %MeanMass 3.0e-5 % desired maximum mass of cells for Zeldovich mesh corrrection 48 | 49 | %---- Caracteristics of run 50 | 51 | TimeBegin 0.0 % Begin of the simulation 52 | TimeMax 1.0 % End of the simulation 53 | BoxSize 1.0 54 | 55 | %---- Basic code options that set the type of simulation 56 | 57 | ComovingIntegrationOn 0 58 | PeriodicBoundariesOn 1 59 | CoolingOn 0 60 | StarformationOn 0 61 | 62 | %---- Cosmological parameters 63 | 64 | Omega0 0.0 65 | OmegaLambda 0.0 66 | OmegaBaryon 0.0 67 | HubbleParam 0.0 68 | 69 | %---- Output frequency and output paramaters 70 | 71 | OutputListOn 0 72 | TimeBetSnapshot 0.1 73 | TimeOfFirstSnapshot 0.0 74 | TimeBetStatistics 0.01 75 | NumFilesPerSnapshot 1 76 | NumFilesWrittenInParallel 1 77 | 78 | %---- Accuracy of time integration 79 | 80 | TypeOfTimestepCriterion 0 81 | ErrTolIntAccuracy 0.025 82 | CourantFac 0.4 83 | MaxRMSDisplacementFac 0.2 84 | MaxSizeTimestep 1e-2 85 | MinSizeTimestep 1e-10 86 | 87 | %---- Treatment of empty space and temperature limits 88 | 89 | MinimumDensityOnStartUp 1.0e-20 90 | LimitUBelowThisDensity 1.0e-20 91 | LimitUBelowCertainDensityToThisValue 1.0 92 | 93 | InitGasTemp 0 94 | MinGasTemp 0 95 | MinEgySpec 0 96 | 97 | %---- Tree algorithm, force accuracy, domain update frequency 98 | 99 | TypeOfOpeningCriterion 1 100 | ErrTolTheta 0.7 101 | ErrTolForceAcc 0.0025 102 | 103 | %---- Initial density estimate 104 | 105 | DesNumNgb 32 106 | MaxNumNgbDeviation 2 107 | 108 | %---- System of units 109 | 110 | UnitLength_in_cm 1.0 111 | UnitMass_in_g 1.0 112 | UnitVelocity_in_cm_per_s 1.0 113 | GravityConstantInternal 0 114 | 115 | %---- Gravitational softening lengths 116 | 117 | MinGasHsmlFractional 0.25 % in principal obsolete 118 | GasSoftFactor 2.5 119 | SofteningGas 0 120 | SofteningHalo 0 121 | SofteningDisk 0 122 | SofteningBulge 0 123 | SofteningStars 0 124 | SofteningBndry 0 125 | SofteningGasMaxPhys 0 % obsolete 126 | SofteningHaloMaxPhys 0 127 | SofteningDiskMaxPhys 0 128 | SofteningBulgeMaxPhys 0 129 | SofteningStarsMaxPhys 0 130 | SofteningBndryMaxPhys 0 131 | 132 | % SPECIAL_BOUNDARY 133 | BoundaryLayerScaleFactor 0.002 134 | SpecialBoundarySpeed 1.2566 135 | SpecialBoundaryMotion 4 136 | SpecialBoundaryType 1 137 | OutflowPressure 0 138 | 139 | % End 140 | 141 | -------------------------------------------------------------------------------- /examples/cosmoRot_param.txt: -------------------------------------------------------------------------------- 1 | % Arepo Parameter File (ArepoVTK Testing) 2 | 3 | %---- Relevant files 4 | 5 | InitCondFile ./unused 6 | OutputDir ./output/ 7 | EnergyFile unused 8 | InfoFile unused 9 | TimingsFile unused 10 | CpuFile unused 11 | RestartFile unused 12 | SnapshotFileBase unused 13 | OutputListFilename unused 14 | 15 | %---- File formats 16 | 17 | ICFormat 3 18 | SnapFormat 3 19 | 20 | %---- CPU-time limits 21 | 22 | TimeLimitCPU 21600 % 6 hours in seconds 23 | CpuTimeBetRestartFile 7200 % 2 hours in seconds 24 | ResubmitOn 0 25 | ResubmitCommand unused 26 | 27 | %----- Memory alloction 28 | 29 | MaxMemSize 10000 % sets maximum memory use in MByte 30 | BufferSize 100 % in MByte 31 | BufferSizeGravity 100 32 | 33 | %----- New 34 | 35 | MultipleDomains 1 36 | TopNodeFactor 5 37 | MaxTimeBinsWithoutDomainDecomposition 5 38 | 39 | %----- Mesh regularization options 40 | 41 | CellShapingFactor 0.2 % sets threshold for CM-displacement 42 | CellShapingSpeed 0.5 % sets speed of CM correction 43 | 44 | %ErrTolThetaInZeldovich 0.5 % tree opening parameter for inverse Zeldovich mesh correction 45 | %MeanVolume 1.0e30 % desired maximum volume of cells for Zeldovich mesh corrrection 46 | %MeanMass 3.0e-5 % desired maximum mass of cells for Zeldovich mesh corrrection 47 | 48 | %---- Caracteristics of run 49 | 50 | TimeBegin 0.0 % Begin of the simulation 51 | TimeMax 1.0 % End of the simulation 52 | BoxSize 20000.0 53 | 54 | %---- Basic code options that set the type of simulation 55 | 56 | ComovingIntegrationOn 0 57 | PeriodicBoundariesOn 1 58 | CoolingOn 0 59 | StarformationOn 0 60 | 61 | %---- Cosmological parameters 62 | 63 | Omega0 0.0 64 | OmegaLambda 0.0 65 | OmegaBaryon 0.0 66 | HubbleParam 0.0 67 | 68 | %---- Output frequency and output paramaters 69 | 70 | OutputListOn 0 71 | TimeBetSnapshot 0.1 72 | TimeOfFirstSnapshot 0.0 73 | TimeBetStatistics 0.01 74 | NumFilesPerSnapshot 1 75 | NumFilesWrittenInParallel 1 76 | 77 | %---- Accuracy of time integration 78 | 79 | TypeOfTimestepCriterion 0 80 | ErrTolIntAccuracy 0.025 81 | CourantFac 0.4 82 | MaxRMSDisplacementFac 0.2 83 | MaxSizeTimestep 1e-2 84 | MinSizeTimestep 1e-10 85 | 86 | %---- Treatment of empty space and temperature limits 87 | 88 | MinimumDensityOnStartUp 1.0e-20 89 | LimitUBelowThisDensity 1.0e-20 90 | LimitUBelowCertainDensityToThisValue 1.0 91 | 92 | InitGasTemp 0 93 | MinGasTemp 0 94 | MinEgySpec 0 95 | 96 | %---- Tree algorithm, force accuracy, domain update frequency 97 | 98 | TypeOfOpeningCriterion 1 99 | ErrTolTheta 0.7 100 | ErrTolForceAcc 0.0025 101 | 102 | %---- Initial density estimate 103 | 104 | DesNumNgb 32 105 | MaxNumNgbDeviation 2 106 | 107 | %---- System of units 108 | 109 | UnitLength_in_cm 3.085678e21 ; 1.0 kpc 110 | UnitMass_in_g 1.989e43 ; 1.0e10 solar masses 111 | UnitVelocity_in_cm_per_s 1e5 ; 1 km/sec 112 | GravityConstantInternal 0 113 | 114 | %---- Gravitational softening lengths 115 | 116 | MinGasHsmlFractional 0.25 % in principal obsolete 117 | GasSoftFactor 2.5 118 | SofteningGas 0 119 | SofteningHalo 0 120 | SofteningDisk 0 121 | SofteningBulge 0 122 | SofteningStars 0 123 | SofteningBndry 0 124 | SofteningGasMaxPhys 0 % obsolete 125 | SofteningHaloMaxPhys 0 126 | SofteningDiskMaxPhys 0 127 | SofteningBulgeMaxPhys 0 128 | SofteningStarsMaxPhys 0 129 | SofteningBndryMaxPhys 0 130 | 131 | % SPECIAL_BOUNDARY 132 | %BoundaryLayerScaleFactor 0.002 133 | %SpecialBoundarySpeed 1.2566 134 | %SpecialBoundaryMotion 4 135 | %SpecialBoundaryType 1 136 | %OutflowPressure 0 137 | 138 | % End 139 | 140 | -------------------------------------------------------------------------------- /src/arepo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * arepo.h 3 | * dnelson 4 | */ 5 | 6 | #ifndef AREPO_RT_AREPO_H 7 | #define AREPO_RT_AREPO_H 8 | 9 | #ifdef DEUBG 10 | #define VERBOSE 11 | #endif 12 | 13 | #include "transfer.h" 14 | #include "voronoi_3db.h" 15 | 16 | #if (NUM_THREADS > 1) 17 | #include 18 | #endif 19 | 20 | void addValsContribution( vector &vals, int SphP_ind, double weight ); 21 | 22 | // Arepo: main interface with Arepo to load a snapshot, create data structures, and return 23 | class Arepo 24 | { 25 | public: 26 | // construction 27 | Arepo(const string &sfn, const string &pfn) : snapFilename(sfn), paramFilename(pfn) { } 28 | 29 | // methods 30 | void Init(int*, char***); 31 | void Cleanup(); 32 | bool LoadSnapshot(); 33 | 34 | void ComputeQuantityBounds(); 35 | 36 | float valMean(int valNum) { return valBounds[valNum*3+0]; } 37 | 38 | private: 39 | // data 40 | string snapFilename; 41 | string paramFilename; 42 | 43 | float valBounds[TF_NUM_VALS*3]; // min,max,mean for each non-derived quantity 44 | }; 45 | 46 | // ArepoMesh: expose the Voronoi data structures and encapsulate mesh related functions 47 | class ArepoMesh { 48 | public: 49 | // construction 50 | ArepoMesh(const TransferFunction *tf); 51 | ~ArepoMesh(); 52 | 53 | // init for particular interp methods 54 | void setupAuxMeshes(); 55 | void precomputeTetraGrads(); 56 | 57 | // preprocessing 58 | int ComputeVoronoiEdges(); 59 | void LimitCellDensities(); 60 | 61 | // methods 62 | void DumpMesh(); 63 | void OutputMesh(); 64 | BBox WorldBound() const { return extent; } 65 | BBox VolumeBound() const { return extent; } 66 | 67 | // raster return 68 | bool TetraEdges(const int i, vector *edges); 69 | bool VoronoiEdges(const int i_face, vector *edges); 70 | 71 | // world geometry 72 | bool IntersectP(const Ray &r, double *t0, double *t1) const { 73 | return extent.IntersectP(r, t0, t1); 74 | } 75 | 76 | // mesh traversal 77 | void LocateEntryCell(const Ray &ray, int *prevEntryCell); 78 | void LocateEntryCellBrute(const Ray &ray); 79 | void VerifyPointInCell(int sphInd, Point &pos); 80 | 81 | void LocateEntryTetra(const Ray &ray, int *prevEntryTetra); 82 | 83 | int FindNearestGasParticle(Point &pt, int guess, double *mindist); 84 | bool AdvanceRayOneCellNew(const Ray &ray, double *t0, double *t1, 85 | Spectrum &Lv, Spectrum &Tr, int threadNum); 86 | 87 | inline int getSphPID(int dpInd); 88 | void locateCurrentTetra(const Ray& ray, Vector &pt); 89 | void checkCurCellTF(bool *addFlag, int sphInd, vector &vals); 90 | 91 | // fluid data introspection 92 | float calcNeighborHSML(int sphInd, Point &pt); 93 | int subSampleCell(const Ray &ray, Point &pt, vector &vals, int threadNum); 94 | 95 | // NNI_WATSON_SAMBRIDGE 96 | inline bool needTet(int tt, point *pp, int *node_inds, int *nTet); 97 | void addTet(int tt, point *pp, int *node_inds, int *tet_inds, int *nNode, int *nTet); 98 | double ccVolume(double *ci, double *cj, double *ck, double *ct); 99 | 100 | // data 101 | int Ndp; // number of delaunay points 102 | int Ndt; // number of delaunay tetrahedra 103 | int Nvf; // number of voronoi faces 104 | 105 | point *DP; // delaunay points 106 | tetra *DT; // delaunay tetrahedra 107 | tetra_center *DTC; // circumcenters of delaunay tetrahedra 108 | char *DTF; // tetra faces 109 | face *VF; // voronoi faces 110 | //connection *DC; // voronoi connections 111 | 112 | private: 113 | // rendering 114 | BBox extent; 115 | const TransferFunction *transferFunction; 116 | 117 | // units, etc 118 | float unitConversions[TF_NUM_VALS]; // mult factor from code units to ArepoVTK "units" 119 | 120 | // mesh 121 | tessellation *T; 122 | 123 | // for particular interpolation methods 124 | tessellation *AuxMeshes; 125 | float *DT_grad; 126 | float *DP_vols; 127 | 128 | // for drawing voronoi faces and edges 129 | vector vertexList; 130 | vector numVertices; 131 | vector vertexOffset; 132 | }; 133 | 134 | #endif //AREPO_RT_AREPO_H 135 | -------------------------------------------------------------------------------- /examples/cosmoRot_config.txt: -------------------------------------------------------------------------------- 1 | % Sample ArepoVTK Configuration File 2 | 3 | % Input/Output 4 | % ------------ 5 | imageFile = frame_test.png % output: .TGA/.PNG image filename 6 | rawRGBFile = frame.raw.txt % output: raw dump of floats (debug only) 7 | %filename = snapdir_130_fb256/snap_130 % input: simulation snapshot (no extension) 8 | filename = snap_130 9 | paramFilename = param.txt % input: Arepo parameter file 10 | 11 | % General 12 | % ------- 13 | nCores = 16 % number of cores to use (0=all) 14 | nTasks = 64 % number of tasks/threads to run (0=auto) 15 | quickRender = false % unused 16 | openWindow = false % unused 17 | verbose = true % report more information 18 | totNumJobs = 0 % set >=1 to split single image render across multiple jobs (0=disable) 19 | maskFileBase = mask % create/use maskfile for job based frustrum culling 20 | maskPadFac = 0.0 % frustrum padding factor in code spatial units 21 | 22 | % Frame/Camera 23 | % ------------ 24 | imageXPixels = 800 % frame resolution (X), e.g. 1024, 1920 25 | imageYPixels = 800 % frame resolution (Y), e.g. 768, 1080 26 | swScale = 1.0 % screenWindow mult factor * [-1,1] 27 | cameraFOV = 20.0 % degrees (0=orthographic camera) 28 | cameraPosition = 34000 90000 34000 % (XYZ) camera position in world coord system 29 | cameraLookAt = 10000 10000 10000 % (XYZ) point centered in camera FOV 30 | cameraUp = 0.0 0.0 1.0 % (XYZ) camera "up" vector 31 | 32 | % Data Processing 33 | % --------------- 34 | recenterBoxCoords = -1 -1 -1 % (XYZ) shift all points for new center (-1 tuple=disable) 35 | convertUthermToKelvin = true % convert SphP.Utherm field to temp in Kelvin 36 | 37 | % Transfer Function 38 | % ----------------- 39 | % old (cosmo 1Mpc density) 40 | %addTF_01 = gaussian Density 1e-8 2e-9 0.0 0.0 0.1 41 | %addTF_02 = gaussian Density 6e-8 3e-9 0.2 0.0 0.0 42 | %addTF_03 = gaussian Density 1e-7 1e-8 0.0 0.3 0.0 43 | %addTF_04 = gaussian Density 1e-6 1e-7 0.1 0.1 0.1 44 | % cosmo fullbox density: 45 | %addTF_01 = gaussian_table Density cubehelix_1_50 1e-8 1e-7 1.5e-8 2e-9 46 | %addTF_02 = gaussian_table Density cubehelix_1_50 1e-8 1e-7 4e-8 5e-9 47 | %addTF_03 = gaussian_table Density cubehelix_1_50 1e-8 1e-7 6e-8 1e-8 48 | %addTF_04 = gaussian_table Density cubehelix_1_50 1e-8 1e-7 9e-8 1e-8 49 | % cosmo fullbox utherm: 50 | addTF_01 = gaussian_table Temp idl_33_blue-red 600 90000 1000 100 51 | %addTF_02 = gaussian_table Temp idl_33_blue-red 600 90000 10000 1000 52 | addTF_03 = gaussian_table Temp idl_33_blue-red 600 90000 20000 2000 53 | #addTF_04 = gaussian_table Temp idl_33_blue-red 600 90000 40000 3000 54 | addTF_05 = gaussian_table Temp idl_33_blue-red 600 90000 60000 4000 55 | addTF_06 = gaussian_table Temp idl_33_blue-red 600 90000 80000 5000 56 | 57 | % Animation 58 | % --------- 59 | numFrames = 1 % total number of frames 60 | timePerFrame = 1.0 % establish unit system of time/frame 61 | 62 | % Render 63 | % ------ 64 | drawBBox = true % draw simulation bounding box 65 | drawTetra = false % draw delaunay tetrahedra 66 | drawVoronoi = false % draw voronoi polyhedra faces 67 | projColDens = false % integrate quantities (density, etc) along each path 68 | % length, to make e.g. a "projected column density" image 69 | nTreeNGB = 40 % use tree-based search integrator instead of mesh (0=disabled) 70 | viStepSize = 5.0 % volume integration sub-stepping size (0=disabled) 71 | % in (Arepo) code units 72 | rayMaxT = 1000000.0 % maximum ray integration parametric length 73 | rgbLine = 1.0 1.0 1.0 % (RGB) bounding box 74 | rgbTetra = 0.01 0.01 0.01 % (RGB) tetra edges 75 | rgbVoronoi = 0.0 0.05 0.0 % (RGB) voronoi edges 76 | rgbAbsorb = 0.0 0.0 0.0 % (RGB) absorption 77 | 78 | % End. 79 | 80 | -------------------------------------------------------------------------------- /examples/illustris_box1820_config_cellgrad.txt: -------------------------------------------------------------------------------- 1 | % Sample ArepoVTK Configuration File 2 | 3 | % Input/Output 4 | % ------------ 5 | imageFile = output/1820_256_128k_cellgrad/frame_1820 % output: TGA image filename 6 | rawRGBFile = frame.raw.txt % output: raw dump of floats (debug only) 7 | filename = output/snapdir_135_1820/snap_135 % input: snapshot file 8 | paramFilename = param_1820.txt % input: Arepo parameter file 9 | 10 | % General 11 | % ------- 12 | nCores = 16 % number of cores to use (0=all) 13 | nTasks = 256 % number of tasks/threads to run (0=auto) 14 | quickRender = false % unused 15 | openWindow = false % unused 16 | verbose = true % report more information 17 | totNumJobs = 256 % set >=1 to split single image render across multiple jobs (0=disable) 18 | maskFileBase = output/mask1820_256 % create/use maskfile for job based frustrum culling 19 | maskPadFac = 500.0 % frustrum padding factor in code spatial units 20 | 21 | % Frame/Camera 22 | % ------------ 23 | imageXPixels = 131072 % frame resolution (X), e.g. 1024, 1920 24 | imageYPixels = 131072 % frame resolution (Y), e.g. 768, 1080 25 | swScale = 37500.0 % screenWindow mult factor * [-1,1] 26 | cameraFOV = 0.0 % degrees (0=orthographic camera) 27 | cameraPosition = 37500 37500 30000 % (XYZ) camera position in world coord system 28 | cameraLookAt = 37500 37500 37500 % (XYZ) point centered in camera FOV 29 | cameraUp = 0.0 1.0 0.0 % (XYZ) camera "up" vector 30 | 31 | % Data Processing 32 | % --------------- 33 | recenterBoxCoords = 931.088 26254.336 18358.875 % (XYZ) shift all points for new center (false=disable) 34 | convertUthermToKelvin = true % convert SphP.Utherm field to temp in Kelvin 35 | 36 | % Transfer Function 37 | % ----------------- 38 | % old (cosmo 1Mpc density) 39 | %addTF_01 = gaussian Density 1e-8 2e-9 0.0 0.0 0.1 40 | %addTF_02 = gaussian Density 6e-8 3e-9 0.2 0.0 0.0 41 | %addTF_03 = gaussian Density 1e-7 1e-8 0.0 0.3 0.0 42 | %addTF_04 = gaussian Density 1e-6 1e-7 0.1 0.1 0.1 43 | % cosmo fullbox density: 44 | %addTF_01 = gaussian_table Density cubehelix_1_50 1e-8 1e-7 1.5e-8 2e-9 45 | %addTF_02 = gaussian_table Density cubehelix_1_50 1e-8 1e-7 4e-8 5e-9 46 | %addTF_03 = gaussian_table Density cubehelix_1_50 1e-8 1e-7 6e-8 1e-8 47 | %addTF_04 = gaussian_table Density cubehelix_1_50 1e-8 1e-7 9e-8 1e-8 48 | % cosmo fullbox utherm: 49 | %addTF_01 = gaussian_table Temp idl_33_blue-red 600 90000 1000 100 50 | %addTF_02 = gaussian_table Temp idl_33_blue-red 600 90000 10000 1000 51 | %addTF_03 = gaussian_table Temp idl_33_blue-red 600 90000 20000 2000 52 | %addTF_04 = gaussian_table Temp idl_33_blue-red 600 90000 40000 3000 53 | %addTF_05 = gaussian_table Temp idl_33_blue-red 600 90000 60000 4000 54 | %addTF_06 = gaussian_table Temp idl_33_blue-red 600 90000 80000 5000 55 | 56 | % jobtest 57 | addTF_01 = constant_table Density idl_13_rainbow 5e-10 1e-8 58 | 59 | % Animation 60 | % --------- 61 | numFrames = 1 % total number of frames 62 | timePerFrame = 1.0 % establish unit system of time/frame 63 | 64 | % Render 65 | % ------ 66 | drawBBox = false % draw simulation bounding box 67 | drawTetra = false % draw delaunay tetrahedra 68 | drawVoronoi = false % draw voronoi polyhedra faces 69 | projColDens = true % calculate/save raw line integrals 70 | nTreeNGB = 0 % use tree-based search integrator instead of mesh (0=disabled) 71 | viStepSize = 0.0 % volume integration sub-stepping size (0=disabled) 72 | % in (Arepo) code units 73 | rayMaxT = 15000.0 % maximum ray integration parametric length 74 | rgbLine = 5.0 5.0 5.0 % (RGB) bounding box 75 | rgbTetra = 0.01 0.01 0.01 % (RGB) tetra edges 76 | rgbVoronoi = 0.0 0.05 0.0 % (RGB) voronoi edges 77 | rgbAbsorb = 0.0 0.0 0.0 % (RGB) absorption 78 | 79 | % End. 80 | 81 | -------------------------------------------------------------------------------- /examples/illustris_subbox0_config_4k.txt: -------------------------------------------------------------------------------- 1 | % Sample ArepoVTK Configuration File 2 | 3 | % Input/Output 4 | % ------------ 5 | imageFile = output/frame_4k180_NUMM.png % output: TGA image filename 6 | rawRGBFile = frame.raw.txt % output: raw dump of floats (debug only) 7 | filename = output/subbox0/snapdir_subbox0_NUMM/snap_subbox0_NUMM % input: snapshot file 8 | %filename = output/snaptest_NUMM/snap_subbox0_NUMM 9 | paramFilename = param.txt % input: Arepo parameter file 10 | 11 | % General 12 | % ------- 13 | nCores = 8 % number of cores to use (0=all) 14 | nTasks = 256 % number of tasks/threads to run (0=auto) 15 | quickRender = false % unused 16 | openWindow = false % unused 17 | verbose = true % report more information 18 | totNumJobs = 0 % set >=1 to split single image render across multiple jobs (0=disable) 19 | jobExpansionFac = 1 % increase number of jobs by this factor, only for render not mask (per dim) 20 | maskFileBase = % create/use maskfile for job based frustrum culling 21 | maskPadFac = 0.0 % frustrum padding factor in code spatial units 22 | 23 | % Frame/Camera 24 | % ------------ 25 | imageXPixels = 4000 % frame resolution (X), e.g. 1024, 1920 26 | imageYPixels = 4000 % frame resolution (Y), e.g. 768, 1080 27 | swScale = 1.0 % screenWindow mult factor * [-1,1] 28 | cameraType = fisheye % ortho, perspective, fisheye, env, rift 29 | cameraFOV = 180.0 % degrees 30 | cameraPosition = 7400 3750 3750 % (XYZ) camera position in world coord system 31 | cameraLookAt = 3750 3750 3750 % (XYZ) point centered in camera FOV 32 | cameraUp = 0.0 1.0 0.0 % (XYZ) camera "up" vector 33 | 34 | % Data Processing 35 | % --------------- 36 | readPartType = 0 % 0=gas, 1=dm, 4=stars, 5=bhs 37 | recenterBoxCoords = 9000 17000 63000 % (XYZ) shift all points for new center (false=disable) 38 | convertUthermToKelvin = true % convert SphP.Utherm field to temp in Kelvin 39 | takeLogUtherm = true % convert K to log(K) 40 | 41 | % Transfer Function 42 | % ----------------- 43 | addTF_01 = linear Temp 2.0 3.5 0.0 0.0 0.0 0.0 0.0 0.2 44 | addTF_02 = linear Temp 3.5 4.0 0.0 0.0 0.2 0.0 0.0 0.4 45 | addTF_03 = linear Temp 4.0 5.5 0.0 0.0 0.4 0.0 1.0 0.4 46 | addTF_04 = linear Temp 5.5 6.5 0.0 1.0 0.4 1.0 0.0 0.0 47 | addTF_05 = linear Temp 6.5 7.0 1.0 0.0 0.0 1.0 1.0 1.0 48 | addTF_06 = linear Temp 7.0 9.9 1.0 1.0 1.0 1.0 1.0 1.0 49 | 50 | % Animation 51 | % --------- 52 | numFrames = -1 % set to 1 53 | startFrame = -1 % set by -s cmdline flag 54 | timePerFrame = 1.0 % establish unit system of time/frame 55 | 56 | addKF_01 = 0.0 4320.0 rotXZ 28.2743339 linear % 4.5 total orbits (960 frames, 32 sec per 2pi orbit) 57 | %addKF_01 = 0.0 4320.0 rotXZ 37.699112 linear % 720 frames (24 sec) per 2pi orbit (Mark's setup) 58 | 59 | minScale = 0.0 % based on 0.0 for orig_frame 2000 60 | maxScale = 5.0 % based on 3.59629 for orig_frame 2000 61 | 62 | % Render 63 | % ------ 64 | drawBBox = false % draw simulation bounding box 65 | drawTetra = false % draw delaunay tetrahedra 66 | drawVoronoi = false % draw voronoi polyhedra faces 67 | drawSphere = false % draw test sphere lat/long lines 68 | projColDens = false % calculate/save raw line integrals 69 | nTreeNGB = 32 % use tree-based search integrator instead of mesh (0=disabled) 70 | viStepSize = 4 % volume integration sub-stepping size (0=disabled) 71 | rayMaxT = 15000.0 % maximum ray integration parametric length 72 | rgbLine = 5.0 5.0 5.0 % (RGB) bounding box 73 | rgbTetra = 0.01 0.01 0.01 % (RGB) tetra edges 74 | rgbVoronoi = 0.0 0.05 0.0 % (RGB) voronoi edges 75 | rgbAbsorb = 15000 15000 15000 %10000 10000 10000 % (RGB) absorption, 0=none 76 | 77 | % End. 78 | 79 | -------------------------------------------------------------------------------- /examples/illustris_box1820_config_sphTree.txt: -------------------------------------------------------------------------------- 1 | % Sample ArepoVTK Configuration File 2 | 3 | % Input/Output 4 | % ------------ 5 | imageFile = output/expandCombine/frame_1820 % output: TGA image filename 6 | rawRGBFile = frame.raw.txt % output: raw dump of floats (debug only) 7 | filename = output/snapdir_135_1820/snap_135 % input: snapshot file 8 | paramFilename = param_centos5.txt % input: Arepo parameter file 9 | 10 | % General 11 | % ------- 12 | nCores = 8 % number of cores to use (0=all) 13 | nTasks = 1024 % number of tasks/threads to run (0=auto) 14 | quickRender = false % unused 15 | openWindow = false % unused 16 | verbose = true % report more information 17 | totNumJobs = 256 % set >=1 to split single image render across multiple jobs (0=disable) 18 | jobExpansionFac = 4 % increase number of jobs by this factor, only for render not mask (per dim) 19 | maskFileBase = output/mask1820_256 % create/use maskfile for job based frustrum culling 20 | maskPadFac = 500.0 % frustrum padding factor in code spatial units 21 | 22 | % Frame/Camera 23 | % ------------ 24 | imageXPixels = 131072 % frame resolution (X), e.g. 1024, 1920 25 | imageYPixels = 131072 % frame resolution (Y), e.g. 768, 1080 26 | swScale = 37500.0 % screenWindow mult factor * [-1,1] 27 | cameraFOV = 0.0 % degrees (0=orthographic camera) 28 | cameraPosition = 37500 37500 30000 % (XYZ) camera position in world coord system 29 | cameraLookAt = 37500 37500 37500 % (XYZ) point centered in camera FOV 30 | cameraUp = 0.0 1.0 0.0 % (XYZ) camera "up" vector 31 | 32 | % Data Processing 33 | % --------------- 34 | recenterBoxCoords = 931.088 26254.336 18358.875 % (XYZ) shift all points for new center (false=disable) 35 | convertUthermToKelvin = true % convert SphP.Utherm field to temp in Kelvin 36 | 37 | % Transfer Function 38 | % ----------------- 39 | % old (cosmo 1Mpc density) 40 | %addTF_01 = gaussian Density 1e-8 2e-9 0.0 0.0 0.1 41 | %addTF_02 = gaussian Density 6e-8 3e-9 0.2 0.0 0.0 42 | %addTF_03 = gaussian Density 1e-7 1e-8 0.0 0.3 0.0 43 | %addTF_04 = gaussian Density 1e-6 1e-7 0.1 0.1 0.1 44 | % cosmo fullbox density: 45 | %addTF_01 = gaussian_table Density cubehelix_1_50 1e-8 1e-7 1.5e-8 2e-9 46 | %addTF_02 = gaussian_table Density cubehelix_1_50 1e-8 1e-7 4e-8 5e-9 47 | %addTF_03 = gaussian_table Density cubehelix_1_50 1e-8 1e-7 6e-8 1e-8 48 | %addTF_04 = gaussian_table Density cubehelix_1_50 1e-8 1e-7 9e-8 1e-8 49 | % cosmo fullbox utherm: 50 | %addTF_01 = gaussian_table Temp idl_33_blue-red 600 90000 1000 100 51 | %addTF_02 = gaussian_table Temp idl_33_blue-red 600 90000 10000 1000 52 | %addTF_03 = gaussian_table Temp idl_33_blue-red 600 90000 20000 2000 53 | %addTF_04 = gaussian_table Temp idl_33_blue-red 600 90000 40000 3000 54 | %addTF_05 = gaussian_table Temp idl_33_blue-red 600 90000 60000 4000 55 | %addTF_06 = gaussian_table Temp idl_33_blue-red 600 90000 80000 5000 56 | 57 | % jobtest 58 | addTF_01 = constant_table Density idl_13_rainbow 5e-10 1e-8 59 | 60 | % Animation 61 | % --------- 62 | numFrames = 1 % total number of frames 63 | timePerFrame = 1.0 % establish unit system of time/frame 64 | 65 | % Render 66 | % ------ 67 | drawBBox = false % draw simulation bounding box 68 | drawTetra = false % draw delaunay tetrahedra 69 | drawVoronoi = false % draw voronoi polyhedra faces 70 | projColDens = true % calculate/save raw line integrals 71 | nTreeNGB = 10 % use tree-based search integrator instead of mesh (0=disabled) 72 | viStepSize = 0.66 % volume integration sub-stepping size (0=disabled) 73 | rayMaxT = 15000.0 % maximum ray integration parametric length 74 | rgbLine = 5.0 5.0 5.0 % (RGB) bounding box 75 | rgbTetra = 0.01 0.01 0.01 % (RGB) tetra edges 76 | rgbVoronoi = 0.0 0.05 0.0 % (RGB) voronoi edges 77 | rgbAbsorb = 0.0 0.0 0.0 % (RGB) absorption 78 | 79 | % End. 80 | 81 | -------------------------------------------------------------------------------- /examples/cosmoRot_config_temp.txt: -------------------------------------------------------------------------------- 1 | % Sample ArepoVTK Configuration File 2 | 3 | % Input/Output 4 | % ------------ 5 | imageFile = frames_rotTemp/frame_test % output: TGA image filename 6 | rawRGBFile = frame.raw.txt % output: raw dump of floats (debug only) 7 | filename = snapdir_130_fb256/snap_130 % input: simulation snapshot (no extension) 8 | paramFilename = param.txt % input: Arepo parameter file 9 | 10 | % General 11 | % ------- 12 | nCores = 64 % number of cores to use (0=all) 13 | nTasks = 512 % number of tasks/threads to run (0=auto) 14 | quickRender = false % unused 15 | openWindow = false % unused 16 | verbose = true % report more information 17 | totNumJobs = 0 % set >=1 to split single image render across multiple jobs (0=disable) 18 | maskFileBase = mask % create/use maskfile for job based frustrum culling 19 | maskPadFac = 0.0 % frustrum padding factor in code spatial units 20 | 21 | % Frame/Camera 22 | % ------------ 23 | imageXPixels = 1920 % frame resolution (X), e.g. 1024, 1920 24 | imageYPixels = 1080 % frame resolution (Y), e.g. 768, 1080 25 | swScale = 1.0 % screenWindow mult factor * [-1,1] 26 | cameraFOV = 20.0 % degrees (0=orthographic camera) 27 | cameraPosition = 30000 82000 12000 % (XYZ) camera position in world coord system 28 | cameraLookAt = 10000 10000 10000 % (XYZ) point centered in camera FOV 29 | cameraUp = 0.0 0.0 1.0 % (XYZ) camera "up" vector 30 | 31 | % Data Processing 32 | % --------------- 33 | recenterBoxCoords = -1 -1 -1 % (XYZ) shift all points for new center (-1 tuple=disable) 34 | convertUthermToKelvin = true % convert SphP.Utherm field to temp in Kelvin 35 | 36 | % Transfer Function 37 | % ----------------- 38 | % old (cosmo 1Mpc density) 39 | %addTF_01 = gaussian Density 1e-8 2e-9 0.0 0.0 0.1 40 | %addTF_02 = gaussian Density 6e-8 3e-9 0.2 0.0 0.0 41 | %addTF_03 = gaussian Density 1e-7 1e-8 0.0 0.3 0.0 42 | %addTF_04 = gaussian Density 1e-6 1e-7 0.1 0.1 0.1 43 | % cosmo fullbox density: 44 | %addTF_01 = gaussian_table Density cubehelix_1_50 1e-8 1e-7 1.5e-8 2e-9 45 | %addTF_02 = gaussian_table Density cubehelix_1_50 1e-8 1e-7 4e-8 5e-9 46 | %addTF_03 = gaussian_table Density cubehelix_1_50 1e-8 1e-7 6e-8 1e-8 47 | %addTF_04 = gaussian_table Density cubehelix_1_50 1e-8 1e-7 9e-8 1e-8 48 | % cosmo fullbox utherm: 49 | addTF_01 = gaussian_table Temp idl_33_blue-red 600 90000 1000 100 50 | %addTF_02 = gaussian_table Temp idl_33_blue-red 600 90000 10000 1000 51 | addTF_03 = gaussian_table Temp idl_33_blue-red 600 90000 20000 2000 52 | #addTF_04 = gaussian_table Temp idl_33_blue-red 600 90000 40000 3000 53 | addTF_05 = gaussian_table Temp idl_33_blue-red 600 90000 60000 4000 54 | addTF_06 = gaussian_table Temp idl_33_blue-red 600 90000 80000 5000 55 | 56 | % Animation 57 | % --------- 58 | startFrame = 0 59 | numFrames = 390 % total number of frames 60 | timePerFrame = 0.0333333 % establish unit system of time/frames (30frames -> t=1) 61 | 62 | %addKF = startTime stopTime property value tween 63 | addKF = 0.0 13.0 rotXY 6.2831853 linear 64 | 65 | % Render 66 | % ------ 67 | drawBBox = true % draw simulation bounding box 68 | drawTetra = false % draw delaunay tetrahedra 69 | drawVoronoi = false % draw voronoi polyhedra faces 70 | projColDens = false % integrate quantities (density, etc) along each path 71 | % length, to make e.g. a "projected column density" image 72 | nTreeNGB = 0 % use tree-based search integrator instead of mesh (0=disabled) 73 | viStepSize = 1.0 % volume integration sub-stepping size (0=disabled) 74 | % in (Arepo) code units 75 | rayMaxT = 1000000.0 % maximum ray integration parametric length 76 | rgbLine = 5.0 5.0 5.0 % (RGB) bounding box 77 | rgbTetra = 0.01 0.01 0.01 % (RGB) tetra edges 78 | rgbVoronoi = 0.0 0.05 0.0 % (RGB) voronoi edges 79 | rgbAbsorb = 0.0 0.0 0.0 % (RGB) absorption 80 | 81 | % End. 82 | 83 | -------------------------------------------------------------------------------- /examples/cosmoRot_config_dens.txt: -------------------------------------------------------------------------------- 1 | % Sample ArepoVTK Configuration File 2 | 3 | % Input/Output 4 | % ------------ 5 | imageFile = frames_rotDens/frame_test % output: TGA image filename 6 | rawRGBFile = frame.raw.txt % output: raw dump of floats (debug only) 7 | filename = snapdir_130_fb256/snap_130 % input: simulation snapshot (no extension) 8 | paramFilename = param.txt % input: Arepo parameter file 9 | 10 | % General 11 | % ------- 12 | nCores = 64 % number of cores to use (0=all) 13 | nTasks = 512 % number of tasks/threads to run (0=auto) 14 | quickRender = false % unused 15 | openWindow = false % unused 16 | verbose = false % report more information 17 | totNumJobs = 0 % set >=1 to split single image render across multiple jobs (0=disable) 18 | maskFileBase = mask % create/use maskfile for job based frustrum culling 19 | maskPadFac = 0.0 % frustrum padding factor in code spatial units 20 | 21 | % Frame/Camera 22 | % ------------ 23 | imageXPixels = 1920 % frame resolution (X), e.g. 1024, 1920 24 | imageYPixels = 1080 % frame resolution (Y), e.g. 768, 1080 25 | swScale = 1.0 % screenWindow mult factor * [-1,1] 26 | cameraFOV = 20.0 % degrees (0=orthographic camera) 27 | cameraPosition = 30000 82000 12000 % (XYZ) camera position in world coord system 28 | cameraLookAt = 10000 10000 10000 % (XYZ) point centered in camera FOV 29 | cameraUp = 0.0 0.0 1.0 % (XYZ) camera "up" vector 30 | 31 | % Data Processing 32 | % --------------- 33 | recenterBoxCoords = -1 -1 -1 % (XYZ) shift all points for new center (-1 tuple=disable) 34 | convertUthermToKelvin = true % convert SphP.Utherm field to temp in Kelvin 35 | 36 | % Transfer Function 37 | % ----------------- 38 | % old (cosmo 1Mpc density) 39 | %addTF_01 = gaussian Density 1e-8 2e-9 0.0 0.0 0.1 40 | %addTF_02 = gaussian Density 6e-8 3e-9 0.2 0.0 0.0 41 | %addTF_03 = gaussian Density 1e-7 1e-8 0.0 0.3 0.0 42 | %addTF_04 = gaussian Density 1e-6 1e-7 0.1 0.1 0.1 43 | % cosmo fullbox density: 44 | addTF_01 = gaussian_table Density idl_3_red-temp 1e-8 1e-7 1.5e-8 2e-9 45 | addTF_02 = gaussian_table Density idl_3_red-temp 1e-8 1e-7 4e-8 5e-9 46 | addTF_03 = gaussian_table Density idl_3_red-temp 1e-8 1e-7 6e-8 1e-8 47 | addTF_04 = gaussian_table Density idl_3_red-temp 1e-8 1e-7 9e-8 1e-8 48 | % cosmo fullbox utherm: 49 | %addTF_01 = gaussian_table Temp idl_33_blue-red 600 90000 1000 100 50 | %%%%addTF_02 = gaussian_table Temp idl_33_blue-red 600 90000 10000 1000 51 | %addTF_03 = gaussian_table Temp idl_33_blue-red 600 90000 20000 2000 52 | %%%#addTF_04 = gaussian_table Temp idl_33_blue-red 600 90000 40000 3000 53 | %addTF_05 = gaussian_table Temp idl_33_blue-red 600 90000 60000 4000 54 | %addTF_06 = gaussian_table Temp idl_33_blue-red 600 90000 80000 5000 55 | 56 | % Animation 57 | % --------- 58 | startFrame = 0 59 | numFrames = 390 % total number of frames 60 | timePerFrame = 0.0333333 % establish unit system of time/frames (30frames -> t=1) 61 | 62 | %addKF = startTime stopTime property value tween 63 | addKF = 0.0 13.0 rotXY 6.2831853 linear 64 | 65 | % Render 66 | % ------ 67 | drawBBox = true % draw simulation bounding box 68 | drawTetra = false % draw delaunay tetrahedra 69 | drawVoronoi = false % draw voronoi polyhedra faces 70 | projColDens = false % integrate quantities (density, etc) along each path 71 | % length, to make e.g. a "projected column density" image 72 | nTreeNGB = 0 % use tree-based search integrator instead of mesh (0=disabled) 73 | viStepSize = 1.0 % volume integration sub-stepping size (0=disabled) 74 | % in (Arepo) code units 75 | rayMaxT = 1000000.0 % maximum ray integration parametric length 76 | rgbLine = 5.0 5.0 5.0 % (RGB) bounding box 77 | rgbTetra = 0.01 0.01 0.01 % (RGB) tetra edges 78 | rgbVoronoi = 0.0 0.05 0.0 % (RGB) voronoi edges 79 | rgbAbsorb = 0.0 0.0 0.0 % (RGB) absorption 80 | 81 | % End. 82 | 83 | -------------------------------------------------------------------------------- /examples/illustris_subbox0_config_360.txt: -------------------------------------------------------------------------------- 1 | % Sample ArepoVTK Configuration File 2 | 3 | % Input/Output 4 | % ------------ 5 | imageFile = output/frames_360/frame_1k360_NUMM.png % output: TGA image filename 6 | rawRGBFile = frame.raw.txt % output: raw dump of floats (debug only) 7 | filename = output/subbox0/snapdir_subbox0_NUMM/snap_subbox0_NUMM % input: snapshot file 8 | paramFilename = param.txt % input: Arepo parameter file 9 | writeRGB8bit = false % output 8 bit png 10 | writeRGB16bit = true % output 16 bit png 11 | 12 | % General 13 | % ------- 14 | nCores = 8 % number of cores to use (0=all) 15 | nTasks = 256 % number of tasks/threads to run (0=auto) 16 | quickRender = false % unused 17 | openWindow = false % unused 18 | verbose = true % report more information 19 | totNumJobs = 0 % set >=1 to split single image render across multiple jobs (0=disable) 20 | jobExpansionFac = 1 % increase number of jobs by this factor, only for render not mask (per dim) 21 | maskFileBase = % create/use maskfile for job based frustrum culling 22 | maskPadFac = 0.0 % frustrum padding factor in code spatial units 23 | 24 | % Frame/Camera 25 | % ------------ 26 | imageXPixels = 2048 % frame resolution (X), e.g. 1024, 1920 27 | imageYPixels = 2048 % frame resolution (Y), e.g. 768, 1080 28 | swScale = 1.0 % screenWindow mult factor * [-1,1] 29 | cameraType = fisheye % ortho, perspective, fisheye, env, rift 30 | cameraFOV = 360.0 % degrees 31 | cameraPosition = 3750 3750 3750 % (XYZ) camera position in world coord system 32 | cameraLookAt = 7500 3750 3750 % (XYZ) point centered in camera FOV 33 | cameraUp = 0.0 1.0 0.0 % (XYZ) camera "up" vector 34 | 35 | % Data Processing 36 | % --------------- 37 | readPartType = 0 % 0=gas, 1=dm, 4=stars, 5=bhs 38 | recenterBoxCoords = 9000 17000 63000 % (XYZ) shift all points for new center (false=disable) 39 | convertUthermToKelvin = true % convert SphP.Utherm field to temp in Kelvin 40 | takeLogUtherm = true % convert K to log(K) 41 | 42 | % Transfer Function 43 | % ----------------- 44 | addTF_01 = linear Temp 2.0 3.5 0.0 0.0 0.0 0.0 0.0 0.2 45 | addTF_02 = linear Temp 3.5 4.1 0.0 0.0 0.2 0.0 0.0 0.6 46 | addTF_03 = linear Temp 4.1 5.5 0.0 0.0 0.6 0.0 1.0 0.4 47 | addTF_04 = linear Temp 5.5 6.0 0.0 1.0 0.4 1.0 0.5 0.0 48 | addTF_05 = linear Temp 6.0 6.8 1.0 0.5 0.0 1.0 0.0 0.0 49 | addTF_06 = linear Temp 6.8 7.0 1.0 0.0 0.0 1.0 1.0 1.0 50 | addTF_07 = linear Temp 7.0 9.9 1.0 1.0 1.0 1.0 1.0 1.0 51 | 52 | % Animation 53 | % --------- 54 | numFrames = -1 % set to 1 55 | startFrame = -1 % set by -s cmdline flag 56 | timePerFrame = 1.0 % establish unit system of time/frame 57 | 58 | %addKF_01 = 0.0 4320.0 rotXZ 28.2743339 linear % 4.5 total orbits (960 frames, 32 sec per 2pi orbit) 59 | %addKF_01 = 0.0 4320.0 rotXZ 37.699112 linear % 720 frames (24 sec) per 2pi orbit (Mark's setup) 60 | 61 | minScale = 0.0 % based on 0.0 for orig_frame 2000 62 | maxScale = 4.4 % based on 3.59629 for orig_frame 2000 63 | 64 | % Render 65 | % ------ 66 | drawBBox = false % draw simulation bounding box 67 | drawTetra = false % draw delaunay tetrahedra 68 | drawVoronoi = false % draw voronoi polyhedra faces 69 | drawSphere = false % draw test sphere lat/long lines 70 | projColDens = false % calculate/save raw line integrals 71 | nTreeNGB = 28 % use tree-based search integrator instead of mesh (0=disabled) 72 | viStepSize = 4 % volume integration sub-stepping size (0=disabled) 73 | rayMaxT = 15000.0 % maximum ray integration parametric length 74 | rgbLine = 5.0 5.0 5.0 % (RGB) bounding box 75 | rgbTetra = 0.01 0.01 0.01 % (RGB) tetra edges 76 | rgbVoronoi = 0.0 0.05 0.0 % (RGB) voronoi edges 77 | rgbAbsorb = 15000 15000 15000 %10000 10000 10000 % (RGB) absorption, 0=none 78 | 79 | % End. 80 | 81 | -------------------------------------------------------------------------------- /tests/config_tng100_cutout.txt: -------------------------------------------------------------------------------- 1 | % Sample ArepoVTK Configuration File 2 | 3 | % Input/Output 4 | % ------------ 5 | imageFile = frame_tng100_cutout.png % output: TGA/PNG image filename 6 | filename = cutout_480285 % input: snapshot file 7 | paramFilename = tests/param_tng100_cutout.txt % input: Arepo parameter file 8 | writeRGB8bit = true % output 8 bit png 9 | writeRGB16bit = false % output 16 bit png 10 | 11 | % General 12 | % ------- 13 | nCores = 0 % number of cores to use (0=all) 14 | nTasks = 160 % number of tasks/threads to run (0=auto) 15 | quickRender = false % unused 16 | openWindow = false % unused 17 | verbose = false % report more information 18 | totNumJobs = 0 % set >=1 to split single render across multiple jobs (0=disable) 19 | jobExpansionFac = 1 % increase number of jobs by this factor, only for render not mask (per dim) 20 | maskFileBase = % create/use maskfile for job based frustrum culling 21 | maskPadFac = 0.0 % frustrum padding factor in code spatial units 22 | 23 | % Frame/Camera 24 | % ------------ 25 | imageXPixels = 1280 % frame resolution (X), e.g. 1024, 1920 26 | imageYPixels = 720 % frame resolution (Y), e.g. 768, 1080 27 | swScale = 50.0 % screenWindow mult factor * [-1,1] 28 | cameraType = ortho % ortho, perspective, fisheye, env, rift 29 | cameraFOV = 0.0 % degrees 30 | cameraPosition = 1000 1000 960 % (XYZ) camera position in world coord system 31 | cameraLookAt = 1000 1000 1000 % (XYZ) we have shifted galaxy to box center 32 | cameraUp = 0.0 1.0 0.0 % (XYZ) camera "up" vector 33 | 34 | % Data Processing 35 | % --------------- 36 | readPartType = 0 % 0=gas, 1=dm, 4=stars, 5=bhs 37 | recenterBoxCoords = 8361 30797 14480 % (XYZ) SubhaloPos, i.e. shift galaxy to box center 38 | convertUthermToKelvin = true % convert SphP.Utherm field to temp in Kelvin 39 | takeLogUtherm = true % convert K to log(K) 40 | takeLogDens = false % convert Density to log 41 | 42 | % Transfer Function 43 | % ----------------- 44 | addTF_01 = gaussian_table BMag gist_heat 0 1.0 0.08 0.01 % linear microGauss 45 | %addTF_01 = gaussian_table BMag gist_heat 0 0.35 0.2 0.01 46 | %addTF_01 = gaussian_table BMag gist_heat 0 0.35 0.3 0.01 47 | %addTF_01 = gaussian BMag 0.8 0.005 1.0 1.0 1.0 % white at 0.8 uGauss 48 | 49 | addTF_01 = gaussian_table Density mpl_inferno 0 2e-4 1e-5 2e-6 50 | addTF_01 = gaussian_table Density mpl_inferno 0 2.5e-4 1e-4 1e-5 51 | addTF_01 = gaussian_table Density mpl_inferno 0 8.3e-4 5e-4 1e-5 52 | addTF_01 = gaussian_table Density mpl_inferno 0 1.3e-3 1e-3 1e-4 53 | addTF_01 = gaussian_table Density mpl_inferno 0 1e-2 7e-3 1e-3 54 | 55 | % Animation 56 | % --------- 57 | numFrames = 1 % single image 58 | 59 | % Render 60 | % ------ 61 | drawBBox = false % draw simulation bounding box 62 | drawTetra = false % draw delaunay tetrahedra 63 | drawVoronoi = false % draw voronoi polyhedra faces 64 | drawSphere = false % draw test sphere lat/long lines 65 | projColDens = true % calculate/save raw line integrals 66 | nTreeNGB = 32 % use tree-based search integrator instead of mesh (0=disabled) 67 | viStepSize = 0.1 % volume integration sub-stepping size (0=disabled) 68 | rayMaxT = 80.0 % maximum ray integration parametric length 69 | rgbLine = 5.0 5.0 5.0 % (RGB) bounding box 70 | rgbTetra = 0.0 0.0 0.0 % (RGB) tetra edges 71 | rgbVoronoi = 0.0 0.0 0.0 % (RGB) voronoi edges 72 | rgbAbsorb = 0 0 0 % (RGB) absorption, 0=none 73 | 74 | % alternative perspective camera render: 75 | 76 | %swScale = 1.0 % screenWindow mult factor * [-1,1] 77 | %cameraType = persp % ortho, perspective, fisheye, env, rift 78 | %cameraFOV = 50.0 % degrees 79 | %cameraPosition = 1000 1000 900 % (XYZ) camera position in world coord system 80 | %rayMaxT = 200.0 % maximum ray integration parametric length 81 | -------------------------------------------------------------------------------- /examples/illustris_subbox0_config_8k.txt: -------------------------------------------------------------------------------- 1 | % Sample ArepoVTK Configuration File 2 | 3 | % Input/Output 4 | % ------------ 5 | imageFile = output/frames_8192/frame_NUMM.png % output: TGA image filename 6 | rawRGBFile = frame.raw.txt % output: raw dump of floats (debug only) 7 | filename = output/subbox0/snapdir_subbox0_NUMM/snap_subbox0_NUMM % input: snapshot file 8 | paramFilename = param.txt % input: Arepo parameter file 9 | writeRGB8bit = false % output 8 bit png 10 | writeRGB16bit = true % output 16 bit png 11 | 12 | % General 13 | % ------- 14 | nCores = 8 % number of cores to use (0=all) 15 | nTasks = 512 % number of tasks/threads to run (0=auto) 16 | quickRender = false % unused 17 | openWindow = false % unused 18 | verbose = true % report more information 19 | totNumJobs = 0 % set >=1 to split single image render across multiple jobs (0=disable) 20 | jobExpansionFac = 1 % increase number of jobs by this factor, only for render not mask (per dim) 21 | maskFileBase = % create/use maskfile for job based frustrum culling 22 | maskPadFac = 0.0 % frustrum padding factor in code spatial units 23 | 24 | % Frame/Camera 25 | % ------------ 26 | imageXPixels = 8192 % frame resolution (X), e.g. 1024, 1920 27 | imageYPixels = 8192 % frame resolution (Y), e.g. 768, 1080 28 | swScale = 1.0 % screenWindow mult factor * [-1,1] 29 | cameraType = fisheye % ortho, perspective, fisheye, env, rift 30 | cameraFOV = 180.0 % degrees 31 | cameraPosition = 7400 3750 3750 % (XYZ) camera position in world coord system 32 | cameraLookAt = 3750 3750 3750 % (XYZ) point centered in camera FOV 33 | cameraUp = 0.0 1.0 0.0 % (XYZ) camera "up" vector 34 | 35 | % Data Processing 36 | % --------------- 37 | readPartType = 0 % 0=gas, 1=dm, 4=stars, 5=bhs 38 | recenterBoxCoords = 9000 17000 63000 % (XYZ) shift all points for new center (false=disable) 39 | convertUthermToKelvin = true % convert SphP.Utherm field to temp in Kelvin 40 | takeLogUtherm = true % convert K to log(K) 41 | 42 | % Transfer Function 43 | % ----------------- 44 | addTF_01 = linear Temp 2.0 3.5 0.0 0.0 0.0 0.0 0.0 0.2 45 | addTF_02 = linear Temp 3.5 4.1 0.0 0.0 0.2 0.0 0.0 0.6 46 | addTF_03 = linear Temp 4.1 5.5 0.0 0.0 0.6 0.0 1.0 0.4 47 | addTF_04 = linear Temp 5.5 6.0 0.0 1.0 0.4 1.0 0.5 0.0 48 | addTF_05 = linear Temp 6.0 6.8 1.0 0.5 0.0 1.0 0.0 0.0 49 | addTF_06 = linear Temp 6.8 7.0 1.0 0.0 0.0 1.0 1.0 1.0 50 | addTF_07 = linear Temp 7.0 9.9 1.0 1.0 1.0 1.0 1.0 1.0 51 | 52 | % Animation 53 | % --------- 54 | numFrames = -1 % set to 1 55 | startFrame = -1 % set by -s cmdline flag 56 | timePerFrame = 1.0 % establish unit system of time/frame 57 | 58 | addKF_01 = 0.0 4320.0 rotXZ 18.8495559 linear % 3 total orbits (1440 frames, 48 sec per 2pi orbit) 59 | %addKF_01 = 0.0 4320.0 rotXZ 28.2743339 linear % 4.5 total orbits (960 frames, 32 sec per 2pi orbit) 60 | %addKF_01 = 0.0 4320.0 rotXZ 37.699112 linear % 720 frames (24 sec) per 2pi orbit (Mark's setup) 61 | 62 | minScale = 0.0 % based on 0.0 for orig_frame 2000 63 | maxScale = 4.4 % based on 3.59629 for orig_frame 2000 64 | 65 | % Render 66 | % ------ 67 | drawBBox = false % draw simulation bounding box 68 | drawTetra = false % draw delaunay tetrahedra 69 | drawVoronoi = false % draw voronoi polyhedra faces 70 | drawSphere = false % draw test sphere lat/long lines 71 | projColDens = false % calculate/save raw line integrals 72 | nTreeNGB = 28 % use tree-based search integrator instead of mesh (0=disabled) 73 | viStepSize = 4.0 % volume integration sub-stepping size (0=disabled) 74 | rayMaxT = 15000.0 % maximum ray integration parametric length 75 | rgbLine = 5.0 5.0 5.0 % (RGB) bounding box 76 | rgbTetra = 0.01 0.01 0.01 % (RGB) tetra edges 77 | rgbVoronoi = 0.0 0.05 0.0 % (RGB) voronoi edges 78 | rgbAbsorb = 15000 15000 15000 %10000 10000 10000 % (RGB) absorption, 0=none 79 | 80 | % End. 81 | 82 | -------------------------------------------------------------------------------- /examples/illustris_subbox0_config_360_C1.txt: -------------------------------------------------------------------------------- 1 | % Sample ArepoVTK Configuration File 2 | 3 | % A1 = 400 separation, same look point 4 | % B1 = 100 separation, same look point 5 | % C1 = 25 separation, same look point 6 | % X2 = shifted look point, such that view directions are orthogonal 7 | % shift this (second eye) in the positive z direction from the box center (first eye) 8 | 9 | % Input/Output 10 | % ------------ 11 | imageFile = output/frames_360_C1/frame_1k360_NUMM.png % output: TGA image filename 12 | rawRGBFile = frame.raw.txt % output: raw dump of floats (debug only) 13 | filename = output/subbox0/snapdir_subbox0_NUMM/snap_subbox0_NUMM % input: snapshot file 14 | paramFilename = param.txt % input: Arepo parameter file 15 | writeRGB8bit = false % output 8 bit png 16 | writeRGB16bit = true % output 16 bit png 17 | 18 | % General 19 | % ------- 20 | nCores = 8 % number of cores to use (0=all) 21 | nTasks = 256 % number of tasks/threads to run (0=auto) 22 | quickRender = false % unused 23 | openWindow = false % unused 24 | verbose = true % report more information 25 | totNumJobs = 0 % set >=1 to split single image render across multiple jobs (0=disable) 26 | jobExpansionFac = 1 % increase number of jobs by this factor, only for render not mask (per dim) 27 | maskFileBase = % create/use maskfile for job based frustrum culling 28 | maskPadFac = 0.0 % frustrum padding factor in code spatial units 29 | 30 | % Frame/Camera 31 | % ------------ 32 | imageXPixels = 2048 % frame resolution (X), e.g. 1024, 1920 33 | imageYPixels = 2048 % frame resolution (Y), e.g. 768, 1080 34 | swScale = 1.0 % screenWindow mult factor * [-1,1] 35 | cameraType = fisheye % ortho, perspective, fisheye, env, rift 36 | cameraFOV = 360.0 % degrees 37 | cameraPosition = 3750 3750 3775 % (XYZ) camera position in world coord system 38 | cameraLookAt = 7500 3750 3750 % (XYZ) point centered in camera FOV 39 | cameraUp = 0.0 1.0 0.0 % (XYZ) camera "up" vector 40 | 41 | % Data Processing 42 | % --------------- 43 | readPartType = 0 % 0=gas, 1=dm, 4=stars, 5=bhs 44 | recenterBoxCoords = 9000 17000 63000 % (XYZ) shift all points for new center (false=disable) 45 | convertUthermToKelvin = true % convert SphP.Utherm field to temp in Kelvin 46 | takeLogUtherm = true % convert K to log(K) 47 | 48 | % Transfer Function 49 | % ----------------- 50 | addTF_01 = linear Temp 2.0 3.5 0.0 0.0 0.0 0.0 0.0 0.2 51 | addTF_02 = linear Temp 3.5 4.1 0.0 0.0 0.2 0.0 0.0 0.6 52 | addTF_03 = linear Temp 4.1 5.5 0.0 0.0 0.6 0.0 1.0 0.4 53 | addTF_04 = linear Temp 5.5 6.0 0.0 1.0 0.4 1.0 0.5 0.0 54 | addTF_05 = linear Temp 6.0 6.8 1.0 0.5 0.0 1.0 0.0 0.0 55 | addTF_06 = linear Temp 6.8 7.0 1.0 0.0 0.0 1.0 1.0 1.0 56 | addTF_07 = linear Temp 7.0 9.9 1.0 1.0 1.0 1.0 1.0 1.0 57 | 58 | % Animation 59 | % --------- 60 | numFrames = -1 % set to 1 61 | startFrame = -1 % set by -s cmdline flag 62 | timePerFrame = 1.0 % establish unit system of time/frame 63 | 64 | %addKF_01 = 0.0 4320.0 rotXZ 28.2743339 linear % 4.5 total orbits (960 frames, 32 sec per 2pi orbit) 65 | %addKF_01 = 0.0 4320.0 rotXZ 37.699112 linear % 720 frames (24 sec) per 2pi orbit (Mark's setup) 66 | 67 | minScale = 0.0 % based on 0.0 for orig_frame 2000 68 | maxScale = 4.4 % based on 3.59629 for orig_frame 2000 69 | 70 | % Render 71 | % ------ 72 | drawBBox = false % draw simulation bounding box 73 | drawTetra = false % draw delaunay tetrahedra 74 | drawVoronoi = false % draw voronoi polyhedra faces 75 | drawSphere = false % draw test sphere lat/long lines 76 | projColDens = false % calculate/save raw line integrals 77 | nTreeNGB = 28 % use tree-based search integrator instead of mesh (0=disabled) 78 | viStepSize = 4 % volume integration sub-stepping size (0=disabled) 79 | rayMaxT = 15000.0 % maximum ray integration parametric length 80 | rgbLine = 5.0 5.0 5.0 % (RGB) bounding box 81 | rgbTetra = 0.01 0.01 0.01 % (RGB) tetra edges 82 | rgbVoronoi = 0.0 0.05 0.0 % (RGB) voronoi edges 83 | rgbAbsorb = 15000 15000 15000 %10000 10000 10000 % (RGB) absorption, 0=none 84 | 85 | % End. 86 | 87 | -------------------------------------------------------------------------------- /examples/illustris_box1820_param.txt: -------------------------------------------------------------------------------- 1 | % Arepo Parameter File (ArepoVTK Testing) 2 | 3 | %---- Relevant files 4 | 5 | InitCondFile ./unused 6 | OutputDir ./output 7 | EnergyFile unused 8 | InfoFile unused 9 | TimingsFile unused 10 | CpuFile unused 11 | RestartFile unused 12 | SnapshotFileBase unused 13 | OutputListFilename unused 14 | 15 | %---- File formats 16 | 17 | ICFormat 3 18 | SnapFormat 3 19 | 20 | %---- CPU-time limits 21 | 22 | TimeLimitCPU 21600 % unused 23 | CpuTimeBetRestartFile 7200 % unused 24 | ResubmitOn 0 25 | ResubmitCommand unused 26 | 27 | %----- Memory alloction 28 | 29 | MaxMemSize 55000 % sets maximum memory use in MByte 30 | BufferSize 100 % in MByte 31 | BufferSizeGravity 100 32 | 33 | %----- New 34 | 35 | MultipleDomains 1 36 | TopNodeFactor 5 37 | MaxTimeBinsWithoutDomainDecomposition 5 38 | 39 | %----- Mesh regularization options 40 | 41 | CellShapingFactor 0.2 % sets threshold for CM-displacement 42 | CellShapingSpeed 0.5 % sets speed of CM correction 43 | 44 | %ErrTolThetaInZeldovich 0.5 % tree opening parameter for inverse Zeldovich mesh correction 45 | %MeanVolume 1.0e30 % desired maximum volume of cells for Zeldovich mesh corrrection 46 | %MeanMass 3.0e-5 % desired maximum mass of cells for Zeldovich mesh corrrection 47 | 48 | %---- Caracteristics of run 49 | 50 | TimeBegin 0.0 % Begin of the simulation 51 | TimeMax 1.0 % End of the simulation 52 | BoxSize 75000.0 53 | 54 | %---- Basic code options that set the type of simulation 55 | 56 | ComovingIntegrationOn 0 57 | PeriodicBoundariesOn 1 58 | CoolingOn 0 59 | StarformationOn 0 60 | 61 | %---- Cosmological parameters 62 | 63 | Omega0 0.0 64 | OmegaLambda 0.0 65 | OmegaBaryon 0.0 66 | HubbleParam 0.0 67 | 68 | %---- Output frequency and output paramaters 69 | 70 | OutputListOn 0 71 | TimeBetSnapshot 0.1 72 | TimeOfFirstSnapshot 0.0 73 | TimeBetStatistics 0.01 74 | NumFilesPerSnapshot 512 75 | NumFilesWrittenInParallel 1 76 | 77 | %---- Accuracy of time integration 78 | 79 | TypeOfTimestepCriterion 0 80 | ErrTolIntAccuracy 0.025 81 | CourantFac 0.4 82 | MaxRMSDisplacementFac 0.2 83 | MaxSizeTimestep 1e-2 84 | MinSizeTimestep 1e-10 85 | 86 | %---- Treatment of empty space and temperature limits 87 | 88 | MinimumDensityOnStartUp 1.0e-20 89 | LimitUBelowThisDensity 1.0e-20 90 | LimitUBelowCertainDensityToThisValue 1.0 91 | 92 | InitGasTemp 0 93 | MinGasTemp 0 94 | MinEgySpec 0 95 | 96 | %---- Tree algorithm, force accuracy, domain update frequency 97 | 98 | TypeOfOpeningCriterion 1 99 | ErrTolTheta 0.7 100 | ErrTolForceAcc 0.0025 101 | 102 | %---- Initial density estimate 103 | 104 | DesNumNgb 32 105 | MaxNumNgbDeviation 2 106 | 107 | %---- System of units 108 | 109 | UnitLength_in_cm 3.085678e21 ; 1.0 kpc 110 | UnitMass_in_g 1.989e43 ; 1.0e10 solar masses 111 | UnitVelocity_in_cm_per_s 1e5 ; 1 km/sec 112 | GravityConstantInternal 0 113 | 114 | %---- Gravitational softening lengths 115 | 116 | MinGasHsmlFractional 0.25 % in principal obsolete 117 | GasSoftFactor 2.5 118 | SofteningGas 1.0 119 | SofteningHalo 0 120 | SofteningDisk 0 121 | SofteningBulge 0 122 | SofteningStars 0 123 | SofteningBndry 0 124 | SofteningGasMaxPhys 0.5 125 | SofteningHaloMaxPhys 0 126 | SofteningDiskMaxPhys 0 127 | SofteningBulgeMaxPhys 0 128 | SofteningStarsMaxPhys 0 129 | SofteningBndryMaxPhys 0 130 | 131 | % SPECIAL_BOUNDARY 132 | %BoundaryLayerScaleFactor 0.002 133 | %SpecialBoundarySpeed 1.2566 134 | %SpecialBoundaryMotion 4 135 | %SpecialBoundaryType 1 136 | %OutflowPressure 0 137 | 138 | %---- Parameters for star formation model 139 | %CritPhysDensity 0 % critical physical density for star formation(in cm^(-3)) 140 | %MaxSfrTimescale 2.27 % in internal time units (1.5) 141 | %CritOverDensity 57.7 % overdensity threshold value 142 | %TempSupernova 5.73e7 % in Kelvin (1.0e8) 143 | %TempClouds 1000.0 % in Kelvin 144 | %FactorSN 0.1 % changed internally 145 | %FactorEVP 573.0 % (1000.0) 146 | %TemperatureThresh 0 147 | %TreecoolFile ../Arepo/data/TREECOOL_fg_dec11 148 | 149 | % End 150 | 151 | -------------------------------------------------------------------------------- /examples/tng_subbox0_param.txt: -------------------------------------------------------------------------------- 1 | % Arepo Parameter File (ArepoVTK Testing) 2 | 3 | %---- Relevant files 4 | 5 | InitCondFile ./unused 6 | OutputDir ./output 7 | EnergyFile unused 8 | InfoFile unused 9 | TimingsFile unused 10 | CpuFile unused 11 | RestartFile unused 12 | SnapshotFileBase unused 13 | OutputListFilename unused 14 | 15 | %---- File formats 16 | 17 | ICFormat 3 18 | SnapFormat 3 19 | 20 | %---- CPU-time limits 21 | 22 | TimeLimitCPU 21600 % unused 23 | CpuTimeBetRestartFile 7200 % unused 24 | ResubmitOn 0 25 | ResubmitCommand unused 26 | 27 | %----- Memory alloction 28 | 29 | MaxMemSize 42000 % sets maximum memory use in MByte 30 | BufferSize 100 % in MByte 31 | BufferSizeGravity 100 32 | 33 | %----- New 34 | 35 | MultipleDomains 1 36 | TopNodeFactor 5 37 | MaxTimeBinsWithoutDomainDecomposition 5 38 | 39 | %----- Mesh regularization options 40 | 41 | CellShapingFactor 0.2 % sets threshold for CM-displacement 42 | CellShapingSpeed 0.5 % sets speed of CM correction 43 | 44 | %ErrTolThetaInZeldovich 0.5 % tree opening parameter for inverse Zeldovich mesh correction 45 | %MeanVolume 1.0e30 % desired maximum volume of cells for Zeldovich mesh corrrection 46 | %MeanMass 3.0e-5 % desired maximum mass of cells for Zeldovich mesh corrrection 47 | 48 | %---- Caracteristics of run 49 | 50 | TimeBegin 0.0 % Begin of the simulation 51 | TimeMax 1.0 % End of the simulation 52 | BoxSize 7500.0 % subbox0 53 | 54 | %---- Basic code options that set the type of simulation 55 | 56 | ComovingIntegrationOn 0 57 | PeriodicBoundariesOn 1 58 | CoolingOn 0 59 | StarformationOn 0 60 | 61 | %---- Cosmological parameters 62 | 63 | Omega0 0.0 64 | OmegaLambda 0.0 65 | OmegaBaryon 0.0 66 | HubbleParam 0.0 67 | 68 | %---- Output frequency and output paramaters 69 | 70 | OutputListOn 0 71 | TimeBetSnapshot 0.1 72 | TimeOfFirstSnapshot 0.0 73 | TimeBetStatistics 0.01 74 | NumFilesPerSnapshot 512 75 | NumFilesWrittenInParallel 1 76 | 77 | %---- Accuracy of time integration 78 | 79 | TypeOfTimestepCriterion 0 80 | ErrTolIntAccuracy 0.025 81 | CourantFac 0.4 82 | MaxRMSDisplacementFac 0.2 83 | MaxSizeTimestep 1e-2 84 | MinSizeTimestep 1e-10 85 | 86 | %---- Treatment of empty space and temperature limits 87 | 88 | MinimumDensityOnStartUp 1.0e-20 89 | LimitUBelowThisDensity 1.0e-20 90 | LimitUBelowCertainDensityToThisValue 1.0 91 | 92 | InitGasTemp 0 93 | MinGasTemp 0 94 | MinEgySpec 0 95 | 96 | %---- Tree algorithm, force accuracy, domain update frequency 97 | 98 | TypeOfOpeningCriterion 1 99 | ErrTolTheta 0.7 100 | ErrTolForceAcc 0.0025 101 | 102 | %---- Initial density estimate 103 | 104 | DesNumNgb 32 105 | MaxNumNgbDeviation 2 106 | 107 | %---- System of units 108 | 109 | UnitLength_in_cm 3.085678e21 ; 1.0 kpc 110 | UnitMass_in_g 1.989e43 ; 1.0e10 solar masses 111 | UnitVelocity_in_cm_per_s 1e5 ; 1 km/sec 112 | GravityConstantInternal 0 113 | 114 | %---- Gravitational softening lengths 115 | 116 | MinGasHsmlFractional 0.25 % in principal obsolete 117 | GasSoftFactor 2.5 118 | SofteningGas 1.0 119 | SofteningHalo 0 120 | SofteningDisk 0 121 | SofteningBulge 0 122 | SofteningStars 0 123 | SofteningBndry 0 124 | SofteningGasMaxPhys 0.5 125 | SofteningHaloMaxPhys 0 126 | SofteningDiskMaxPhys 0 127 | SofteningBulgeMaxPhys 0 128 | SofteningStarsMaxPhys 0 129 | SofteningBndryMaxPhys 0 130 | 131 | % SPECIAL_BOUNDARY 132 | %BoundaryLayerScaleFactor 0.002 133 | %SpecialBoundarySpeed 1.2566 134 | %SpecialBoundaryMotion 4 135 | %SpecialBoundaryType 1 136 | %OutflowPressure 0 137 | 138 | %---- Parameters for star formation model 139 | %CritPhysDensity 0 % critical physical density for star formation(in cm^(-3)) 140 | %MaxSfrTimescale 2.27 % in internal time units (1.5) 141 | %CritOverDensity 57.7 % overdensity threshold value 142 | %TempSupernova 5.73e7 % in Kelvin (1.0e8) 143 | %TempClouds 1000.0 % in Kelvin 144 | %FactorSN 0.1 % changed internally 145 | %FactorEVP 573.0 % (1000.0) 146 | %TemperatureThresh 0 147 | %TreecoolFile ../Arepo/data/TREECOOL_fg_dec11 148 | 149 | % End 150 | 151 | -------------------------------------------------------------------------------- /examples/illustris_box1820_128k_nni_param.txt: -------------------------------------------------------------------------------- 1 | % Arepo Parameter File (ArepoVTK Testing) 2 | 3 | %---- Relevant files 4 | 5 | InitCondFile ./unused 6 | OutputDir ./output 7 | EnergyFile unused 8 | InfoFile unused 9 | TimingsFile unused 10 | CpuFile unused 11 | RestartFile unused 12 | SnapshotFileBase unused 13 | OutputListFilename unused 14 | 15 | %---- File formats 16 | 17 | ICFormat 3 18 | SnapFormat 3 19 | 20 | %---- CPU-time limits 21 | 22 | TimeLimitCPU 21600 % unused 23 | CpuTimeBetRestartFile 7200 % unused 24 | ResubmitOn 0 25 | ResubmitCommand unused 26 | 27 | %----- Memory alloction 28 | 29 | MaxMemSize 52000 % sets maximum memory use in MByte 30 | BufferSize 100 % in MByte 31 | BufferSizeGravity 100 32 | 33 | %----- New 34 | 35 | MultipleDomains 1 36 | TopNodeFactor 5 37 | MaxTimeBinsWithoutDomainDecomposition 5 38 | 39 | %----- Mesh regularization options 40 | 41 | CellShapingFactor 0.2 % sets threshold for CM-displacement 42 | CellShapingSpeed 0.5 % sets speed of CM correction 43 | 44 | %ErrTolThetaInZeldovich 0.5 % tree opening parameter for inverse Zeldovich mesh correction 45 | %MeanVolume 1.0e30 % desired maximum volume of cells for Zeldovich mesh corrrection 46 | %MeanMass 3.0e-5 % desired maximum mass of cells for Zeldovich mesh corrrection 47 | 48 | %---- Caracteristics of run 49 | 50 | TimeBegin 0.0 % Begin of the simulation 51 | TimeMax 1.0 % End of the simulation 52 | BoxSize 75000.0 53 | 54 | %---- Basic code options that set the type of simulation 55 | 56 | ComovingIntegrationOn 0 57 | PeriodicBoundariesOn 1 58 | CoolingOn 0 59 | StarformationOn 0 60 | 61 | %---- Cosmological parameters 62 | 63 | Omega0 0.0 64 | OmegaLambda 0.0 65 | OmegaBaryon 0.0 66 | HubbleParam 0.0 67 | 68 | %---- Output frequency and output paramaters 69 | 70 | OutputListOn 0 71 | TimeBetSnapshot 0.1 72 | TimeOfFirstSnapshot 0.0 73 | TimeBetStatistics 0.01 74 | NumFilesPerSnapshot 512 75 | NumFilesWrittenInParallel 1 76 | 77 | %---- Accuracy of time integration 78 | 79 | TypeOfTimestepCriterion 0 80 | ErrTolIntAccuracy 0.025 81 | CourantFac 0.4 82 | MaxRMSDisplacementFac 0.2 83 | MaxSizeTimestep 1e-2 84 | MinSizeTimestep 1e-10 85 | 86 | %---- Treatment of empty space and temperature limits 87 | 88 | MinimumDensityOnStartUp 1.0e-20 89 | LimitUBelowThisDensity 1.0e-20 90 | LimitUBelowCertainDensityToThisValue 1.0 91 | 92 | InitGasTemp 0 93 | MinGasTemp 0 94 | MinEgySpec 0 95 | 96 | %---- Tree algorithm, force accuracy, domain update frequency 97 | 98 | TypeOfOpeningCriterion 1 99 | ErrTolTheta 0.7 100 | ErrTolForceAcc 0.0025 101 | 102 | %---- Initial density estimate 103 | 104 | DesNumNgb 32 105 | MaxNumNgbDeviation 2 106 | 107 | %---- System of units 108 | 109 | UnitLength_in_cm 3.085678e21 ; 1.0 kpc 110 | UnitMass_in_g 1.989e43 ; 1.0e10 solar masses 111 | UnitVelocity_in_cm_per_s 1e5 ; 1 km/sec 112 | GravityConstantInternal 0 113 | 114 | %---- Gravitational softening lengths 115 | 116 | MinGasHsmlFractional 0.25 % in principal obsolete 117 | GasSoftFactor 2.5 118 | SofteningGas 1.0 119 | SofteningHalo 0 120 | SofteningDisk 0 121 | SofteningBulge 0 122 | SofteningStars 0 123 | SofteningBndry 0 124 | SofteningGasMaxPhys 0.5 125 | SofteningHaloMaxPhys 0 126 | SofteningDiskMaxPhys 0 127 | SofteningBulgeMaxPhys 0 128 | SofteningStarsMaxPhys 0 129 | SofteningBndryMaxPhys 0 130 | 131 | % SPECIAL_BOUNDARY 132 | %BoundaryLayerScaleFactor 0.002 133 | %SpecialBoundarySpeed 1.2566 134 | %SpecialBoundaryMotion 4 135 | %SpecialBoundaryType 1 136 | %OutflowPressure 0 137 | 138 | %---- Parameters for star formation model 139 | %CritPhysDensity 0 % critical physical density for star formation(in cm^(-3)) 140 | %MaxSfrTimescale 2.27 % in internal time units (1.5) 141 | %CritOverDensity 57.7 % overdensity threshold value 142 | %TempSupernova 5.73e7 % in Kelvin (1.0e8) 143 | %TempClouds 1000.0 % in Kelvin 144 | %FactorSN 0.1 % changed internally 145 | %FactorEVP 573.0 % (1000.0) 146 | %TemperatureThresh 0 147 | %TreecoolFile ../Arepo/data/TREECOOL_fg_dec11 148 | 149 | % End 150 | 151 | -------------------------------------------------------------------------------- /examples/zoom_Nelson16_param.txt: -------------------------------------------------------------------------------- 1 | % Arepo Parameter File (ArepoVTK Testing) 2 | 3 | %---- Relevant files 4 | 5 | InitCondFile ./unused 6 | OutputDir ./output 7 | EnergyFile unused 8 | InfoFile unused 9 | TimingsFile unused 10 | CpuFile unused 11 | RestartFile unused 12 | SnapshotFileBase unused 13 | OutputListFilename unused 14 | 15 | %---- File formats 16 | 17 | ICFormat 3 18 | SnapFormat 3 19 | 20 | %---- CPU-time limits 21 | 22 | TimeLimitCPU 21600 % unused 23 | CpuTimeBetRestartFile 7200 % unused 24 | ResubmitOn 0 25 | ResubmitCommand unused 26 | 27 | %----- Memory alloction 28 | 29 | MaxMemSize 40000 %5000 % sets maximum memory use in MByte 30 | BufferSize 100 % in MByte 31 | BufferSizeGravity 100 32 | 33 | %----- New 34 | 35 | MultipleDomains 1 36 | TopNodeFactor 5 37 | MaxTimeBinsWithoutDomainDecomposition 5 38 | 39 | %----- Mesh regularization options 40 | 41 | CellShapingFactor 0.2 % sets threshold for CM-displacement 42 | CellShapingSpeed 0.5 % sets speed of CM correction 43 | 44 | %ErrTolThetaInZeldovich 0.5 % tree opening parameter for inverse Zeldovich mesh correction 45 | %MeanVolume 1.0e30 % desired maximum volume of cells for Zeldovich mesh corrrection 46 | %MeanMass 3.0e-5 % desired maximum mass of cells for Zeldovich mesh corrrection 47 | 48 | %---- Caracteristics of run 49 | 50 | TimeBegin 0.0 % Begin of the simulation 51 | TimeMax 1.0 % End of the simulation 52 | BoxSize 20000.0 % subbox0 53 | 54 | %---- Basic code options that set the type of simulation 55 | 56 | ComovingIntegrationOn 0 57 | PeriodicBoundariesOn 1 58 | CoolingOn 0 59 | StarformationOn 0 60 | 61 | %---- Cosmological parameters 62 | 63 | Omega0 0.0 64 | OmegaLambda 0.0 65 | OmegaBaryon 0.0 66 | HubbleParam 0.0 67 | 68 | %---- Output frequency and output paramaters 69 | 70 | OutputListOn 0 71 | TimeBetSnapshot 0.1 72 | TimeOfFirstSnapshot 0.0 73 | TimeBetStatistics 0.01 74 | NumFilesPerSnapshot 512 75 | NumFilesWrittenInParallel 1 76 | 77 | %---- Accuracy of time integration 78 | 79 | TypeOfTimestepCriterion 0 80 | ErrTolIntAccuracy 0.025 81 | CourantFac 0.4 82 | MaxRMSDisplacementFac 0.2 83 | MaxSizeTimestep 1e-2 84 | MinSizeTimestep 1e-10 85 | 86 | %---- Treatment of empty space and temperature limits 87 | 88 | MinimumDensityOnStartUp 1.0e-20 89 | LimitUBelowThisDensity 1.0e-20 90 | LimitUBelowCertainDensityToThisValue 1.0 91 | 92 | InitGasTemp 0 93 | MinGasTemp 0 94 | MinEgySpec 0 95 | 96 | %---- Tree algorithm, force accuracy, domain update frequency 97 | 98 | TypeOfOpeningCriterion 1 99 | ErrTolTheta 0.7 100 | ErrTolForceAcc 0.0025 101 | 102 | %---- Initial density estimate 103 | 104 | DesNumNgb 32 105 | MaxNumNgbDeviation 2 106 | 107 | %---- System of units 108 | 109 | UnitLength_in_cm 3.085678e21 ; 1.0 kpc 110 | UnitMass_in_g 1.989e43 ; 1.0e10 solar masses 111 | UnitVelocity_in_cm_per_s 1e5 ; 1 km/sec 112 | GravityConstantInternal 0 113 | 114 | %---- Gravitational softening lengths 115 | 116 | MinGasHsmlFractional 0.25 % in principal obsolete 117 | GasSoftFactor 2.5 118 | SofteningGas 1.0 119 | SofteningHalo 0 120 | SofteningDisk 0 121 | SofteningBulge 0 122 | SofteningStars 0 123 | SofteningBndry 0 124 | SofteningGasMaxPhys 0.5 125 | SofteningHaloMaxPhys 0 126 | SofteningDiskMaxPhys 0 127 | SofteningBulgeMaxPhys 0 128 | SofteningStarsMaxPhys 0 129 | SofteningBndryMaxPhys 0 130 | 131 | % SPECIAL_BOUNDARY 132 | %BoundaryLayerScaleFactor 0.002 133 | %SpecialBoundarySpeed 1.2566 134 | %SpecialBoundaryMotion 4 135 | %SpecialBoundaryType 1 136 | %OutflowPressure 0 137 | 138 | %---- Parameters for star formation model 139 | %CritPhysDensity 0 % critical physical density for star formation(in cm^(-3)) 140 | %MaxSfrTimescale 2.27 % in internal time units (1.5) 141 | %CritOverDensity 57.7 % overdensity threshold value 142 | %TempSupernova 5.73e7 % in Kelvin (1.0e8) 143 | %TempClouds 1000.0 % in Kelvin 144 | %FactorSN 0.1 % changed internally 145 | %FactorEVP 573.0 % (1000.0) 146 | %TemperatureThresh 0 147 | %TreecoolFile ../Arepo/data/TREECOOL_fg_dec11 148 | 149 | % End 150 | 151 | -------------------------------------------------------------------------------- /examples/zoom_Nelson16_config.txt: -------------------------------------------------------------------------------- 1 | % Sample ArepoVTK Configuration File 2 | 3 | % Input/Output 4 | % ------------ 5 | imageFile = output/frame_testL11_n200_si01_no625.png % output: TGA image filename 6 | rawRGBFile = frame.raw.txt % output: raw dump of floats (debug only) 7 | filename = output/h0L11/snapdir_058/snap_058 % input: snapshot file 8 | paramFilename = param.txt % input: Arepo parameter file 9 | 10 | % General 11 | % ------- 12 | nCores = 32 % number of cores to use (0=all) 13 | nTasks = 256 % number of tasks/threads to run (0=auto) 14 | quickRender = false % unused 15 | openWindow = false % unused 16 | verbose = true % report more information 17 | totNumJobs = 0 % set >=1 to split single image render across multiple jobs (0=disable) 18 | jobExpansionFac = 1 % increase number of jobs by this factor, only for render not mask (per dim) 19 | maskFileBase = % create/use maskfile for job based frustrum culling 20 | maskPadFac = 0.0 % frustrum padding factor in code spatial units 21 | 22 | % Frame/Camera 23 | % ------------ 24 | imageXPixels = 1920 % frame resolution (X), e.g. 1024, 1920 25 | imageYPixels = 1080 % frame resolution (Y), e.g. 768, 1080 26 | swScale = 651.36 % h0L9, screenWindow mult factor * [-1,1] 27 | cameraType = ortho % ortho, perspective, fisheye, env, rift 28 | cameraFOV = 0 % degrees 29 | cameraPosition = 9429.44 10242.7 9123.93 % h0L9 (XYZ) camera position in world coord system 30 | cameraLookAt = 9499.04 10261.6 9775.30 % (XYZ) point centered in camera FOV 31 | cameraUp = 0.0 1.0 0.0 % (XYZ) camera "up" vector 32 | 33 | % Data Processing 34 | % --------------- 35 | readPartType = 0 % 0=gas, 1=dm, 4=stars, 5=bhs 36 | recenterBoxCoords = -1 -1 -1 % (XYZ) shift all points for new center (-1 -1 -1=disable) 37 | convertUthermToKelvin = true % convert SphP.Utherm field to temp in Kelvin 38 | takeLogUtherm = true % convert K to log(K) 39 | takeLogDens = false % convert dens to log(dens) 40 | 41 | % Transfer Function 42 | % ----------------- 43 | %addTF_01 = linear Density 0.0 0.000001 0.0 0.0 0.0 0.0 0.0 0.0 44 | %addTF_02 = linear Density 0.000001 0.000005 0.0 0.0 0.0 0.0 0.0 0.05 45 | %addTF_03 = linear Density 0.000005 0.00001 0.0 0.0 0.05 0.0 0.3 0.5 46 | %addTF_04 = linear Density 0.00001 0.00005 0.0 0.3 0.5 0.8 0.4 0.6 47 | %addTF_05 = linear Density 0.00005 0.001 0.8 0.4 0.6 1.0 1.0 1.0 48 | %addTF_06 = linear Density 0.001 1.0 1.0 1.0 1.0 1.0 1.0 1.0 49 | 50 | addTF_01 = gaussian_table Temp idl_33_blue-red 4.4 6.3 6.0 0.003 51 | addTF_02 = gaussian_table Temp idl_33_blue-red 4.4 6.3 5.5 0.003 52 | addTF_03 = gaussian_table Temp idl_33_blue-red 4.4 6.3 5.0 0.006 53 | addTF_04 = gaussian_table Temp idl_33_blue-red 4.4 6.3 4.5 0.006 54 | #addTF_05 = gaussian_table Temp idl_33_blue-red 4.4 6.3 6.25 0.002 55 | 56 | % Animation 57 | % --------- 58 | numFrames = 1 % set to 1 59 | startFrame = 0 % set by -s cmdline flag 60 | timePerFrame = 0 % establish unit system of time/frame 61 | 62 | %addKF_01 = 0.0 4320.0 rotXZ 28.2743339 linear % 4.5 total orbits (960 frames, 32 sec per 2pi orbit) 63 | %addKF_01 = 0.0 4320.0 rotXZ 37.699112 linear % 720 frames (24 sec) per 2pi orbit (Mark's setup) 64 | 65 | %Using Config.maxScale = 0.05 current maxScale = 9616.01 66 | %Using Config.minScale = 0 current minScale = 5716 67 | 68 | %minScale = 0.0 % based on 0.0 for orig_frame 2000 69 | %maxScale = 0.0 % based on 3.59629 for orig_frame 2000 70 | 71 | % Render 72 | % ------ 73 | drawBBox = false % draw simulation bounding box 74 | drawTetra = false % draw delaunay tetrahedra 75 | drawVoronoi = false % draw voronoi polyhedra faces 76 | drawSphere = false % draw test sphere lat/long lines 77 | projColDens = false % calculate/save raw line integrals 78 | nTreeNGB = 200 % use tree-based search integrator instead of mesh (0=disabled) 79 | viStepSize = 0.1 % volume integration sub-stepping size (0=disabled) 80 | rayMaxT = 1302.7 % h0L9, maximum ray integration parametric length 81 | rgbLine = 5.0 5.0 5.0 % (RGB) bounding box 82 | rgbTetra = 0.01 0.01 0.01 % (RGB) tetra edges 83 | rgbVoronoi = 0.0 0.05 0.0 % (RGB) voronoi edges 84 | rgbAbsorb = 0.0 0.0 0.0 %10000 10000 10000 % (RGB) absorption, 0=none 85 | 86 | % End. 87 | 88 | -------------------------------------------------------------------------------- /examples/illustris_subbox0_param.txt: -------------------------------------------------------------------------------- 1 | % Arepo Parameter File (ArepoVTK Testing) 2 | 3 | %---- Relevant files 4 | 5 | InitCondFile ./unused 6 | OutputDir ./output 7 | EnergyFile unused 8 | InfoFile unused 9 | TimingsFile unused 10 | CpuFile unused 11 | RestartFile unused 12 | SnapshotFileBase unused 13 | OutputListFilename unused 14 | 15 | %---- File formats 16 | 17 | ICFormat 3 18 | SnapFormat 3 19 | 20 | %---- CPU-time limits 21 | 22 | TimeLimitCPU 21600 % unused 23 | CpuTimeBetRestartFile 7200 % unused 24 | ResubmitOn 0 25 | ResubmitCommand unused 26 | 27 | %----- Memory alloction 28 | 29 | %MaxMemSize 32000 % subbox0.2000 for mesh 30 | MaxMemSize 22000 % sets maximum memory use in MByte 31 | BufferSize 100 % in MByte 32 | BufferSizeGravity 100 33 | 34 | %----- New 35 | 36 | MultipleDomains 1 37 | TopNodeFactor 5 38 | MaxTimeBinsWithoutDomainDecomposition 5 39 | 40 | %----- Mesh regularization options 41 | 42 | CellShapingFactor 0.2 % sets threshold for CM-displacement 43 | CellShapingSpeed 0.5 % sets speed of CM correction 44 | 45 | %ErrTolThetaInZeldovich 0.5 % tree opening parameter for inverse Zeldovich mesh correction 46 | %MeanVolume 1.0e30 % desired maximum volume of cells for Zeldovich mesh corrrection 47 | %MeanMass 3.0e-5 % desired maximum mass of cells for Zeldovich mesh corrrection 48 | 49 | %---- Caracteristics of run 50 | 51 | TimeBegin 0.0 % Begin of the simulation 52 | TimeMax 1.0 % End of the simulation 53 | BoxSize 7500.0 % subbox0 54 | 55 | %---- Basic code options that set the type of simulation 56 | 57 | ComovingIntegrationOn 0 58 | PeriodicBoundariesOn 1 59 | CoolingOn 0 60 | StarformationOn 0 61 | 62 | %---- Cosmological parameters 63 | 64 | Omega0 0.0 65 | OmegaLambda 0.0 66 | OmegaBaryon 0.0 67 | HubbleParam 0.0 68 | 69 | %---- Output frequency and output paramaters 70 | 71 | OutputListOn 0 72 | TimeBetSnapshot 0.1 73 | TimeOfFirstSnapshot 0.0 74 | TimeBetStatistics 0.01 75 | NumFilesPerSnapshot 512 76 | NumFilesWrittenInParallel 1 77 | 78 | %---- Accuracy of time integration 79 | 80 | TypeOfTimestepCriterion 0 81 | ErrTolIntAccuracy 0.025 82 | CourantFac 0.4 83 | MaxRMSDisplacementFac 0.2 84 | MaxSizeTimestep 1e-2 85 | MinSizeTimestep 1e-10 86 | 87 | %---- Treatment of empty space and temperature limits 88 | 89 | MinimumDensityOnStartUp 1.0e-20 90 | LimitUBelowThisDensity 1.0e-20 91 | LimitUBelowCertainDensityToThisValue 1.0 92 | 93 | InitGasTemp 0 94 | MinGasTemp 0 95 | MinEgySpec 0 96 | 97 | %---- Tree algorithm, force accuracy, domain update frequency 98 | 99 | TypeOfOpeningCriterion 1 100 | ErrTolTheta 0.7 101 | ErrTolForceAcc 0.0025 102 | 103 | %---- Initial density estimate 104 | 105 | DesNumNgb 32 106 | MaxNumNgbDeviation 2 107 | 108 | %---- System of units 109 | 110 | UnitLength_in_cm 3.085678e21 ; 1.0 kpc 111 | UnitMass_in_g 1.989e43 ; 1.0e10 solar masses 112 | UnitVelocity_in_cm_per_s 1e5 ; 1 km/sec 113 | GravityConstantInternal 0 114 | 115 | %---- Gravitational softening lengths 116 | 117 | MinGasHsmlFractional 0.25 % in principal obsolete 118 | GasSoftFactor 2.5 119 | SofteningGas 1.0 120 | SofteningHalo 0 121 | SofteningDisk 0 122 | SofteningBulge 0 123 | SofteningStars 0 124 | SofteningBndry 0 125 | SofteningGasMaxPhys 0.5 126 | SofteningHaloMaxPhys 0 127 | SofteningDiskMaxPhys 0 128 | SofteningBulgeMaxPhys 0 129 | SofteningStarsMaxPhys 0 130 | SofteningBndryMaxPhys 0 131 | 132 | % SPECIAL_BOUNDARY 133 | %BoundaryLayerScaleFactor 0.002 134 | %SpecialBoundarySpeed 1.2566 135 | %SpecialBoundaryMotion 4 136 | %SpecialBoundaryType 1 137 | %OutflowPressure 0 138 | 139 | %---- Parameters for star formation model 140 | %CritPhysDensity 0 % critical physical density for star formation(in cm^(-3)) 141 | %MaxSfrTimescale 2.27 % in internal time units (1.5) 142 | %CritOverDensity 57.7 % overdensity threshold value 143 | %TempSupernova 5.73e7 % in Kelvin (1.0e8) 144 | %TempClouds 1000.0 % in Kelvin 145 | %FactorSN 0.1 % changed internally 146 | %FactorEVP 573.0 % (1000.0) 147 | %TemperatureThresh 0 148 | %TreecoolFile ../Arepo/data/TREECOOL_fg_dec11 149 | 150 | % End 151 | 152 | -------------------------------------------------------------------------------- /src/integrator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * integrator.h 3 | * dnelson 4 | */ 5 | 6 | #ifndef AREPO_RT_INTEGRATOR_H 7 | #define AREPO_RT_INTEGRATOR_H 8 | 9 | #include "ArepoRT.h" 10 | 11 | class VolumeIntegrator { 12 | public: 13 | // pure virtual 14 | virtual ~VolumeIntegrator() { }; 15 | 16 | virtual void Preprocess(const Scene *scene, const Camera *camera,const Renderer *renderer) { 17 | } 18 | virtual void RequestSamples(Sampler *sampler, Sample *sample, const Scene *scene) { 19 | } 20 | 21 | virtual Spectrum Li(const Scene *scene, const Renderer *renderer, const Ray &ray, 22 | const Sample *sample, RNG &rng, Spectrum *transmittance, 23 | int *prevEntryCell, int *prevEntryTetra, int taskNum) const = 0; 24 | virtual Spectrum Transmittance(const Scene *scene, const Renderer *renderer, const Ray &ray, 25 | const Sample *sample, RNG &rng) const = 0; 26 | }; 27 | 28 | class EmissionIntegrator : public VolumeIntegrator { 29 | public: 30 | // construction 31 | EmissionIntegrator(float ss) { 32 | IF_DEBUG(cout << "EmissionIntegrator(" << ss << ") constructor." << endl); 33 | stepSize = ss; 34 | } 35 | //~EmissionIntegrator() { }; 36 | 37 | // methods 38 | void Preprocess(const Scene *scene, const Camera *camera, const Renderer *renderer) { } 39 | void RequestSamples(Sampler *sampler, Sample *sample, const Scene *scene); 40 | Spectrum Li(const Scene *scene, const Renderer *renderer, const Ray &ray, 41 | const Sample *sample, RNG &rng, Spectrum *transmittance, int *prevEntryCell, int *prevEntryTetra, int taskNum) const; 42 | Spectrum Transmittance(const Scene *scene, const Renderer *, 43 | const Ray &ray, const Sample *sample, RNG &rng) const; 44 | private: 45 | // data 46 | float stepSize; 47 | int tauSampleOffset, scatterSampleOffset; 48 | }; 49 | 50 | class VoronoiIntegrator : public VolumeIntegrator { 51 | public: 52 | // consturction 53 | VoronoiIntegrator() { 54 | IF_DEBUG(cout << "VoronoiIntegrator() constructor." << endl); 55 | } 56 | //~VoronoiIntegrator() { }; 57 | 58 | // methods 59 | void Preprocess(const Scene *scene, const Camera *camera, const Renderer *renderer); 60 | void RequestSamples(Sampler *sampler, Sample *sample, const Scene *scene); 61 | Spectrum Li(const Scene *scene, const Renderer *renderer, const Ray &ray, 62 | const Sample *sample, RNG &rng, Spectrum *transmittance, int *prevEntryCell, int *prevEntryTetra, int taskNum) const; 63 | Spectrum Transmittance(const Scene *scene, const Renderer *, 64 | const Ray &ray, const Sample *sample, RNG &rng) const; 65 | private: 66 | // data 67 | int tauSampleOffset, scatterSampleOffset; 68 | }; 69 | 70 | class TreeSearchIntegrator : public VolumeIntegrator { 71 | public: 72 | // consturction 73 | TreeSearchIntegrator() { 74 | IF_DEBUG(cout << "TreeSearchIntegrator() constructor." << endl); 75 | } 76 | //~TreeSearchIntegrator() { }; 77 | 78 | // methods 79 | void Preprocess(const Scene *scene, const Camera *camera, const Renderer *renderer); 80 | void RequestSamples(Sampler *sampler, Sample *sample, const Scene *scene); 81 | Spectrum Li(const Scene *scene, const Renderer *renderer, const Ray &ray, 82 | const Sample *sample, RNG &rng, Spectrum *transmittance, int *prevEntryCell, int *prevEntryTetra, int threadNum) const; 83 | Spectrum Transmittance(const Scene *scene, const Renderer *, 84 | const Ray &ray, const Sample *sample, RNG &rng) const; 85 | private: 86 | // data 87 | int tauSampleOffset, scatterSampleOffset; 88 | }; 89 | 90 | class QuadIntersectionIntegrator : public VolumeIntegrator { 91 | public: 92 | // consturction 93 | QuadIntersectionIntegrator() { 94 | IF_DEBUG(cout << "QuadIntersectionIntegrator() constructor." << endl); 95 | } 96 | //~QuadIntersectionIntegrator() { }; 97 | 98 | // methods 99 | void Preprocess(const Scene *scene, const Camera *camera, const Renderer *renderer); 100 | void RequestSamples(Sampler *sampler, Sample *sample, const Scene *scene); 101 | Spectrum Li(const Scene *scene, const Renderer *renderer, const Ray &ray, 102 | const Sample *sample, RNG &rng, Spectrum *transmittance, int *prevEntryCell, int *prevEntryTetra, int threadNum) const; 103 | Spectrum Transmittance(const Scene *scene, const Renderer *, 104 | const Ray &ray, const Sample *sample, RNG &rng) const; 105 | private: 106 | // data 107 | int tauSampleOffset, scatterSampleOffset; 108 | int nQuads; 109 | vector P0; 110 | vector S1; 111 | vector S2; 112 | vector QN; 113 | }; 114 | 115 | EmissionIntegrator *CreateEmissionVolumeIntegrator(const float stepSize); 116 | VoronoiIntegrator *CreateVoronoiVolumeIntegrator(); 117 | TreeSearchIntegrator *CreateTreeSearchVolumeIntegrator(); 118 | QuadIntersectionIntegrator *CreateQuadIntersectionIntegrator(); 119 | 120 | #endif 121 | -------------------------------------------------------------------------------- /colortables/idl_13_rainbow.tbl: -------------------------------------------------------------------------------- 1 | # comment 2 | 182 3 | 0.0 0.0 0.0 1.00 4 | 4.0 0.0 3.0 1.00 5 | 9.0 0.0 7.0 1.00 6 | 18.0 0.0 14.0 1.00 7 | 22.0 0.0 19.0 1.00 8 | 31.0 0.0 28.0 1.00 9 | 36.0 0.0 32.0 1.00 10 | 40.0 0.0 38.0 1.00 11 | 50.0 0.0 48.0 1.00 12 | 54.0 0.0 53.0 1.00 13 | 61.0 0.0 63.0 1.00 14 | 64.0 0.0 68.0 1.00 15 | 68.0 0.0 72.0 1.00 16 | 72.0 0.0 81.0 1.00 17 | 74.0 0.0 86.0 1.00 18 | 79.0 0.0 95.0 1.00 19 | 80.0 0.0 100.0 1.00 20 | 82.0 0.0 104.0 1.00 21 | 85.0 0.0 113.0 1.00 22 | 84.0 0.0 118.0 1.00 23 | 87.0 0.0 127.0 1.00 24 | 88.0 0.0 132.0 1.00 25 | 86.0 0.0 136.0 1.00 26 | 87.0 0.0 145.0 1.00 27 | 87.0 0.0 150.0 1.00 28 | 84.0 0.0 159.0 1.00 29 | 84.0 0.0 163.0 1.00 30 | 83.0 0.0 173.0 1.00 31 | 79.0 0.0 177.0 1.00 32 | 78.0 0.0 182.0 1.00 33 | 76.0 0.0 191.0 1.00 34 | 71.0 0.0 195.0 1.00 35 | 68.0 0.0 204.0 1.00 36 | 66.0 0.0 209.0 1.00 37 | 60.0 0.0 214.0 1.00 38 | 55.0 0.0 223.0 1.00 39 | 53.0 0.0 227.0 1.00 40 | 43.0 0.0 236.0 1.00 41 | 40.0 0.0 241.0 1.00 42 | 36.0 0.0 245.0 1.00 43 | 25.0 0.0 255.0 1.00 44 | 21.0 0.0 255.0 1.00 45 | 12.0 0.0 255.0 1.00 46 | 4.0 0.0 255.0 1.00 47 | 0.0 0.0 255.0 1.00 48 | 0.0 8.0 255.0 1.00 49 | 0.0 16.0 255.0 1.00 50 | 0.0 25.0 255.0 1.00 51 | 0.0 29.0 255.0 1.00 52 | 0.0 42.0 255.0 1.00 53 | 0.0 46.0 255.0 1.00 54 | 0.0 51.0 255.0 1.00 55 | 0.0 63.0 255.0 1.00 56 | 0.0 67.0 255.0 1.00 57 | 0.0 76.0 255.0 1.00 58 | 0.0 84.0 255.0 1.00 59 | 0.0 89.0 255.0 1.00 60 | 0.0 97.0 255.0 1.00 61 | 0.0 106.0 255.0 1.00 62 | 0.0 114.0 255.0 1.00 63 | 0.0 119.0 255.0 1.00 64 | 0.0 127.0 255.0 1.00 65 | 0.0 135.0 255.0 1.00 66 | 0.0 140.0 255.0 1.00 67 | 0.0 152.0 255.0 1.00 68 | 0.0 157.0 255.0 1.00 69 | 0.0 161.0 255.0 1.00 70 | 0.0 174.0 255.0 1.00 71 | 0.0 178.0 255.0 1.00 72 | 0.0 187.0 255.0 1.00 73 | 0.0 195.0 255.0 1.00 74 | 0.0 203.0 255.0 1.00 75 | 0.0 208.0 255.0 1.00 76 | 0.0 216.0 255.0 1.00 77 | 0.0 225.0 255.0 1.00 78 | 0.0 229.0 255.0 1.00 79 | 0.0 242.0 255.0 1.00 80 | 0.0 246.0 255.0 1.00 81 | 0.0 250.0 255.0 1.00 82 | 0.0 255.0 246.0 1.00 83 | 0.0 255.0 242.0 1.00 84 | 0.0 255.0 233.0 1.00 85 | 0.0 255.0 225.0 1.00 86 | 0.0 255.0 220.0 1.00 87 | 0.0 255.0 212.0 1.00 88 | 0.0 255.0 203.0 1.00 89 | 0.0 255.0 195.0 1.00 90 | 0.0 255.0 191.0 1.00 91 | 0.0 255.0 187.0 1.00 92 | 0.0 255.0 174.0 1.00 93 | 0.0 255.0 170.0 1.00 94 | 0.0 255.0 157.0 1.00 95 | 0.0 255.0 152.0 1.00 96 | 0.0 255.0 144.0 1.00 97 | 0.0 255.0 135.0 1.00 98 | 0.0 255.0 131.0 1.00 99 | 0.0 255.0 123.0 1.00 100 | 0.0 255.0 114.0 1.00 101 | 0.0 255.0 106.0 1.00 102 | 0.0 255.0 102.0 1.00 103 | 0.0 255.0 97.0 1.00 104 | 0.0 255.0 84.0 1.00 105 | 0.0 255.0 80.0 1.00 106 | 0.0 255.0 67.0 1.00 107 | 0.0 255.0 63.0 1.00 108 | 0.0 255.0 59.0 1.00 109 | 0.0 255.0 46.0 1.00 110 | 0.0 255.0 42.0 1.00 111 | 0.0 255.0 34.0 1.00 112 | 0.0 255.0 25.0 1.00 113 | 0.0 255.0 21.0 1.00 114 | 0.0 255.0 12.0 1.00 115 | 0.0 255.0 8.0 1.00 116 | 4.0 255.0 0.0 1.00 117 | 8.0 255.0 0.0 1.00 118 | 21.0 255.0 0.0 1.00 119 | 25.0 255.0 0.0 1.00 120 | 29.0 255.0 0.0 1.00 121 | 42.0 255.0 0.0 1.00 122 | 46.0 255.0 0.0 1.00 123 | 55.0 255.0 0.0 1.00 124 | 63.0 255.0 0.0 1.00 125 | 67.0 255.0 0.0 1.00 126 | 76.0 255.0 0.0 1.00 127 | 80.0 255.0 0.0 1.00 128 | 93.0 255.0 0.0 1.00 129 | 97.0 255.0 0.0 1.00 130 | 101.0 255.0 0.0 1.00 131 | 114.0 255.0 0.0 1.00 132 | 119.0 255.0 0.0 1.00 133 | 131.0 255.0 0.0 1.00 134 | 135.0 255.0 0.0 1.00 135 | 140.0 255.0 0.0 1.00 136 | 153.0 255.0 0.0 1.00 137 | 157.0 255.0 0.0 1.00 138 | 165.0 255.0 0.0 1.00 139 | 169.0 255.0 0.0 1.00 140 | 182.0 255.0 0.0 1.00 141 | 187.0 255.0 0.0 1.00 142 | 191.0 255.0 0.0 1.00 143 | 203.0 255.0 0.0 1.00 144 | 208.0 255.0 0.0 1.00 145 | 221.0 255.0 0.0 1.00 146 | 225.0 255.0 0.0 1.00 147 | 229.0 255.0 0.0 1.00 148 | 242.0 255.0 0.0 1.00 149 | 246.0 255.0 0.0 1.00 150 | 255.0 255.0 0.0 1.00 151 | 255.0 250.0 0.0 1.00 152 | 255.0 242.0 0.0 1.00 153 | 255.0 233.0 0.0 1.00 154 | 255.0 229.0 0.0 1.00 155 | 255.0 216.0 0.0 1.00 156 | 255.0 212.0 0.0 1.00 157 | 255.0 208.0 0.0 1.00 158 | 255.0 195.0 0.0 1.00 159 | 255.0 191.0 0.0 1.00 160 | 255.0 178.0 0.0 1.00 161 | 255.0 174.0 0.0 1.00 162 | 255.0 165.0 0.0 1.00 163 | 255.0 161.0 0.0 1.00 164 | 255.0 153.0 0.0 1.00 165 | 255.0 144.0 0.0 1.00 166 | 255.0 140.0 0.0 1.00 167 | 255.0 127.0 0.0 1.00 168 | 255.0 123.0 0.0 1.00 169 | 255.0 119.0 0.0 1.00 170 | 255.0 106.0 0.0 1.00 171 | 255.0 102.0 0.0 1.00 172 | 255.0 89.0 0.0 1.00 173 | 255.0 85.0 0.0 1.00 174 | 255.0 80.0 0.0 1.00 175 | 255.0 72.0 0.0 1.00 176 | 255.0 63.0 0.0 1.00 177 | 255.0 55.0 0.0 1.00 178 | 255.0 51.0 0.0 1.00 179 | 255.0 42.0 0.0 1.00 180 | 255.0 34.0 0.0 1.00 181 | 255.0 29.0 0.0 1.00 182 | 255.0 17.0 0.0 1.00 183 | 255.0 12.0 0.0 1.00 184 | 255.0 0.0 0.0 1.00 185 | -------------------------------------------------------------------------------- /colortables/idl_3_red-temp.tbl: -------------------------------------------------------------------------------- 1 | # comment 2 | 182 3 | 0.0 0.0 0.0 1.00 4 | 1.0 0.0 0.0 1.00 5 | 2.0 0.0 0.0 1.00 6 | 5.0 0.0 0.0 1.00 7 | 7.0 0.0 0.0 1.00 8 | 10.0 0.0 0.0 1.00 9 | 11.0 0.0 0.0 1.00 10 | 13.0 0.0 0.0 1.00 11 | 15.0 0.0 0.0 1.00 12 | 17.0 0.0 0.0 1.00 13 | 20.0 0.0 0.0 1.00 14 | 21.0 0.0 0.0 1.00 15 | 23.0 0.0 0.0 1.00 16 | 26.0 0.0 0.0 1.00 17 | 27.0 0.0 0.0 1.00 18 | 30.0 0.0 0.0 1.00 19 | 31.0 0.0 0.0 1.00 20 | 33.0 0.0 0.0 1.00 21 | 36.0 0.0 0.0 1.00 22 | 37.0 0.0 0.0 1.00 23 | 40.0 0.0 0.0 1.00 24 | 42.0 0.0 0.0 1.00 25 | 43.0 0.0 0.0 1.00 26 | 46.0 0.0 0.0 1.00 27 | 47.0 0.0 0.0 1.00 28 | 50.0 0.0 0.0 1.00 29 | 52.0 0.0 0.0 1.00 30 | 55.0 0.0 0.0 1.00 31 | 56.0 0.0 0.0 1.00 32 | 57.0 0.0 0.0 1.00 33 | 60.0 0.0 0.0 1.00 34 | 62.0 0.0 0.0 1.00 35 | 65.0 0.0 0.0 1.00 36 | 66.0 0.0 0.0 1.00 37 | 68.0 0.0 0.0 1.00 38 | 70.0 0.0 0.0 1.00 39 | 72.0 0.0 0.0 1.00 40 | 75.0 0.0 0.0 1.00 41 | 76.0 0.0 0.0 1.00 42 | 78.0 0.0 0.0 1.00 43 | 81.0 0.0 0.0 1.00 44 | 82.0 0.0 0.0 1.00 45 | 85.0 0.0 0.0 1.00 46 | 86.0 0.0 0.0 1.00 47 | 88.0 0.0 0.0 1.00 48 | 91.0 0.0 0.0 1.00 49 | 92.0 0.0 0.0 1.00 50 | 95.0 0.0 0.0 1.00 51 | 97.0 0.0 0.0 1.00 52 | 99.0 0.0 0.0 1.00 53 | 101.0 0.0 0.0 1.00 54 | 102.0 0.0 0.0 1.00 55 | 105.0 0.0 0.0 1.00 56 | 107.0 0.0 0.0 1.00 57 | 110.0 0.0 0.0 1.00 58 | 111.0 0.0 0.0 1.00 59 | 113.0 0.0 0.0 1.00 60 | 115.0 0.0 0.0 1.00 61 | 117.0 0.0 0.0 1.00 62 | 120.0 0.0 0.0 1.00 63 | 121.0 0.0 0.0 1.00 64 | 123.0 0.0 0.0 1.00 65 | 126.0 0.0 0.0 1.00 66 | 127.0 0.0 0.0 1.00 67 | 130.0 0.0 0.0 1.00 68 | 131.0 0.0 0.0 1.00 69 | 133.0 0.0 0.0 1.00 70 | 136.0 0.0 0.0 1.00 71 | 137.0 0.0 0.0 1.00 72 | 140.0 0.0 0.0 1.00 73 | 141.0 0.0 0.0 1.00 74 | 144.0 0.0 0.0 1.00 75 | 146.0 0.0 0.0 1.00 76 | 147.0 0.0 0.0 1.00 77 | 150.0 0.0 0.0 1.00 78 | 152.0 0.0 0.0 1.00 79 | 155.0 0.0 0.0 1.00 80 | 156.0 0.0 0.0 1.00 81 | 157.0 0.0 0.0 1.00 82 | 160.0 0.0 0.0 1.00 83 | 162.0 0.0 0.0 1.00 84 | 165.0 0.0 0.0 1.00 85 | 166.0 0.0 0.0 1.00 86 | 168.0 0.0 0.0 1.00 87 | 170.0 0.0 0.0 1.00 88 | 172.0 0.0 0.0 1.00 89 | 175.0 1.0 0.0 1.00 90 | 176.0 3.0 0.0 1.00 91 | 178.0 5.0 0.0 1.00 92 | 181.0 9.0 0.0 1.00 93 | 182.0 11.0 0.0 1.00 94 | 185.0 15.0 0.0 1.00 95 | 186.0 17.0 0.0 1.00 96 | 189.0 20.0 0.0 1.00 97 | 191.0 22.0 0.0 1.00 98 | 192.0 24.0 0.0 1.00 99 | 195.0 28.0 0.0 1.00 100 | 197.0 30.0 0.0 1.00 101 | 199.0 34.0 0.0 1.00 102 | 201.0 35.0 0.0 1.00 103 | 202.0 37.0 0.0 1.00 104 | 205.0 41.0 0.0 1.00 105 | 207.0 43.0 0.0 1.00 106 | 210.0 47.0 0.0 1.00 107 | 211.0 49.0 0.0 1.00 108 | 212.0 51.0 0.0 1.00 109 | 215.0 54.0 0.0 1.00 110 | 217.0 56.0 0.0 1.00 111 | 220.0 60.0 0.0 1.00 112 | 221.0 62.0 0.0 1.00 113 | 223.0 64.0 0.0 1.00 114 | 226.0 68.0 0.0 1.00 115 | 227.0 69.0 0.0 1.00 116 | 230.0 73.0 0.0 1.00 117 | 231.0 75.0 0.0 1.00 118 | 234.0 79.0 0.0 1.00 119 | 236.0 81.0 0.0 1.00 120 | 237.0 83.0 0.0 1.00 121 | 240.0 86.0 0.0 1.00 122 | 241.0 88.0 0.0 1.00 123 | 244.0 92.0 0.0 1.00 124 | 246.0 94.0 0.0 1.00 125 | 247.0 96.0 0.0 1.00 126 | 250.0 100.0 0.0 1.00 127 | 252.0 102.0 0.0 1.00 128 | 255.0 105.0 0.0 1.00 129 | 255.0 107.0 0.0 1.00 130 | 255.0 109.0 0.0 1.00 131 | 255.0 113.0 0.0 1.00 132 | 255.0 115.0 0.0 1.00 133 | 255.0 119.0 0.0 1.00 134 | 255.0 120.0 0.0 1.00 135 | 255.0 122.0 0.0 1.00 136 | 255.0 126.0 0.0 1.00 137 | 255.0 128.0 0.0 1.00 138 | 255.0 132.0 0.0 1.00 139 | 255.0 134.0 3.0 1.00 140 | 255.0 137.0 11.0 1.00 141 | 255.0 139.0 15.0 1.00 142 | 255.0 141.0 19.0 1.00 143 | 255.0 145.0 27.0 1.00 144 | 255.0 147.0 31.0 1.00 145 | 255.0 151.0 39.0 1.00 146 | 255.0 153.0 43.0 1.00 147 | 255.0 154.0 47.0 1.00 148 | 255.0 158.0 54.0 1.00 149 | 255.0 160.0 58.0 1.00 150 | 255.0 164.0 66.0 1.00 151 | 255.0 166.0 70.0 1.00 152 | 255.0 168.0 74.0 1.00 153 | 255.0 171.0 82.0 1.00 154 | 255.0 173.0 86.0 1.00 155 | 255.0 177.0 94.0 1.00 156 | 255.0 179.0 98.0 1.00 157 | 255.0 181.0 102.0 1.00 158 | 255.0 185.0 109.0 1.00 159 | 255.0 187.0 113.0 1.00 160 | 255.0 190.0 121.0 1.00 161 | 255.0 192.0 125.0 1.00 162 | 255.0 196.0 133.0 1.00 163 | 255.0 198.0 137.0 1.00 164 | 255.0 200.0 141.0 1.00 165 | 255.0 204.0 149.0 1.00 166 | 255.0 205.0 153.0 1.00 167 | 255.0 209.0 160.0 1.00 168 | 255.0 211.0 164.0 1.00 169 | 255.0 213.0 168.0 1.00 170 | 255.0 217.0 176.0 1.00 171 | 255.0 219.0 180.0 1.00 172 | 255.0 222.0 188.0 1.00 173 | 255.0 224.0 192.0 1.00 174 | 255.0 226.0 196.0 1.00 175 | 255.0 230.0 204.0 1.00 176 | 255.0 232.0 207.0 1.00 177 | 255.0 236.0 215.0 1.00 178 | 255.0 238.0 219.0 1.00 179 | 255.0 239.0 223.0 1.00 180 | 255.0 243.0 231.0 1.00 181 | 255.0 245.0 235.0 1.00 182 | 255.0 249.0 243.0 1.00 183 | 255.0 251.0 247.0 1.00 184 | 255.0 255.0 255.0 1.00 185 | -------------------------------------------------------------------------------- /colortables/idl_33_blue-red.tbl: -------------------------------------------------------------------------------- 1 | # IDL builtin colortable #33 (BLUE-RED) 2 | 182 3 | 0.0 0.0 131.0 1.00 4 | 0.0 0.0 131.0 1.00 5 | 0.0 0.0 135.0 1.00 6 | 0.0 0.0 143.0 1.00 7 | 0.0 0.0 147.0 1.00 8 | 0.0 0.0 155.0 1.00 9 | 0.0 0.0 159.0 1.00 10 | 0.0 0.0 163.0 1.00 11 | 0.0 0.0 171.0 1.00 12 | 0.0 0.0 175.0 1.00 13 | 0.0 0.0 183.0 1.00 14 | 0.0 0.0 187.0 1.00 15 | 0.0 0.0 191.0 1.00 16 | 0.0 0.0 199.0 1.00 17 | 0.0 0.0 203.0 1.00 18 | 0.0 0.0 211.0 1.00 19 | 0.0 0.0 215.0 1.00 20 | 0.0 0.0 219.0 1.00 21 | 0.0 0.0 227.0 1.00 22 | 0.0 0.0 231.0 1.00 23 | 0.0 0.0 239.0 1.00 24 | 0.0 0.0 243.0 1.00 25 | 0.0 0.0 247.0 1.00 26 | 0.0 0.0 255.0 1.00 27 | 0.0 0.0 255.0 1.00 28 | 0.0 7.0 255.0 1.00 29 | 0.0 11.0 255.0 1.00 30 | 0.0 19.0 255.0 1.00 31 | 0.0 23.0 255.0 1.00 32 | 0.0 27.0 255.0 1.00 33 | 0.0 35.0 255.0 1.00 34 | 0.0 39.0 255.0 1.00 35 | 0.0 47.0 255.0 1.00 36 | 0.0 51.0 255.0 1.00 37 | 0.0 55.0 255.0 1.00 38 | 0.0 63.0 255.0 1.00 39 | 0.0 67.0 255.0 1.00 40 | 0.0 75.0 255.0 1.00 41 | 0.0 79.0 255.0 1.00 42 | 0.0 83.0 255.0 1.00 43 | 0.0 91.0 255.0 1.00 44 | 0.0 95.0 255.0 1.00 45 | 0.0 103.0 255.0 1.00 46 | 0.0 107.0 255.0 1.00 47 | 0.0 111.0 255.0 1.00 48 | 0.0 119.0 255.0 1.00 49 | 0.0 123.0 255.0 1.00 50 | 0.0 131.0 255.0 1.00 51 | 0.0 135.0 255.0 1.00 52 | 0.0 143.0 255.0 1.00 53 | 0.0 147.0 255.0 1.00 54 | 0.0 151.0 255.0 1.00 55 | 0.0 159.0 255.0 1.00 56 | 0.0 163.0 255.0 1.00 57 | 0.0 171.0 255.0 1.00 58 | 0.0 175.0 255.0 1.00 59 | 0.0 179.0 255.0 1.00 60 | 0.0 187.0 255.0 1.00 61 | 0.0 191.0 255.0 1.00 62 | 0.0 199.0 255.0 1.00 63 | 0.0 203.0 255.0 1.00 64 | 0.0 207.0 255.0 1.00 65 | 0.0 215.0 255.0 1.00 66 | 0.0 219.0 255.0 1.00 67 | 0.0 227.0 255.0 1.00 68 | 0.0 231.0 255.0 1.00 69 | 0.0 235.0 255.0 1.00 70 | 0.0 243.0 255.0 1.00 71 | 0.0 247.0 255.0 1.00 72 | 0.0 255.0 255.0 1.00 73 | 0.0 255.0 255.0 1.00 74 | 7.0 255.0 247.0 1.00 75 | 11.0 255.0 243.0 1.00 76 | 15.0 255.0 239.0 1.00 77 | 23.0 255.0 231.0 1.00 78 | 27.0 255.0 227.0 1.00 79 | 35.0 255.0 219.0 1.00 80 | 39.0 255.0 215.0 1.00 81 | 43.0 255.0 211.0 1.00 82 | 51.0 255.0 203.0 1.00 83 | 55.0 255.0 199.0 1.00 84 | 63.0 255.0 191.0 1.00 85 | 67.0 255.0 187.0 1.00 86 | 71.0 255.0 183.0 1.00 87 | 79.0 255.0 175.0 1.00 88 | 83.0 255.0 171.0 1.00 89 | 91.0 255.0 163.0 1.00 90 | 95.0 255.0 159.0 1.00 91 | 99.0 255.0 155.0 1.00 92 | 107.0 255.0 147.0 1.00 93 | 111.0 255.0 143.0 1.00 94 | 119.0 255.0 135.0 1.00 95 | 123.0 255.0 131.0 1.00 96 | 131.0 255.0 123.0 1.00 97 | 135.0 255.0 119.0 1.00 98 | 139.0 255.0 115.0 1.00 99 | 147.0 255.0 107.0 1.00 100 | 151.0 255.0 103.0 1.00 101 | 159.0 255.0 95.0 1.00 102 | 163.0 255.0 91.0 1.00 103 | 167.0 255.0 87.0 1.00 104 | 175.0 255.0 79.0 1.00 105 | 179.0 255.0 75.0 1.00 106 | 187.0 255.0 67.0 1.00 107 | 191.0 255.0 63.0 1.00 108 | 195.0 255.0 59.0 1.00 109 | 203.0 255.0 51.0 1.00 110 | 207.0 255.0 47.0 1.00 111 | 215.0 255.0 39.0 1.00 112 | 219.0 255.0 35.0 1.00 113 | 223.0 255.0 31.0 1.00 114 | 231.0 255.0 23.0 1.00 115 | 235.0 255.0 19.0 1.00 116 | 243.0 255.0 11.0 1.00 117 | 247.0 255.0 7.0 1.00 118 | 255.0 255.0 0.0 1.00 119 | 255.0 251.0 0.0 1.00 120 | 255.0 247.0 0.0 1.00 121 | 255.0 239.0 0.0 1.00 122 | 255.0 235.0 0.0 1.00 123 | 255.0 227.0 0.0 1.00 124 | 255.0 223.0 0.0 1.00 125 | 255.0 219.0 0.0 1.00 126 | 255.0 211.0 0.0 1.00 127 | 255.0 207.0 0.0 1.00 128 | 255.0 199.0 0.0 1.00 129 | 255.0 195.0 0.0 1.00 130 | 255.0 191.0 0.0 1.00 131 | 255.0 183.0 0.0 1.00 132 | 255.0 179.0 0.0 1.00 133 | 255.0 171.0 0.0 1.00 134 | 255.0 167.0 0.0 1.00 135 | 255.0 163.0 0.0 1.00 136 | 255.0 155.0 0.0 1.00 137 | 255.0 151.0 0.0 1.00 138 | 255.0 143.0 0.0 1.00 139 | 255.0 139.0 0.0 1.00 140 | 255.0 131.0 0.0 1.00 141 | 255.0 127.0 0.0 1.00 142 | 255.0 123.0 0.0 1.00 143 | 255.0 115.0 0.0 1.00 144 | 255.0 111.0 0.0 1.00 145 | 255.0 103.0 0.0 1.00 146 | 255.0 99.0 0.0 1.00 147 | 255.0 95.0 0.0 1.00 148 | 255.0 87.0 0.0 1.00 149 | 255.0 83.0 0.0 1.00 150 | 255.0 75.0 0.0 1.00 151 | 255.0 71.0 0.0 1.00 152 | 255.0 67.0 0.0 1.00 153 | 255.0 59.0 0.0 1.00 154 | 255.0 55.0 0.0 1.00 155 | 255.0 47.0 0.0 1.00 156 | 255.0 43.0 0.0 1.00 157 | 255.0 39.0 0.0 1.00 158 | 255.0 31.0 0.0 1.00 159 | 255.0 27.0 0.0 1.00 160 | 255.0 19.0 0.0 1.00 161 | 255.0 15.0 0.0 1.00 162 | 255.0 7.0 0.0 1.00 163 | 255.0 3.0 0.0 1.00 164 | 255.0 0.0 0.0 1.00 165 | 246.0 0.0 0.0 1.00 166 | 241.0 0.0 0.0 1.00 167 | 233.0 0.0 0.0 1.00 168 | 228.0 0.0 0.0 1.00 169 | 224.0 0.0 0.0 1.00 170 | 215.0 0.0 0.0 1.00 171 | 211.0 0.0 0.0 1.00 172 | 202.0 0.0 0.0 1.00 173 | 197.0 0.0 0.0 1.00 174 | 193.0 0.0 0.0 1.00 175 | 184.0 0.0 0.0 1.00 176 | 180.0 0.0 0.0 1.00 177 | 171.0 0.0 0.0 1.00 178 | 167.0 0.0 0.0 1.00 179 | 162.0 0.0 0.0 1.00 180 | 153.0 0.0 0.0 1.00 181 | 149.0 0.0 0.0 1.00 182 | 140.0 0.0 0.0 1.00 183 | 136.0 0.0 0.0 1.00 184 | 131.0 0.0 0.0 1.00 185 | -------------------------------------------------------------------------------- /examples/tng_subbox0_config24.txt: -------------------------------------------------------------------------------- 1 | % Sample ArepoVTK Configuration File 2 | 3 | % Input/Output 4 | % ------------ 5 | imageFile = output/frame24_NUMM.png % output: TGA image filename 6 | rawRGBFile = frame.raw.txt % output: raw dump of floats (debug only) 7 | filename = output/subbox0/snapdir_subbox0_NUMM/snap_subbox0_NUMM % input: snapshot file 8 | paramFilename = param.txt % input: Arepo parameter file 9 | writeRGB8bit = false % output 8 bit png 10 | writeRGB16bit = true % output 16 bit png 11 | 12 | % General 13 | % ------- 14 | nCores = 4 % number of cores to use (0=all) 15 | nTasks = 128 % number of tasks/threads to run (0=auto) 16 | quickRender = false % unused 17 | openWindow = false % unused 18 | verbose = true % report more information 19 | totNumJobs = 0 % set >=1 to split single image render across multiple jobs (0=disable) 20 | jobExpansionFac = 1 % increase number of jobs by this factor, only for render not mask (per dim) 21 | maskFileBase = % create/use maskfile for job based frustrum culling 22 | maskPadFac = 0.0 % frustrum padding factor in code spatial units 23 | 24 | % Frame/Camera 25 | % ------------ 26 | imageXPixels = 1344 % frame resolution (X), e.g. 1024, 1920 27 | imageYPixels = 756 % frame resolution (Y), e.g. 768, 1080 28 | swScale = 1.0 % screenWindow mult factor * [-1,1] 29 | cameraType = perspective % ortho, perspective, fisheye, env, rift 30 | cameraFOV = 60.0 % degrees 31 | cameraPosition = 7400 3750 3750 % (XYZ) camera position in world coord system 32 | cameraLookAt = 3750 3750 3750 % (XYZ) point centered in camera FOV 33 | cameraUp = 0.0 1.0 0.0 % (XYZ) camera "up" vector 34 | 35 | %imageXPixels = 8192 % frame resolution (X), e.g. 1024, 1920 36 | %imageYPixels = 8192 % frame resolution (Y), e.g. 768, 1080 37 | %swScale = 1.0 % screenWindow mult factor * [-1,1] 38 | %cameraType = fisheye % ortho, perspective, fisheye, env, rift 39 | %cameraFOV = 180.0 % degrees 40 | 41 | % Data Processing 42 | % --------------- 43 | readPartType = 0 % 0=gas, 1=dm, 4=stars, 5=bhs 44 | recenterBoxCoords = 9000 17000 63000 % (XYZ) shift all points for new center (false=disable) 45 | convertUthermToKelvin = true % convert SphP.Utherm field to temp in Kelvin 46 | takeLogUtherm = true % convert K to log(K) 47 | 48 | % Transfer Function 49 | % ----------------- 50 | %addTF_01 = linear Temp 2.0 3.5 0.0 0.0 0.0 0.0 0.0 0.2 51 | %addTF_02 = linear Temp 3.5 4.1 0.0 0.0 0.2 0.0 0.0 0.6 52 | %addTF_03 = linear Temp 4.1 5.5 0.0 0.0 0.6 0.0 1.0 0.4 53 | %addTF_04 = linear Temp 5.5 6.0 0.0 1.0 0.4 1.0 0.5 0.0 54 | %addTF_05 = linear Temp 6.0 6.8 1.0 0.5 0.0 1.0 0.0 0.0 55 | %addTF_06 = linear Temp 6.8 7.0 1.0 0.0 0.0 1.0 1.0 1.0 56 | %addTF_07 = linear Temp 7.0 9.9 1.0 1.0 1.0 1.0 1.0 1.0 57 | 58 | %addTF_01 = gaussian_table Density idl_3_red-temp 1e-8 1e-7 1.5e-8 2e-9 59 | %addTF_02 = gaussian_table Density idl_3_red-temp 1e-8 1e-7 4e-8 5e-9 60 | %addTF_03 = gaussian_table Density idl_3_red-temp 1e-8 1e-7 6e-8 1e-8 61 | %addTF_04 = gaussian_table Density idl_3_red-temp 1e-8 1e-7 9e-8 1e-8 62 | 63 | %addTF_01 = constant_table Density idl_3_red-temp 1e-8 1e-7 64 | 65 | %addTF_01 = tophat_table BMag mpl_inferno -5.5 -3.0 -9.0 4.0 % changed to log 66 | 67 | addTF_01 = tophat_table VelMag mpl_inferno 400.0 900.0 0.0 1200.0 % sqrt(a) km/s 68 | 69 | % Animation 70 | % --------- 71 | numFrames = -1 % set to 1 72 | startFrame = -1 % set by -s cmdline flag 73 | timePerFrame = 1.0 % establish unit system of time/frame 74 | 75 | addKF_01 = 0.0 4320.0 rotXZ 18.8495559 linear % 3 total orbits (1440 frames, 48 sec per 2pi orbit) 76 | %addKF_01 = 0.0 4320.0 rotXZ 28.2743339 linear % 4.5 total orbits (960 frames, 32 sec per 2pi orbit) 77 | %addKF_01 = 0.0 4320.0 rotXZ 37.699112 linear % 720 frames (24 sec) per 2pi orbit (Mark's setup) 78 | 79 | minScale = 0.0 % based on TODO for orig_frame 2000 80 | maxScale = 5000.0 % based on TODO for orig_frame 2000 81 | 82 | % Render 83 | % ------ 84 | drawBBox = false % draw simulation bounding box 85 | drawTetra = false % draw delaunay tetrahedra 86 | drawVoronoi = false % draw voronoi polyhedra faces 87 | drawSphere = false % draw test sphere lat/long lines 88 | projColDens = false % calculate/save raw line integrals 89 | nTreeNGB = 0 % use tree-based search integrator instead of mesh (0=disabled) 90 | viStepSize = 0 % volume integration sub-stepping size (0=disabled) 91 | rayMaxT = 15000.0 % maximum ray integration parametric length 92 | rgbLine = 5.0 5.0 5.0 % (RGB) bounding box 93 | rgbTetra = 0.01 0.01 0.01 % (RGB) tetra edges 94 | rgbVoronoi = 0.0 0.05 0.0 % (RGB) voronoi edges 95 | rgbAbsorb = 1e8 1e8 1e8 % (RGB) absorption, 0=none 96 | 97 | % End. 98 | 99 | -------------------------------------------------------------------------------- /src/ArepoRT.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ArepoRT.h 3 | * dnelson 4 | */ 5 | 6 | #ifndef AREPO_RT_H 7 | #define AREPO_RT_H 8 | 9 | // defines 10 | #define AREPO_RT_VERSION 0.44 11 | #define L1_CACHE_LINE_SIZE 64 12 | #define FILTER_TABLE_SIZE 16 13 | #define TASK_MULT_FACT 8 //32 14 | #define TASK_MAX_PIXEL_SIZE 100 //16 15 | #define INFINITY FLT_MAX 16 | #define INSIDE_EPS 1.0e-11 //1.0e-6 17 | #define AUXMESH_ALLOC_SIZE 4000 18 | #define TF_NUM_VALS 9 // see transfer.h 19 | 20 | #define MSUN_PER_PC3_IN_CGS 6.769e-23 21 | 22 | // for selective load (temporary) 23 | #define PARTTYPE_GAS 0 24 | #define PARTTYPE_DM 1 25 | #define TILESIZE 256 26 | 27 | // behavior options 28 | 29 | //#define USE_LINEALGO_BRESENHAM 30 | #define USE_LINEALGO_WU 31 | 32 | /* interpolation methods (choose one) */ 33 | 34 | //#define NATURAL_NEIGHBOR_INTERP 35 | //#define NATURAL_NEIGHBOR_IDW 36 | #define NATURAL_NEIGHBOR_SPHKERNEL 37 | //#define NNI_WATSON_SAMBRIDGE 38 | //#define NNI_LIANG_HALE 39 | //#define DTFE_INTERP 40 | //#define CELL_GRADIENTS_DENS 41 | //#define CELL_PIECEWISE_CONSTANT 42 | 43 | /* interpolation method options */ 44 | 45 | #define NO_GHOST_CONTRIBS // only for SPHKERNEL, do not use 46 | // ghosts for hsml/TF (i.e. for reflective BCs but we are doing 47 | // periodic meshing, the ghosts are incorrect and should be skipped) 48 | //#define NNI_DISABLE_EXACT // for bruteforce NNI disable exact geometry computations 49 | //#define NATURAL_NEIGHBOR_INNER // for IDW, SPHKERNEL or NNI, do neighbors of neighbors 50 | //#define BRUTE_FORCE // for IDW or SPHKERNEL, calculate over all NumGas in the box 51 | 52 | /* exponent of distance, greater values assign more influence to values closest to the 53 | * interpolating point, approaching piecewise constant for large POWER_PARAM. 54 | * in N dimensions, if p <= N, the interpolated values are dominated by points far away, 55 | * which is rather bizarre. note: p is actually 2p since we skip the sqrt. 56 | */ 57 | #define POWER_PARAM 2.0 58 | 59 | /* use <1 for more smoothing, makes hsml_used bigger than hsml_ngb_max 60 | * use >1 for less smoothing, make hsml_used smaller than hsml_ngb_max 61 | * (at least some neighbors will not contribute, and if this is too big, the 62 | * containing cell may also not contribute, leading to black holes) 63 | */ 64 | #define HSML_FAC 1.2 65 | 66 | /* special behavior */ 67 | //#define DEBUG_VERIFY_INCELL_EACH_STEP 68 | #define DEBUG_VERIFY_ENTRY_CELLS 69 | //#define DISABLE_MEMORY_MANAGER 70 | 71 | #ifdef DEBUG 72 | #define IF_DEBUG(expr) (expr) 73 | #else 74 | #define IF_DEBUG(expr) ((void)0) 75 | #endif 76 | 77 | // includes 78 | #include 79 | #include 80 | #include 81 | #include //memalign 82 | 83 | #include 84 | #include 85 | #include 86 | #include 87 | 88 | #include 89 | #include 90 | #include 91 | #include 92 | using namespace std; 93 | 94 | #include 95 | using std::string; 96 | #include 97 | using std::vector; 98 | #include 99 | 100 | #include "fileio.h" //Config 101 | 102 | class ConfigSet; 103 | extern ConfigSet Config; 104 | 105 | // global forward declarations 106 | template class BlockedArray; 107 | struct Matrix4x4; 108 | 109 | class Vector; 110 | class Point; 111 | class Ray; 112 | class BBox; 113 | 114 | class Renderer; 115 | class Transform; 116 | struct Intersection; 117 | 118 | template class CoefficientSpectrum; 119 | class RGBSpectrum; 120 | typedef RGBSpectrum Spectrum; 121 | 122 | class Camera; 123 | class Film; 124 | class RNG; 125 | class Sampler; 126 | struct CameraSample; 127 | struct Sample; 128 | 129 | class Arepo; 130 | class ArepoMesh; 131 | class ArepoTree; 132 | class ArepoSnapshot; 133 | class Scene; 134 | class VolumeRegion; 135 | class DensityRegion; 136 | class VolumeGridDensity; 137 | class TransferFunction; 138 | class VolumeIntegrator; 139 | class VoronoiIntegrator; 140 | class TreeSearchIntegrator; 141 | class Timer; 142 | 143 | // util functions 144 | template string toStr(T num) 145 | { 146 | stringstream ss; 147 | ss << num; 148 | return ss.str(); 149 | } 150 | 151 | #define terminate(...) {char termbuf1[1000], termbuf2[1000]; sprintf(termbuf1, "Code termination, function %s(), file %s, line %d", __FUNCTION__, __FILE__, __LINE__); sprintf(termbuf2, __VA_ARGS__); printf("%s:\n %s\n", termbuf1, termbuf2); fflush(stdout); exit(0);} 152 | 153 | // global inlines 154 | inline float Lerp(float t, float v1, float v2) { 155 | return (1.0f - t) * v1 + t * v2; 156 | } 157 | 158 | inline float Radians(float deg) { 159 | return ((float)M_PI/180.0f) * deg; 160 | } 161 | inline float Degrees(float rad) { 162 | return (180.0f/(float)M_PI) * rad; 163 | } 164 | 165 | /*inline float Clamp(float val, float low, float high) { 166 | if (val < low) return low; 167 | else if (val > high) return high; 168 | else return val; 169 | }*/ 170 | inline double Clamp(double val, double low, double high) { 171 | if (val < low) return low; 172 | else if (val > high) return high; 173 | else return val; 174 | } 175 | inline int Clamp(int val, int low, int high) { 176 | if (val < low) return low; 177 | else if (val > high) return high; 178 | else return val; 179 | } 180 | inline unsigned int RoundUpPowerOfTwo(int val) { 181 | val--; 182 | val |= val >> 1; val |= val >> 2; val |= val >> 4; val |= val >> 8; val |= val >> 16; 183 | val++; 184 | return val; 185 | } 186 | 187 | #endif 188 | -------------------------------------------------------------------------------- /colortables/cubehelix_1_50.tbl: -------------------------------------------------------------------------------- 1 | # cubehelix params start=2.0 rots=1.5 hue=1.0 gamma=0.75 (darkest fifty entries removed) 2 | 206 3 | 60.0 73.0 126.0 1.00 4 | 62.0 74.0 128.0 1.00 5 | 65.0 74.0 130.0 1.00 6 | 68.0 74.0 132.0 1.00 7 | 71.0 74.0 133.0 1.00 8 | 74.0 74.0 135.0 1.00 9 | 76.0 74.0 137.0 1.00 10 | 79.0 74.0 138.0 1.00 11 | 82.0 75.0 139.0 1.00 12 | 85.0 75.0 141.0 1.00 13 | 88.0 75.0 142.0 1.00 14 | 91.0 75.0 143.0 1.00 15 | 94.0 75.0 144.0 1.00 16 | 97.0 75.0 145.0 1.00 17 | 100.0 75.0 146.0 1.00 18 | 103.0 75.0 147.0 1.00 19 | 106.0 75.0 147.0 1.00 20 | 109.0 76.0 148.0 1.00 21 | 112.0 76.0 148.0 1.00 22 | 115.0 76.0 149.0 1.00 23 | 118.0 76.0 149.0 1.00 24 | 121.0 76.0 149.0 1.00 25 | 124.0 77.0 149.0 1.00 26 | 127.0 77.0 149.0 1.00 27 | 130.0 77.0 149.0 1.00 28 | 132.0 77.0 149.0 1.00 29 | 135.0 78.0 149.0 1.00 30 | 138.0 78.0 148.0 1.00 31 | 141.0 79.0 148.0 1.00 32 | 143.0 79.0 147.0 1.00 33 | 146.0 80.0 147.0 1.00 34 | 148.0 80.0 146.0 1.00 35 | 151.0 81.0 145.0 1.00 36 | 153.0 81.0 145.0 1.00 37 | 156.0 82.0 144.0 1.00 38 | 158.0 83.0 143.0 1.00 39 | 160.0 83.0 142.0 1.00 40 | 162.0 84.0 141.0 1.00 41 | 164.0 85.0 140.0 1.00 42 | 166.0 86.0 139.0 1.00 43 | 168.0 87.0 138.0 1.00 44 | 170.0 88.0 136.0 1.00 45 | 172.0 89.0 135.0 1.00 46 | 174.0 90.0 134.0 1.00 47 | 175.0 91.0 133.0 1.00 48 | 177.0 92.0 131.0 1.00 49 | 178.0 93.0 130.0 1.00 50 | 180.0 94.0 129.0 1.00 51 | 181.0 95.0 127.0 1.00 52 | 182.0 96.0 126.0 1.00 53 | 183.0 98.0 124.0 1.00 54 | 184.0 99.0 123.0 1.00 55 | 185.0 100.0 122.0 1.00 56 | 186.0 102.0 120.0 1.00 57 | 187.0 103.0 119.0 1.00 58 | 188.0 105.0 118.0 1.00 59 | 188.0 106.0 116.0 1.00 60 | 189.0 108.0 115.0 1.00 61 | 189.0 110.0 114.0 1.00 62 | 189.0 111.0 113.0 1.00 63 | 190.0 113.0 111.0 1.00 64 | 190.0 115.0 110.0 1.00 65 | 190.0 116.0 109.0 1.00 66 | 190.0 118.0 108.0 1.00 67 | 190.0 120.0 107.0 1.00 68 | 190.0 122.0 106.0 1.00 69 | 190.0 123.0 105.0 1.00 70 | 189.0 125.0 104.0 1.00 71 | 189.0 127.0 103.0 1.00 72 | 189.0 129.0 103.0 1.00 73 | 188.0 131.0 102.0 1.00 74 | 188.0 133.0 101.0 1.00 75 | 187.0 135.0 101.0 1.00 76 | 186.0 137.0 100.0 1.00 77 | 186.0 139.0 100.0 1.00 78 | 185.0 141.0 100.0 1.00 79 | 184.0 143.0 99.0 1.00 80 | 183.0 144.0 99.0 1.00 81 | 183.0 146.0 99.0 1.00 82 | 182.0 148.0 99.0 1.00 83 | 181.0 150.0 99.0 1.00 84 | 180.0 152.0 99.0 1.00 85 | 179.0 154.0 100.0 1.00 86 | 178.0 156.0 100.0 1.00 87 | 177.0 158.0 100.0 1.00 88 | 176.0 160.0 101.0 1.00 89 | 175.0 162.0 101.0 1.00 90 | 174.0 164.0 102.0 1.00 91 | 172.0 166.0 103.0 1.00 92 | 171.0 168.0 104.0 1.00 93 | 170.0 170.0 105.0 1.00 94 | 169.0 171.0 106.0 1.00 95 | 168.0 173.0 107.0 1.00 96 | 167.0 175.0 108.0 1.00 97 | 166.0 177.0 109.0 1.00 98 | 165.0 179.0 111.0 1.00 99 | 164.0 180.0 112.0 1.00 100 | 163.0 182.0 113.0 1.00 101 | 162.0 184.0 115.0 1.00 102 | 161.0 185.0 117.0 1.00 103 | 160.0 187.0 118.0 1.00 104 | 159.0 188.0 120.0 1.00 105 | 158.0 190.0 122.0 1.00 106 | 158.0 191.0 124.0 1.00 107 | 157.0 193.0 126.0 1.00 108 | 156.0 194.0 128.0 1.00 109 | 155.0 196.0 130.0 1.00 110 | 155.0 197.0 132.0 1.00 111 | 154.0 198.0 134.0 1.00 112 | 154.0 200.0 137.0 1.00 113 | 153.0 201.0 139.0 1.00 114 | 153.0 202.0 141.0 1.00 115 | 152.0 203.0 144.0 1.00 116 | 152.0 204.0 146.0 1.00 117 | 152.0 205.0 149.0 1.00 118 | 152.0 206.0 151.0 1.00 119 | 152.0 207.0 154.0 1.00 120 | 152.0 208.0 156.0 1.00 121 | 152.0 209.0 159.0 1.00 122 | 152.0 210.0 161.0 1.00 123 | 152.0 211.0 164.0 1.00 124 | 152.0 212.0 166.0 1.00 125 | 152.0 213.0 169.0 1.00 126 | 153.0 213.0 172.0 1.00 127 | 153.0 214.0 174.0 1.00 128 | 154.0 215.0 177.0 1.00 129 | 154.0 215.0 179.0 1.00 130 | 155.0 216.0 182.0 1.00 131 | 156.0 217.0 184.0 1.00 132 | 156.0 217.0 187.0 1.00 133 | 157.0 218.0 190.0 1.00 134 | 158.0 218.0 192.0 1.00 135 | 159.0 219.0 195.0 1.00 136 | 160.0 219.0 197.0 1.00 137 | 161.0 219.0 199.0 1.00 138 | 162.0 220.0 202.0 1.00 139 | 163.0 220.0 204.0 1.00 140 | 165.0 220.0 206.0 1.00 141 | 166.0 221.0 209.0 1.00 142 | 167.0 221.0 211.0 1.00 143 | 169.0 221.0 213.0 1.00 144 | 170.0 221.0 215.0 1.00 145 | 172.0 222.0 217.0 1.00 146 | 173.0 222.0 219.0 1.00 147 | 175.0 222.0 221.0 1.00 148 | 176.0 222.0 223.0 1.00 149 | 178.0 222.0 225.0 1.00 150 | 180.0 223.0 227.0 1.00 151 | 181.0 223.0 229.0 1.00 152 | 183.0 223.0 230.0 1.00 153 | 185.0 223.0 232.0 1.00 154 | 187.0 223.0 233.0 1.00 155 | 188.0 223.0 235.0 1.00 156 | 190.0 223.0 236.0 1.00 157 | 192.0 224.0 238.0 1.00 158 | 194.0 224.0 239.0 1.00 159 | 196.0 224.0 240.0 1.00 160 | 198.0 224.0 241.0 1.00 161 | 199.0 224.0 242.0 1.00 162 | 201.0 225.0 244.0 1.00 163 | 203.0 225.0 244.0 1.00 164 | 205.0 225.0 245.0 1.00 165 | 207.0 225.0 246.0 1.00 166 | 209.0 225.0 247.0 1.00 167 | 211.0 226.0 248.0 1.00 168 | 213.0 226.0 249.0 1.00 169 | 214.0 226.0 249.0 1.00 170 | 216.0 226.0 250.0 1.00 171 | 218.0 227.0 250.0 1.00 172 | 220.0 227.0 251.0 1.00 173 | 221.0 228.0 251.0 1.00 174 | 223.0 228.0 252.0 1.00 175 | 225.0 228.0 252.0 1.00 176 | 226.0 229.0 252.0 1.00 177 | 228.0 229.0 252.0 1.00 178 | 229.0 230.0 253.0 1.00 179 | 231.0 230.0 253.0 1.00 180 | 232.0 231.0 253.0 1.00 181 | 234.0 231.0 253.0 1.00 182 | 235.0 232.0 253.0 1.00 183 | 237.0 232.0 253.0 1.00 184 | 238.0 233.0 253.0 1.00 185 | 239.0 234.0 253.0 1.00 186 | 240.0 234.0 253.0 1.00 187 | 242.0 235.0 253.0 1.00 188 | 243.0 236.0 253.0 1.00 189 | 244.0 237.0 253.0 1.00 190 | 245.0 237.0 253.0 1.00 191 | 246.0 238.0 253.0 1.00 192 | 247.0 239.0 253.0 1.00 193 | 248.0 240.0 253.0 1.00 194 | 248.0 241.0 253.0 1.00 195 | 249.0 242.0 253.0 1.00 196 | 250.0 243.0 253.0 1.00 197 | 251.0 244.0 253.0 1.00 198 | 251.0 245.0 253.0 1.00 199 | 252.0 246.0 253.0 1.00 200 | 252.0 247.0 253.0 1.00 201 | 253.0 248.0 253.0 1.00 202 | 253.0 249.0 253.0 1.00 203 | 254.0 250.0 254.0 1.00 204 | 254.0 251.0 254.0 1.00 205 | 254.0 252.0 254.0 1.00 206 | 255.0 253.0 254.0 1.00 207 | 255.0 254.0 255.0 1.00 208 | 255.0 255.0 255.0 1.00 209 | -------------------------------------------------------------------------------- /examples/illustris_subbox0_config_1080p.txt: -------------------------------------------------------------------------------- 1 | % Sample ArepoVTK Configuration File 2 | 3 | % Input/Output 4 | % ------------ 5 | imageFile = output/frame_DM_absorb0vorF_1080_NUMM.png % output: TGA image filename 6 | rawRGBFile = frame.raw.txt % output: raw dump of floats (debug only) 7 | filename = output/subbox0/snapdir_subbox0_NUMM/snap_subbox0_NUMM % input: snapshot file 8 | paramFilename = param.txt % input: Arepo parameter file 9 | 10 | % General 11 | % ------- 12 | nCores = 16 % number of cores to use (0=all) 13 | nTasks = 256 % number of tasks/threads to run (0=auto) 14 | quickRender = false % unused 15 | openWindow = false % unused 16 | verbose = true % report more information 17 | totNumJobs = 0 % set >=1 to split single image render across multiple jobs (0=disable) 18 | jobExpansionFac = 1 % increase number of jobs by this factor, only for render not mask (per dim) 19 | maskFileBase = % create/use maskfile for job based frustrum culling 20 | maskPadFac = 0.0 % frustrum padding factor in code spatial units 21 | 22 | % Frame/Camera 23 | % ------------ 24 | imageXPixels = 1920 % frame resolution (X), e.g. 1024, 1920 25 | imageYPixels = 1080 % frame resolution (Y), e.g. 768, 1080 26 | swScale = 1.0 % screenWindow mult factor * [-1,1] 27 | cameraType = perspective % ortho, perspective, fisheye, env, rift 28 | cameraFOV = 60.0 % degrees 29 | cameraPosition = 7400 3750 3750 % (XYZ) camera position in world coord system 30 | cameraLookAt = 3750 3750 3750 % (XYZ) point centered in camera FOV 31 | cameraUp = 0.0 1.0 0.0 % (XYZ) camera "up" vector 32 | 33 | % Data Processing 34 | % --------------- 35 | readPartType = 1 % 0=gas, 1=dm, 4=stars, 5=bhs 36 | recenterBoxCoords = 9000 17000 63000 % (XYZ) shift all points for new center (false=disable) 37 | convertUthermToKelvin = true % convert SphP.Utherm field to temp in Kelvin 38 | takeLogUtherm = false % convert K to log(K) 39 | takeLogDens = true % convert dens to log(dens) 40 | 41 | % Transfer Function 42 | % ----------------- 43 | % snap=300: DM DEBUG MIN MAX MEAN: 2.66878e-09 5.81183e-08 7.39965e-09 44 | % snap=2000: DM DEBUG MIN MAX MEAN: 1.91005e-10 0.0215295 2.76062e-05 (SPHDENS) 45 | % snap=2000: DM DEBUG MIN MAX MEAN: 1.73166e-10 0.037363 1.93128e-05 (VORONOI) 46 | % ct['minmax'] = [4.75,8.9] 47 | % 'red' : ((0., 0., 0.), (0.3,0,0), (0.6, 0.8, 0.8), (1., 1., 1.)), 48 | % 'green': ((0., 0., 0.), (0.3,0.3,0.3), (0.6, 0.4, 0.4), (1., 1.0, 1.0)), 49 | % 'blue' : ((0., 0.05, 0.05), (0.3,0.5,0.5), (0.6, 0.6, 0.6), (1.0, 1.0, 1.0)) 50 | 51 | %addTF_01 = linear Density 0.0 0.000001 0.0 0.0 0.0 0.0 0.0 0.0 52 | %addTF_02 = linear Density 0.000001 0.000005 0.0 0.0 0.0 0.0 0.0 0.05 53 | %addTF_03 = linear Density 0.000005 0.00001 0.0 0.0 0.05 0.0 0.3 0.5 54 | %addTF_04 = linear Density 0.00001 0.00005 0.0 0.3 0.5 0.8 0.4 0.6 55 | %addTF_05 = linear Density 0.00005 0.001 0.8 0.4 0.6 1.0 1.0 1.0 56 | %addTF_06 = linear Density 0.001 1.0 1.0 1.0 1.0 1.0 1.0 1.0 57 | 58 | % E: all 1 smaller than D 59 | % F: all 0.5 bigger than E 60 | addTF_01 = linear Density 0.0 3.9 0.0 0.0 0.0 0.0 0.0 0.0 61 | addTF_02 = linear Density 3.9 4.3 0.0 0.0 0.0 0.0 0.0 0.05 62 | addTF_03 = linear Density 4.3 5.5 0.0 0.0 0.05 0.0 0.3 0.5 63 | addTF_04 = linear Density 5.5 6.7 0.0 0.3 0.5 0.8 0.4 0.6 64 | addTF_05 = linear Density 6.7 8.3 0.8 0.4 0.6 1.0 1.0 1.0 65 | addTF_06 = linear Density 8.3 10.0 1.0 1.0 1.0 1.0 1.0 1.0 66 | 67 | %addTF_01 = linear Density -10.0 -7.0 0.0 0.0 0.0 0.0 0.0 0.05 68 | %addTF_02 = linear Density -7.0 -6.0 0.0 0.0 0.05 0.0 0.3 0.5 69 | %addTF_03 = linear Density -6.0 -5.0 0.0 0.3 0.5 0.8 0.4 0.6 70 | %addTF_04 = linear Density -5.0 -4.0 0.8 0.4 0.6 1.0 1.0 1.0 71 | %addTF_05 = linear Density -4.0 0.0 1.0 1.0 1.0 1.0 1.0 1.0 72 | 73 | % Animation 74 | % --------- 75 | numFrames = -1 % set to 1 76 | startFrame = -1 % set by -s cmdline flag 77 | timePerFrame = 1.0 % establish unit system of time/frame 78 | 79 | addKF_01 = 0.0 4320.0 rotXZ 28.2743339 linear % 4.5 total orbits (960 frames, 32 sec per 2pi orbit) 80 | %addKF_01 = 0.0 4320.0 rotXZ 37.699112 linear % 720 frames (24 sec) per 2pi orbit (Mark's setup) 81 | 82 | %Using Config.maxScale = 0.05 current maxScale = 9616.01 83 | %Using Config.minScale = 0 current minScale = 5716 84 | 85 | minScale = 0.0 % based on 0.0 for orig_frame 2000 86 | maxScale = 250.0 % based on 3.59629 for orig_frame 2000 87 | 88 | % Render 89 | % ------ 90 | drawBBox = false % draw simulation bounding box 91 | drawTetra = false % draw delaunay tetrahedra 92 | drawVoronoi = false % draw voronoi polyhedra faces 93 | drawSphere = false % draw test sphere lat/long lines 94 | projColDens = false % calculate/save raw line integrals 95 | nTreeNGB = 32 % use tree-based search integrator instead of mesh (0=disabled) 96 | viStepSize = 4 % volume integration sub-stepping size (0=disabled) 97 | rayMaxT = 15000.0 % maximum ray integration parametric length 98 | rgbLine = 5.0 5.0 5.0 % (RGB) bounding box 99 | rgbTetra = 0.01 0.01 0.01 % (RGB) tetra edges 100 | rgbVoronoi = 0.0 0.05 0.0 % (RGB) voronoi edges 101 | rgbAbsorb = 0.0 0.0 0.0 %10000 10000 10000 % (RGB) absorption, 0=none 102 | 103 | % End. 104 | 105 | -------------------------------------------------------------------------------- /src/spectrum.h: -------------------------------------------------------------------------------- 1 | /* 2 | * spectrum.h 3 | * dnelson 4 | */ 5 | 6 | #ifndef AREPO_RT_SPECTRUM_H 7 | #define AREPO_RT_SPECTRUM_H 8 | 9 | #include "ArepoRT.h" 10 | 11 | inline void XYZToRGB(const float xyz[3], float rgb[3]) { 12 | rgb[0] = 3.240479f*xyz[0] - 1.537150f*xyz[1] - 0.498535f*xyz[2]; 13 | rgb[1] = -0.969256f*xyz[0] + 1.875991f*xyz[1] + 0.041556f*xyz[2]; 14 | rgb[2] = 0.055648f*xyz[0] - 0.204043f*xyz[1] + 1.057311f*xyz[2]; 15 | } 16 | inline void RGBToXYZ(const float rgb[3], float xyz[3]) { 17 | xyz[0] = 0.412453f*rgb[0] + 0.357580f*rgb[1] + 0.180423f*rgb[2]; 18 | xyz[1] = 0.212671f*rgb[0] + 0.715160f*rgb[1] + 0.072169f*rgb[2]; 19 | xyz[2] = 0.019334f*rgb[0] + 0.119193f*rgb[1] + 0.950227f*rgb[2]; 20 | } 21 | 22 | template class CoefficientSpectrum { 23 | public: 24 | // construction 25 | CoefficientSpectrum(float v = 0.0f) { 26 | for (int i = 0; i < nSamples; ++i) 27 | c[i] = v; 28 | } 29 | 30 | // operators 31 | CoefficientSpectrum &operator+=(const CoefficientSpectrum &s2) { 32 | for (int i = 0; i < nSamples; ++i) 33 | c[i] += s2.c[i]; 34 | return *this; 35 | } 36 | CoefficientSpectrum operator+(const CoefficientSpectrum &s2) const { 37 | CoefficientSpectrum ret = *this; 38 | for (int i = 0; i < nSamples; ++i) 39 | ret.c[i] += s2.c[i]; 40 | return ret; 41 | } 42 | CoefficientSpectrum operator-(const CoefficientSpectrum &s2) const { 43 | CoefficientSpectrum ret = *this; 44 | for (int i = 0; i < nSamples; ++i) 45 | ret.c[i] -= s2.c[i]; 46 | return ret; 47 | } 48 | CoefficientSpectrum operator/(const CoefficientSpectrum &s2) const { 49 | CoefficientSpectrum ret = *this; 50 | for (int i = 0; i < nSamples; ++i) 51 | ret.c[i] /= s2.c[i]; 52 | return ret; 53 | } 54 | CoefficientSpectrum operator*(const CoefficientSpectrum &sp) const { 55 | CoefficientSpectrum ret = *this; 56 | for (int i = 0; i < nSamples; ++i) 57 | ret.c[i] *= sp.c[i]; 58 | return ret; 59 | } 60 | CoefficientSpectrum &operator*=(const CoefficientSpectrum &sp) { 61 | for (int i = 0; i < nSamples; ++i) 62 | c[i] *= sp.c[i]; 63 | return *this; 64 | } 65 | CoefficientSpectrum operator*(float a) const { 66 | CoefficientSpectrum ret = *this; 67 | for (int i = 0; i < nSamples; ++i) 68 | ret.c[i] *= a; 69 | return ret; 70 | } 71 | CoefficientSpectrum &operator*=(float a) { 72 | for (int i = 0; i < nSamples; ++i) 73 | c[i] *= a; 74 | return *this; 75 | } 76 | friend inline 77 | CoefficientSpectrum operator*(float a, const CoefficientSpectrum &s) { 78 | return s * a; 79 | } 80 | CoefficientSpectrum operator/(float a) const { 81 | CoefficientSpectrum ret = *this; 82 | for (int i = 0; i < nSamples; ++i) 83 | ret.c[i] /= a; 84 | return ret; 85 | } 86 | CoefficientSpectrum &operator/=(float a) { 87 | for (int i = 0; i < nSamples; ++i) 88 | c[i] /= a; 89 | return *this; 90 | } 91 | bool operator==(float a) const { 92 | for (int i = 0; i < nSamples; ++i) 93 | if (c[i] != a) return false; 94 | return true; 95 | } 96 | bool operator==(const CoefficientSpectrum &sp) const { 97 | for (int i = 0; i < nSamples; ++i) 98 | if (c[i] != sp.c[i]) return false; 99 | return true; 100 | } 101 | bool operator!=(const CoefficientSpectrum &sp) const { 102 | return !(*this == sp); 103 | } 104 | 105 | CoefficientSpectrum operator-() const { 106 | CoefficientSpectrum ret; 107 | for (int i = 0; i < nSamples; ++i) 108 | ret.c[i] = -c[i]; 109 | return ret; 110 | } 111 | friend CoefficientSpectrum Exp(const CoefficientSpectrum &s) { 112 | CoefficientSpectrum ret; 113 | for (int i = 0; i < nSamples; ++i) 114 | ret.c[i] = expf(s.c[i]); 115 | return ret; 116 | } 117 | 118 | // data 119 | protected: 120 | float c[nSamples]; 121 | }; 122 | 123 | class RGBSpectrum : public CoefficientSpectrum<3> { 124 | using CoefficientSpectrum<3>::c; 125 | public: 126 | // construction 127 | RGBSpectrum(float v = 0.0f) : CoefficientSpectrum<3>(v) { 128 | } 129 | RGBSpectrum(const CoefficientSpectrum<3> &v) 130 | : CoefficientSpectrum<3>(v) { 131 | } 132 | RGBSpectrum(const RGBSpectrum &s) { 133 | *this = s; 134 | } 135 | 136 | // conversions 137 | static RGBSpectrum FromRGB(const float rgb[3]) { 138 | RGBSpectrum s; 139 | s.c[0] = rgb[0]; 140 | s.c[1] = rgb[1]; 141 | s.c[2] = rgb[2]; 142 | return s; 143 | } 144 | void ToRGB(float *rgb) const { 145 | rgb[0] = c[0]; 146 | rgb[1] = c[1]; 147 | rgb[2] = c[2]; 148 | } 149 | void ToXYZ(float xyz[3]) const { 150 | RGBToXYZ(c, xyz); 151 | } 152 | const RGBSpectrum &ToRGBSpectrum() const { 153 | return *this; 154 | } 155 | 156 | // TODO: lookup from table 157 | static RGBSpectrum FromNamed(const string &name) { 158 | RGBSpectrum s; 159 | if (name == "red") { 160 | s.c[0] = 0.1f; 161 | s.c[1] = 0.0f; 162 | s.c[2] = 0.0f; 163 | } else if (name == "green") { 164 | s.c[0] = 0.0f; 165 | s.c[1] = 0.1f; 166 | s.c[2] = 0.0f; 167 | } else if (name == "blue") { 168 | s.c[0] = 0.0f; 169 | s.c[1] = 0.0f; 170 | s.c[2] = 0.1f; 171 | } else if (name == "black") { 172 | s.c[0] = 0.0f; 173 | s.c[1] = 0.0f; 174 | s.c[2] = 0.0f; 175 | } else if (name == "white") { 176 | s.c[0] = 0.1f; 177 | s.c[1] = 0.1f; 178 | s.c[2] = 0.1f; 179 | } 180 | return s; 181 | } 182 | 183 | // components 184 | float r() { return c[0]; } 185 | float g() { return c[1]; } 186 | float b() { return c[2]; } 187 | 188 | float y() const { 189 | const float YWeight[3] = { 0.212671f, 0.715160f, 0.072169f }; 190 | return YWeight[0] * c[0] + YWeight[1] * c[1] + YWeight[2] * c[2]; 191 | } 192 | 193 | }; 194 | 195 | #endif 196 | -------------------------------------------------------------------------------- /src/util.h: -------------------------------------------------------------------------------- 1 | /* 2 | * util.h 3 | * dnelson 4 | */ 5 | 6 | #ifndef AREPO_RT_UTIL_H 7 | #define AREPO_RT_UTIL_H 8 | 9 | #include "ArepoRT.h" 10 | #include 11 | #include 12 | 13 | // timing 14 | 15 | class Timer { 16 | public: 17 | // construction 18 | Timer(); 19 | 20 | // methods 21 | void Start(); 22 | void Stop(); 23 | void Reset(); 24 | 25 | double Time(); 26 | private: 27 | // data 28 | double time0, elapsed; 29 | bool running; 30 | double GetTime(); 31 | // UNIX Timer 32 | struct timeval timeofday; 33 | }; 34 | 35 | // temporary memory management 36 | 37 | void *AllocAligned(size_t size); 38 | 39 | template T *AllocAligned(uint32_t count) { 40 | return (T *)AllocAligned(count * sizeof(T)); 41 | } 42 | 43 | void FreeAligned(void *); 44 | 45 | template class BlockedArray { 46 | public: 47 | // BlockedArray Public Methods 48 | BlockedArray(uint32_t nu, uint32_t nv, const T *d = NULL) 49 | { 50 | uRes = nu; 51 | vRes = nv; 52 | uBlocks = RoundUp(uRes) >> logBlockSize; 53 | uint32_t nAlloc = RoundUp(uRes) * RoundUp(vRes); 54 | data = AllocAligned(nAlloc); 55 | for (uint32_t i = 0; i < nAlloc; ++i) 56 | new (&data[i]) T(); 57 | if (d) 58 | for (uint32_t v = 0; v < vRes; ++v) 59 | for (uint32_t u = 0; u < uRes; ++u) 60 | (*this)(u, v) = d[v * uRes + u]; 61 | } 62 | uint32_t BlockSize() const { return 1 << logBlockSize; } 63 | uint32_t RoundUp(uint32_t x) const 64 | { 65 | return (x + BlockSize() - 1) & ~(BlockSize() - 1); 66 | } 67 | uint32_t uSize() const { return uRes; } 68 | uint32_t vSize() const { return vRes; } 69 | ~BlockedArray() 70 | { 71 | for (uint32_t i = 0; i < uRes * vRes; ++i) 72 | data[i].~T(); 73 | FreeAligned(data); 74 | } 75 | uint32_t Block(uint32_t a) const { return a >> logBlockSize; } 76 | uint32_t Offset(uint32_t a) const { return (a & (BlockSize() - 1)); } 77 | T &operator()(uint32_t u, uint32_t v) 78 | { 79 | uint32_t bu = Block(u), bv = Block(v); 80 | uint32_t ou = Offset(u), ov = Offset(v); 81 | uint32_t offset = BlockSize() * BlockSize() * (uBlocks * bv + bu); 82 | offset += BlockSize() * ov + ou; 83 | return data[offset]; 84 | } 85 | const T &operator()(uint32_t u, uint32_t v) const 86 | { 87 | uint32_t bu = Block(u), bv = Block(v); 88 | uint32_t ou = Offset(u), ov = Offset(v); 89 | uint32_t offset = BlockSize() * BlockSize() * (uBlocks * bv + bu); 90 | offset += BlockSize() * ov + ou; 91 | return data[offset]; 92 | } 93 | void GetLinearArray(T *a) const { 94 | for (uint32_t v = 0; v < vRes; ++v) 95 | for (uint32_t u = 0; u < uRes; ++u) 96 | *a++ = (*this)(u, v); 97 | } 98 | private: 99 | // BlockedArray Private Data 100 | T *data; 101 | uint32_t uRes, vRes, uBlocks; 102 | }; 103 | 104 | // random number generation 105 | 106 | class RNG { 107 | public: 108 | RNG(uint32_t seed = 5489UL) { 109 | IF_DEBUG(cout << "RNG(" << seed << ") constructor." << endl); 110 | mti = N+1; /* mti==N+1 means mt[N] is not initialized */ 111 | Seed(seed); 112 | } 113 | 114 | void Seed(uint32_t seed) const; 115 | float RandomFloat() const; 116 | unsigned long RandomUInt() const; 117 | 118 | private: 119 | static const int N = 624; 120 | mutable unsigned long mt[N]; /* the array for the state vector */ 121 | mutable int mti; 122 | }; 123 | 124 | static const float OneMinusEpsilon=0x1.fffffep-1; 125 | 126 | void StratifiedSample1D(float *samples, int nsamples, RNG &rng, bool jitter = true); 127 | void StratifiedSample2D(float *samples, int nx, int ny, RNG &rng, bool jitter = true); 128 | void LatinHypercube(float *samples, uint32_t nSamples, uint32_t nDim, RNG &rng); 129 | 130 | template void Shuffle(T *samp, uint32_t count, uint32_t dims, RNG &rng) 131 | { 132 | for (uint32_t i = 0; i < count; ++i) { 133 | uint32_t other = i + (rng.RandomUInt() % (count - i)); 134 | for (uint32_t j = 0; j < dims; ++j) 135 | swap(samp[dims*i + j], samp[dims*other + j]); 136 | } 137 | } 138 | 139 | // multiple cores and threading 140 | struct MutexLock; 141 | 142 | class Mutex 143 | { 144 | public: 145 | static Mutex *Create(); 146 | static void Destroy(Mutex *m); 147 | 148 | // pthread object 149 | pthread_mutex_t mutex; 150 | private: 151 | Mutex(); 152 | ~Mutex(); 153 | friend struct MutexLock; 154 | Mutex(Mutex &); 155 | Mutex &operator=(const Mutex &); 156 | }; 157 | 158 | struct MutexLock 159 | { 160 | MutexLock(Mutex &m); 161 | ~MutexLock(); 162 | private: 163 | Mutex &mutex; 164 | MutexLock(const MutexLock &); 165 | MutexLock &operator=(const MutexLock &); 166 | }; 167 | 168 | class Semaphore 169 | { 170 | public: 171 | // construction 172 | Semaphore(); 173 | ~Semaphore(); 174 | 175 | // methods 176 | void Post(int count = 1); 177 | void Wait(); 178 | bool TryWait(); 179 | private: 180 | // semaphore and counter 181 | sem_t *sem; 182 | static int count; 183 | }; 184 | 185 | 186 | class ConditionVariable 187 | { 188 | public: 189 | // construction 190 | ConditionVariable(); 191 | ~ConditionVariable(); 192 | 193 | // methods 194 | void Lock(); 195 | void Unlock(); 196 | void Wait(); 197 | void Signal(); 198 | private: 199 | // pthread objects 200 | pthread_mutex_t mutex; 201 | pthread_cond_t cond; 202 | }; 203 | 204 | // can't get RendererTask in here directly 205 | class Task 206 | { 207 | public: 208 | virtual ~Task(); 209 | virtual void Run(int threadNum) = 0; 210 | }; 211 | 212 | void TasksInit(); 213 | void TasksCleanup(); 214 | 215 | void startTasks(const vector &tasks); 216 | void waitUntilAllTasksDone(); 217 | 218 | int numberOfCores(); 219 | 220 | #endif 221 | -------------------------------------------------------------------------------- /src/camera.h: -------------------------------------------------------------------------------- 1 | /* 2 | * camera.h 3 | * dnelson 4 | */ 5 | 6 | #ifndef AREPO_RT_CAMERA_H 7 | #define AREPO_RT_CAMERA_H 8 | 9 | #include "ArepoRT.h" 10 | 11 | class Filter { 12 | public: 13 | // construction 14 | virtual ~Filter(); 15 | Filter(float xw, float yw) 16 | : xWidth(xw), yWidth(yw), invXWidth(1.f/xw), invYWidth(1.f/yw) { 17 | } 18 | // methods 19 | virtual float Evaluate(float x, float y) const = 0; 20 | 21 | // data 22 | const float xWidth, yWidth; 23 | const float invXWidth, invYWidth; 24 | }; 25 | 26 | class BoxFilter : public Filter { 27 | public: 28 | BoxFilter(float xw, float yw) : Filter(xw, yw) { 29 | IF_DEBUG(cout << "BoxFilter(" << xw << ", " << yw << ") constructor." << endl); 30 | } 31 | float Evaluate(float x, float y) const; 32 | }; 33 | 34 | BoxFilter *CreateBoxFilter(); 35 | 36 | class Film { 37 | public: 38 | // construction 39 | Film(int xres, int yres) 40 | : xResolution(xres), yResolution(yres) { 41 | IF_DEBUG(cout << "Film(" << xres << ", " << yres << ") constructor." << endl); 42 | } 43 | Film(int xres, int yres, Filter *filt, const double crop[4], 44 | const string &filename, bool openWindow); 45 | ~Film() { 46 | delete pixels; 47 | delete integrals; 48 | delete filter; 49 | delete[] filterTable; 50 | } 51 | 52 | // methods 53 | void AddSample(const CameraSample &sample, const Spectrum &L, const Ray &ray, int threadNum); 54 | void Splat(const CameraSample &sample, const Spectrum &L); 55 | void GetSampleExtent(int *xstart, int *xend, int *ystart, int *yend) const; 56 | void GetPixelExtent(int *xstart, int *xend, int *ystart, int *yend) const; 57 | void UpdateDisplay(int x0, int y0, int x1, int y1, float splatScale = 1.f); 58 | void WriteImage(int frameNum, float splatScale = 1.f); 59 | void WriteIntegrals(); 60 | void WriteRawRGB(); 61 | 62 | void CalculateScreenWindow(float *screen, int jobNum); 63 | bool DrawLine(float x1, float y1, float x2, float y2, const Spectrum &L); 64 | 65 | // data 66 | const int xResolution, yResolution; 67 | private: 68 | Filter *filter; 69 | double cropWindow[4]; 70 | string filename; 71 | int xPixelStart, yPixelStart, xPixelCount, yPixelCount; 72 | 73 | struct Pixel { 74 | Pixel() { 75 | for (int i = 0; i < 3; ++i) 76 | Lxyz[i] = splatXYZ[i] = 0.0f; 77 | weightSum = 0.0f; 78 | } 79 | float Lxyz[3]; 80 | float weightSum; 81 | float splatXYZ[3]; 82 | float pad; 83 | }; 84 | struct RawPixel { 85 | RawPixel() { 86 | for (int i = 0; i < TF_NUM_VALS; ++i) 87 | raw_vals[i] = 0.0f; 88 | weightSum = 0.0f; 89 | } 90 | float raw_vals[TF_NUM_VALS]; 91 | float weightSum; 92 | }; 93 | 94 | BlockedArray *pixels; 95 | BlockedArray *integrals; 96 | float *filterTable; 97 | }; 98 | 99 | Film *CreateFilm(Filter *filter); 100 | 101 | class Camera { 102 | public: 103 | // construction 104 | Camera(const Transform &cam2world, float sopen, float sclose, Film *film); 105 | Camera(const Transform &cam2world, const Transform &proj, const float screenWindow[4], 106 | float sopen, float sclose, float lensr, float focald, Film *film); 107 | virtual ~Camera(); 108 | 109 | // methods 110 | virtual float GenerateRay(const CameraSample &sample, Ray *ray) const = 0; 111 | 112 | virtual bool RasterizeLine(const Point &p1, const Point &p2, const Spectrum &L) const = 0; 113 | 114 | // data 115 | Transform CameraToWorld; 116 | const float shutterOpen, shutterClose; 117 | Film *film; 118 | 119 | protected: 120 | // private data 121 | Transform CameraToScreen, RasterToCamera; 122 | Transform ScreenToRaster, RasterToScreen; 123 | Transform WorldToRaster; 124 | float lensRadius, focalDistance; 125 | }; 126 | 127 | class OrthoCamera : public Camera { 128 | public: 129 | // methods 130 | OrthoCamera(const Transform &cam2world, const float screenWindow[4], 131 | float sopen, float sclose, float lensr, float focald, Film *film); 132 | float GenerateRay(const CameraSample &sample, Ray *) const; 133 | bool RasterizeLine(const Point &p1, const Point &p2, const Spectrum &L) const; 134 | 135 | private: 136 | // data 137 | Vector dxCamera, dyCamera; 138 | }; 139 | 140 | class PerspectiveCamera : public Camera { 141 | public: 142 | // methods 143 | PerspectiveCamera(const Transform &cam2world, const float screenWindow[4], 144 | float sopen, float sclose, float lensr, float focald, float fov, Film *film); 145 | float GenerateRay(const CameraSample &sample, Ray *) const; 146 | bool RasterizeLine(const Point &p1, const Point &p2, const Spectrum &L) const; 147 | 148 | private: 149 | // data 150 | Vector dxCamera, dyCamera; 151 | }; 152 | 153 | class FisheyeCamera : public Camera { 154 | public: 155 | // methods 156 | FisheyeCamera(const Transform &cam2world, float sopen, float sclose, Film *film); 157 | float GenerateRay(const CameraSample &sample, Ray *) const; 158 | bool RasterizeLine(const Point &p1, const Point &p2, const Spectrum &L) const; 159 | }; 160 | 161 | class EnvironmentCamera : public Camera { 162 | public: 163 | // methods 164 | EnvironmentCamera(const Transform &cam2world, float sopen, float sclose, Film *film); 165 | float GenerateRay(const CameraSample &sample, Ray *) const; 166 | bool RasterizeLine(const Point &p1, const Point &p2, const Spectrum &L) const; 167 | }; 168 | 169 | Camera *CreateCamera(const Transform &cam2world, Film *film); 170 | OrthoCamera *CreateOrthographicCamera(const Transform &cam2world, Film *film); 171 | PerspectiveCamera *CreatePerspectiveCamera(const Transform &cam2world, Film *film); 172 | FisheyeCamera *CreateFisheyeCamera(const Transform &cam2world, Film *film); 173 | EnvironmentCamera *CreateEnvironmentCamera(const Transform &cam2world, Film *film); 174 | 175 | #endif 176 | -------------------------------------------------------------------------------- /colortables/gist_heat.tbl: -------------------------------------------------------------------------------- 1 | # comment 2 | 256 3 | 0.0 0.0 0.0 1.00 4 | 1.5 0.0 0.0 1.00 5 | 3.0 0.0 0.0 1.00 6 | 4.5 0.0 0.0 1.00 7 | 6.0 0.0 0.0 1.00 8 | 7.5 0.0 0.0 1.00 9 | 9.0 0.0 0.0 1.00 10 | 10.5 0.0 0.0 1.00 11 | 12.0 0.0 0.0 1.00 12 | 13.5 0.0 0.0 1.00 13 | 15.0 0.0 0.0 1.00 14 | 16.5 0.0 0.0 1.00 15 | 18.0 0.0 0.0 1.00 16 | 19.5 0.0 0.0 1.00 17 | 21.0 0.0 0.0 1.00 18 | 22.5 0.0 0.0 1.00 19 | 24.0 0.0 0.0 1.00 20 | 25.5 0.0 0.0 1.00 21 | 27.0 0.0 0.0 1.00 22 | 28.5 0.0 0.0 1.00 23 | 30.0 0.0 0.0 1.00 24 | 31.5 0.0 0.0 1.00 25 | 33.0 0.0 0.0 1.00 26 | 34.5 0.0 0.0 1.00 27 | 36.0 0.0 0.0 1.00 28 | 37.5 0.0 0.0 1.00 29 | 39.0 0.0 0.0 1.00 30 | 40.5 0.0 0.0 1.00 31 | 42.0 0.0 0.0 1.00 32 | 43.5 0.0 0.0 1.00 33 | 45.0 0.0 0.0 1.00 34 | 46.5 0.0 0.0 1.00 35 | 48.0 0.0 0.0 1.00 36 | 49.5 0.0 0.0 1.00 37 | 51.0 0.0 0.0 1.00 38 | 52.5 0.0 0.0 1.00 39 | 54.0 0.0 0.0 1.00 40 | 55.5 0.0 0.0 1.00 41 | 57.0 0.0 0.0 1.00 42 | 58.5 0.0 0.0 1.00 43 | 60.0 0.0 0.0 1.00 44 | 61.5 0.0 0.0 1.00 45 | 63.0 0.0 0.0 1.00 46 | 64.5 0.0 0.0 1.00 47 | 66.0 0.0 0.0 1.00 48 | 67.5 0.0 0.0 1.00 49 | 69.0 0.0 0.0 1.00 50 | 70.5 0.0 0.0 1.00 51 | 72.0 0.0 0.0 1.00 52 | 73.5 0.0 0.0 1.00 53 | 75.0 0.0 0.0 1.00 54 | 76.5 0.0 0.0 1.00 55 | 78.0 0.0 0.0 1.00 56 | 79.5 0.0 0.0 1.00 57 | 81.0 0.0 0.0 1.00 58 | 82.5 0.0 0.0 1.00 59 | 84.0 0.0 0.0 1.00 60 | 85.5 0.0 0.0 1.00 61 | 87.0 0.0 0.0 1.00 62 | 88.5 0.0 0.0 1.00 63 | 90.0 0.0 0.0 1.00 64 | 91.5 0.0 0.0 1.00 65 | 93.0 0.0 0.0 1.00 66 | 94.5 0.0 0.0 1.00 67 | 96.0 0.0 0.0 1.00 68 | 97.5 0.0 0.0 1.00 69 | 99.0 0.0 0.0 1.00 70 | 100.5 0.0 0.0 1.00 71 | 102.0 0.0 0.0 1.00 72 | 103.5 0.0 0.0 1.00 73 | 105.0 0.0 0.0 1.00 74 | 106.5 0.0 0.0 1.00 75 | 108.0 0.0 0.0 1.00 76 | 109.5 0.0 0.0 1.00 77 | 111.0 0.0 0.0 1.00 78 | 112.5 0.0 0.0 1.00 79 | 114.0 0.0 0.0 1.00 80 | 115.5 0.0 0.0 1.00 81 | 117.0 0.0 0.0 1.00 82 | 118.5 0.0 0.0 1.00 83 | 120.0 0.0 0.0 1.00 84 | 121.5 0.0 0.0 1.00 85 | 123.0 0.0 0.0 1.00 86 | 124.5 0.0 0.0 1.00 87 | 126.0 0.0 0.0 1.00 88 | 127.5 0.0 0.0 1.00 89 | 129.0 0.0 0.0 1.00 90 | 130.5 0.0 0.0 1.00 91 | 132.0 0.0 0.0 1.00 92 | 133.5 0.0 0.0 1.00 93 | 135.0 0.0 0.0 1.00 94 | 136.5 0.0 0.0 1.00 95 | 138.0 0.0 0.0 1.00 96 | 139.5 0.0 0.0 1.00 97 | 141.0 0.0 0.0 1.00 98 | 142.5 0.0 0.0 1.00 99 | 144.0 0.0 0.0 1.00 100 | 145.5 0.0 0.0 1.00 101 | 147.0 0.0 0.0 1.00 102 | 148.5 0.0 0.0 1.00 103 | 150.0 0.0 0.0 1.00 104 | 151.5 0.0 0.0 1.00 105 | 153.0 0.0 0.0 1.00 106 | 154.5 0.0 0.0 1.00 107 | 156.0 0.0 0.0 1.00 108 | 157.5 0.0 0.0 1.00 109 | 159.0 0.0 0.0 1.00 110 | 160.5 0.0 0.0 1.00 111 | 162.0 0.0 0.0 1.00 112 | 163.5 0.0 0.0 1.00 113 | 165.0 0.0 0.0 1.00 114 | 166.5 0.0 0.0 1.00 115 | 168.0 0.0 0.0 1.00 116 | 169.5 0.0 0.0 1.00 117 | 171.0 0.0 0.0 1.00 118 | 172.5 0.0 0.0 1.00 119 | 174.0 0.0 0.0 1.00 120 | 175.5 0.0 0.0 1.00 121 | 177.0 0.0 0.0 1.00 122 | 178.5 0.0 0.0 1.00 123 | 180.0 0.0 0.0 1.00 124 | 181.5 0.0 0.0 1.00 125 | 183.0 0.0 0.0 1.00 126 | 184.5 0.0 0.0 1.00 127 | 186.0 0.0 0.0 1.00 128 | 187.5 0.0 0.0 1.00 129 | 189.0 0.0 0.0 1.00 130 | 190.5 0.0 0.0 1.00 131 | 192.0 1.0 0.0 1.00 132 | 193.5 3.0 0.0 1.00 133 | 195.0 5.0 0.0 1.00 134 | 196.5 7.0 0.0 1.00 135 | 198.0 9.0 0.0 1.00 136 | 199.5 11.0 0.0 1.00 137 | 201.0 13.0 0.0 1.00 138 | 202.5 15.0 0.0 1.00 139 | 204.0 17.0 0.0 1.00 140 | 205.5 19.0 0.0 1.00 141 | 207.0 21.0 0.0 1.00 142 | 208.5 23.0 0.0 1.00 143 | 210.0 25.0 0.0 1.00 144 | 211.5 27.0 0.0 1.00 145 | 213.0 29.0 0.0 1.00 146 | 214.5 31.0 0.0 1.00 147 | 216.0 33.0 0.0 1.00 148 | 217.5 35.0 0.0 1.00 149 | 219.0 37.0 0.0 1.00 150 | 220.5 39.0 0.0 1.00 151 | 222.0 41.0 0.0 1.00 152 | 223.5 43.0 0.0 1.00 153 | 225.0 45.0 0.0 1.00 154 | 226.5 47.0 0.0 1.00 155 | 228.0 49.0 0.0 1.00 156 | 229.5 51.0 0.0 1.00 157 | 231.0 53.0 0.0 1.00 158 | 232.5 55.0 0.0 1.00 159 | 234.0 57.0 0.0 1.00 160 | 235.5 59.0 0.0 1.00 161 | 237.0 61.0 0.0 1.00 162 | 238.5 63.0 0.0 1.00 163 | 240.0 65.0 0.0 1.00 164 | 241.5 67.0 0.0 1.00 165 | 243.0 69.0 0.0 1.00 166 | 244.5 71.0 0.0 1.00 167 | 246.0 73.0 0.0 1.00 168 | 247.5 75.0 0.0 1.00 169 | 249.0 77.0 0.0 1.00 170 | 250.5 79.0 0.0 1.00 171 | 252.0 81.0 0.0 1.00 172 | 253.5 83.0 0.0 1.00 173 | 255.0 85.0 0.0 1.00 174 | 255.0 87.0 0.0 1.00 175 | 255.0 89.0 0.0 1.00 176 | 255.0 91.0 0.0 1.00 177 | 255.0 93.0 0.0 1.00 178 | 255.0 95.0 0.0 1.00 179 | 255.0 97.0 0.0 1.00 180 | 255.0 99.0 0.0 1.00 181 | 255.0 101.0 0.0 1.00 182 | 255.0 103.0 0.0 1.00 183 | 255.0 105.0 0.0 1.00 184 | 255.0 107.0 0.0 1.00 185 | 255.0 109.0 0.0 1.00 186 | 255.0 111.0 0.0 1.00 187 | 255.0 113.0 0.0 1.00 188 | 255.0 115.0 0.0 1.00 189 | 255.0 117.0 0.0 1.00 190 | 255.0 119.0 0.0 1.00 191 | 255.0 121.0 0.0 1.00 192 | 255.0 123.0 0.0 1.00 193 | 255.0 125.0 0.0 1.00 194 | 255.0 127.0 0.0 1.00 195 | 255.0 129.0 3.0 1.00 196 | 255.0 131.0 7.0 1.00 197 | 255.0 133.0 11.0 1.00 198 | 255.0 135.0 15.0 1.00 199 | 255.0 137.0 19.0 1.00 200 | 255.0 139.0 23.0 1.00 201 | 255.0 141.0 27.0 1.00 202 | 255.0 143.0 31.0 1.00 203 | 255.0 145.0 35.0 1.00 204 | 255.0 147.0 39.0 1.00 205 | 255.0 149.0 43.0 1.00 206 | 255.0 151.0 47.0 1.00 207 | 255.0 153.0 51.0 1.00 208 | 255.0 155.0 55.0 1.00 209 | 255.0 157.0 59.0 1.00 210 | 255.0 159.0 63.0 1.00 211 | 255.0 161.0 67.0 1.00 212 | 255.0 163.0 71.0 1.00 213 | 255.0 165.0 75.0 1.00 214 | 255.0 167.0 79.0 1.00 215 | 255.0 169.0 83.0 1.00 216 | 255.0 171.0 87.0 1.00 217 | 255.0 173.0 91.0 1.00 218 | 255.0 175.0 95.0 1.00 219 | 255.0 177.0 99.0 1.00 220 | 255.0 179.0 103.0 1.00 221 | 255.0 181.0 107.0 1.00 222 | 255.0 183.0 111.0 1.00 223 | 255.0 185.0 115.0 1.00 224 | 255.0 187.0 119.0 1.00 225 | 255.0 189.0 123.0 1.00 226 | 255.0 191.0 127.0 1.00 227 | 255.0 193.0 131.0 1.00 228 | 255.0 195.0 135.0 1.00 229 | 255.0 197.0 139.0 1.00 230 | 255.0 199.0 143.0 1.00 231 | 255.0 201.0 147.0 1.00 232 | 255.0 203.0 151.0 1.00 233 | 255.0 205.0 155.0 1.00 234 | 255.0 207.0 159.0 1.00 235 | 255.0 209.0 163.0 1.00 236 | 255.0 211.0 167.0 1.00 237 | 255.0 213.0 171.0 1.00 238 | 255.0 215.0 175.0 1.00 239 | 255.0 217.0 179.0 1.00 240 | 255.0 219.0 183.0 1.00 241 | 255.0 221.0 187.0 1.00 242 | 255.0 223.0 191.0 1.00 243 | 255.0 225.0 195.0 1.00 244 | 255.0 227.0 199.0 1.00 245 | 255.0 229.0 203.0 1.00 246 | 255.0 231.0 207.0 1.00 247 | 255.0 233.0 211.0 1.00 248 | 255.0 235.0 215.0 1.00 249 | 255.0 237.0 219.0 1.00 250 | 255.0 239.0 223.0 1.00 251 | 255.0 241.0 227.0 1.00 252 | 255.0 243.0 231.0 1.00 253 | 255.0 245.0 235.0 1.00 254 | 255.0 247.0 239.0 1.00 255 | 255.0 249.0 243.0 1.00 256 | 255.0 251.0 247.0 1.00 257 | 255.0 253.0 251.0 1.00 258 | 255.0 255.0 255.0 1.00 259 | --------------------------------------------------------------------------------