⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tomo3d.h

📁 射线追踪程序
💻 H
字号:
/* * This file is part of tomo3d * * Copyright (C) 2002, 2003, Sebastien Judenherc <sebastien.judenherc@na.infn.it> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 * USA * */#define _max(a,b) ((a>b)?a:b)struct model_t { int N;                 float *r;                 float *v;};struct block_t { double x,y,z;                 float dx,dy,dz;                 float L;                 float V;                 float dV;                 float damp;};struct layer_t { double x,y,z;                 float dx,dy,dz;                 int Nx,Ny;                 float V;                 float damp;};struct ray_t { int block;               int stanum;               int evenum;               float res;               float i;               float p;               float az;               float L;               double x,y,z;               struct ray_t *next;};struct path_t { int nseg;                int stanum;                int evenum;                double p,i,res,az;                float *x;                float *y;                float *z;                float *T;};struct data_t { char *resname;                double (*vel)(double r);                struct event_t *eve;                struct data_t *next;};double (*Pvelocity)(double r);double (*Svelocity)(double r);struct mod_t {        float X,Y,Z,V;        struct mod_t *next;};struct mod3d_t {        float ***mod;        int ***Nmod;        float X0,Y0;        int Nx,Ny,Nz;        float d;        float W;        struct mod_t *inmod;};struct model_t * readmodel(char *fn,float norm);void init_mod(char *fn,float normv);float interp(struct model_t* mod,float r);int blkcmp(const void *p1, const void *p2);void ptime(int ncc, int comm);void printlayers(FILE *f, struct layer_t *lay, int nbl);struct ray_t *propagate(float i0, float az0, float X0, float Y0, int nst);int blocknum(float x, float y, float z, struct block_t *blk, int nbb, int test);struct block_t *readlayers(char *file, int *nbb,                           struct layer_t **layer, int *nbl);void printblocks(FILE *f, struct block_t *blk, int nbl);struct block_t *readblock(char *file, int *nbb);struct path_t * readpath(char *fn, int *N,float *DS);int writepath(char *fn,struct path_t *path, int N, float DS);void ptime(int ncc, int comm);struct mod3d_t *readveloc(char *s, float dd, float W);float getvelocity(float x, float y, float z, struct mod3d_t *m3d, int test);float smoothvel(float x,float y,float z,struct mod3d_t *m3d,int test);/*int blkcmp(const void *p1, const void *p2);*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -