亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? score.c

?? 用于2維的射線追蹤
?? C
字號:
/* * Ray2mesh : software for geophysicists. * Compute various scores attached to the mesh cells, based on geometric   information that rays bring when the traverse the cell. * * Copyright (C) 2003, St閜hane Genaud and Marc Grunberg * * This tool is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *//* * score.c * * Current cooking state for score magic formula : * *            score = hit_score * length_score * where : * * 1. hit_score : number of faces hexadreal cells traversed / 6 *  * 2. length_score :  *    the cell volume is approximated by a bounding box,  *    for which we compute the length d of diagonal. *    We also compute the average length l of all ays traversing the *    cell. lenght_score = l / d  */#include <math.h>#include <ray/raydescartes.h>#include <mesh/mesh.h>#include <mesh/layer.h>#include "ray2mesh.h"#include "raymaths.h"#include "const_ray2mesh.h"/*--------------------------------------------------------------------*//* get_hit_score : given a cell, compute a simple score function of   *//* hits/cell face: the best score is obtained if all faces are        *//* traversed at least once and 0<=score<=1                            *//*--------------------------------------------------------------------*/static float get_hit_score(struct cell_info_t *cell){    int i;    int hits = 0;    for (i = 0; i < NB_HIT_FACES && cell->faces_hit; i++) {	if (cell->faces_hit[i] > 0) {	    hits += 1;	}    }    return (((float) hits) / NB_HIT_FACES);}/*--------------------------------------------------------------------*//* get_center_score :                                                 *//*--------------------------------------------------------------------*/static float get_center_score(int x, int y, int z,	/* to remove later */			      double lat_min,			      double lon_min,			      int zstart,			      int zend,			      float cell_width_lat,			      float cell_width_lon,			      struct coord_geo_t *in,			      struct coord_geo_t *out){    struct coord_geo_t *m,	/* middle of segment [in,out] */     O;				/* cell center */    double ox, oy, oz;		/* cell center coords */    /* find cell center geo coordinates (in rad) */    ox = (lat_min * TO_RAD) + cell_width_lat * (0.5 + x);    oy = (lon_min * TO_RAD) + cell_width_lon * (0.5 + y);    /* O coordinates may have angles > PI ,      * convert it for a better reading*/    /* ox = fmod(ox, PI);       oy = fmod(oy, PI); */    /* layers bounds are expressed with 0 being the surface */    oz = (zend + zstart) / 2;    printf("cell[%d,%d,%d]  center O=(%.2f %.2f %.2f)\n", x, y, z, ox, oy,	   oz);    /* now get the middle of the segment m=[in;out] */    m = geo_middle(in, out);    printf	("middle=(%.2f %.2f %.2f)\nin=(%.2f %.2f %.2f) out=(%.2f %.2f %.2f)\n",	 m->lat, m->lon, m->prof, in->lat, in->lon, in->prof, out->lat,	 out->lon, out->prof);    /* ... and measures distance d=[O,m] */    O.lat = ox;    O.lon = oy;    O.prof = oz;    /* geo_distance takes geo coords in radians and depth=0 at the surface */    return ((float) geo_distance(&O, m));}/*--------------------------------------------------------------------*//* compute_score : given the cell_info array c and mesh parameters m  *//* review each cell in c, and updates the score field of each cell    *//*--------------------------------------------------------------------*/void compute_score(struct cell_info_t ****c, struct mesh_t *m){    int x, y, z;		/* for enumeration of cell ids            */    int i;    int nb_lat_cell, nb_lon_cell;    float diagonal_length, length;    enum {SCORE=0, HIT, LENGTH, DISP, NB };    struct coord_geo_t p1, p2;	/* used to compute the great diagonal */    if (!c) {	fprintf (stderr, "compute_score : no cell traversed !\n");    	return;    }    for (z = 0; z < m->nlayers; z++) {	/* number of cells in lattitude for this layer */	nb_lat_cell = m->layer[z]->nlat;	/* number of cells in longitude for this layer */	nb_lon_cell = m->layer[z]->nlon;	/* compute length of cell edges in kms to compare to ray length */	p1.lat = 0.;	p1.lon = 0.;	p1.prof =  m->layer[z]->zstart;	p2.lat  = m->layer[z]->lat_unit * m->parameter->lat_unit_size * TO_RAD;	p2.lon  = m->layer[z]->lon_unit * m->parameter->lon_unit_size * TO_RAD;	p2.prof = m->layer[z]->zend;        /* geo_distance takes geo coords in radians and depth=0 at the surface */	diagonal_length = geo_distance (&p1, &p2);#ifdef DEBUG	fprintf(stderr,		"compute_score() : cell size (layer=%d): %.3fx%.3fx%.3f (diag lenght=%.3f)\n",		z, cell_lx, cell_ly,		m->layer[z]->zend - m->layer[z]->zstart, diagonal_length);	fflush(stderr);#endif	for (x = 0; x < nb_lat_cell; x++) {	    for (y = 0; y < nb_lon_cell; y++) {		/* length per traversing ray info */		if ( c[z][x][y] && c[z][x][y]->nitems) {		    /* update hit score from face hit information */		    c[z][x][y]->score[HIT] = get_hit_score(c[z][x][y]);		    length = 0;		    /* sum_distOM = 0.; */		    for (i = 0; i < c[z][x][y]->nitems; i++) {			/* sum of P and S ray length */			length += (c[z][x][y]->item[i].P_length + c[z][x][y]->item[i].S_length);		    }		    /* dispersion score based on blocks traversed */		    c[z][x][y]->score[DISP] = (float) c[z][x][y]->nblocks / NB_CELL_BLOCKS3;		    /* average ray length */		    c[z][x][y]->score[LENGTH] = (length / c[z][x][y]->nitems) / diagonal_length;		    /* score */		    c[z][x][y]->score[SCORE] = c[z][x][y]->score[LENGTH] * c[z][x][y]->score[HIT] * 				               c[z][x][y]->score[DISP] * log10f(c[z][x][y]->nitems+1);		    /* average dist from center */		    /* (c[z][x][y]).center_score = sum_distOM / (c[z][x][y]).nitems; */		}	    }	}    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区二区三区四区在线观看 | 蜜桃av噜噜一区| 久久久不卡网国产精品二区| 欧美xxxx在线观看| 国产精品人人做人人爽人人添| 亚洲欧美一区二区三区孕妇| 亚洲图片欧美色图| 日韩精品成人一区二区在线| 免费观看久久久4p| 色呦呦网站一区| 欧美一区二区精品在线| 国产精品福利一区| 久久激情综合网| 欧美中文字幕不卡| 欧美国产日韩精品免费观看| 日本中文字幕一区二区视频 | 日韩一区二区在线观看视频 | 99热这里都是精品| 欧美日韩国产综合视频在线观看| 精品成人免费观看| 免费精品视频最新在线| 一区二区久久久久| 99re成人精品视频| 日本一区二区在线不卡| 91麻豆精品国产自产在线 | 国产专区综合网| 欧美亚洲高清一区| 中文字幕制服丝袜一区二区三区| 狠狠色狠狠色综合系列| 3atv在线一区二区三区| 一区二区三区在线免费播放| 日日夜夜免费精品| 欧美午夜在线一二页| 夜夜嗨av一区二区三区中文字幕| fc2成人免费人成在线观看播放 | 日韩av一二三| 欧美特级限制片免费在线观看| 中文字幕一区二区三区在线播放| a4yy欧美一区二区三区| 亚洲午夜精品一区二区三区他趣| 日韩限制级电影在线观看| 欧美大片日本大片免费观看| 中文子幕无线码一区tr| 亚洲bdsm女犯bdsm网站| 欧美裸体bbwbbwbbw| 久久99精品国产.久久久久| 国产亚洲欧美中文| 波多野结衣中文字幕一区 | 久久久久国产精品厨房| 国产一区二区中文字幕| 国产精品国产三级国产普通话蜜臀 | 国产精品高潮呻吟| 日韩美女一区二区三区| 97成人超碰视| 精一区二区三区| 日韩av一区二区三区四区| 亚洲日穴在线视频| 久久亚洲精华国产精华液| 色菇凉天天综合网| 国产不卡免费视频| 国产在线精品免费| 久久精品国产免费| 日韩1区2区3区| 奇米精品一区二区三区在线观看一| 国产精品美女久久久久久久网站| 日韩一区二区三区免费看 | 国产精品三级在线观看| 日韩欧美的一区二区| 在线播放中文一区| 日韩欧美一级二级三级| 日韩一区二区在线观看| 337p亚洲精品色噜噜| 777欧美精品| 欧美成人一区二区| 久久久精品天堂| 国产亚洲欧美中文| 亚洲三级免费观看| 一二三区精品福利视频| 日韩和欧美一区二区| 日本欧美加勒比视频| 国产一区久久久| 91久久国产最好的精华液| 欧美自拍丝袜亚洲| 久久久久久日产精品| 亚洲日本va午夜在线影院| 日韩电影在线免费| 国产99久久久国产精品| 91免费精品国自产拍在线不卡| 欧美高清精品3d| 国产精品人妖ts系列视频| 日本欧美在线观看| 成人网在线免费视频| 欧美一级欧美一级在线播放| 亚洲国产电影在线观看| 日韩极品在线观看| 色综合一区二区| 中文字幕巨乱亚洲| 久久99久久99精品免视看婷婷 | 国产精品午夜春色av| 蜜桃av噜噜一区| 欧美高清精品3d| 天天做天天摸天天爽国产一区| 国产盗摄精品一区二区三区在线| 欧美一级片在线| 免费观看在线综合| 欧美视频一区二区| 一区二区三区欧美日韩| 成人一区二区在线观看| 中文字幕精品一区| av成人免费在线观看| 国产精品美女久久久久久久| 国产精品一区二区不卡| 国产婷婷色一区二区三区| 粉嫩一区二区三区在线看| 久久久久久久久久久久久夜| 国产精品一区久久久久| 亚洲少妇最新在线视频| 欧美最新大片在线看| 欧美a级一区二区| 久久精品人人做人人综合 | 亚洲自拍与偷拍| 欧美不卡一区二区三区四区| 白白色 亚洲乱淫| 亚洲综合色婷婷| 久久久综合精品| 欧美在线观看一区| 蜜臀av一级做a爰片久久| 国产欧美日韩不卡| 欧美精品一二三四| 成人免费看视频| av在线不卡电影| 日韩影院在线观看| 国产福利91精品一区| 国产成人免费xxxxxxxx| 日韩精品一区二区在线| 高清不卡一二三区| 久草中文综合在线| 偷窥国产亚洲免费视频| 一区二区三区四区在线免费观看| 26uuu欧美| 日韩免费观看高清完整版 | 91黄色激情网站| 国产盗摄精品一区二区三区在线| 天堂蜜桃一区二区三区 | 欧美大片拔萝卜| 在线综合视频播放| 在线综合视频播放| xvideos.蜜桃一区二区| 久久久精品中文字幕麻豆发布| 26uuu亚洲| 久久精品视频免费观看| 精品国精品国产尤物美女| 日韩欧美自拍偷拍| 久久久综合精品| 中文久久乱码一区二区| 亚洲人成7777| 久久99精品国产.久久久久 | 性做久久久久久久免费看| 亚洲成人免费影院| 蜜臀91精品一区二区三区 | 久久亚洲捆绑美女| 国产欧美精品一区二区色综合| 国产精品五月天| 精品在线你懂的| 99精品视频一区| 亚洲欧美偷拍卡通变态| 精品日韩99亚洲| 久久久精品国产免大香伊| 一区二区三区欧美激情| 紧缚捆绑精品一区二区| 91欧美一区二区| 国产视频一区二区三区在线观看| 一区二区三区国产豹纹内裤在线| 麻豆精品国产传媒mv男同| 色悠悠久久综合| 国产精品日日摸夜夜摸av| 激情五月婷婷综合网| 欧美日韩在线三区| 最好看的中文字幕久久| 夫妻av一区二区| 国产日韩欧美麻豆| 国产精品综合一区二区| 欧美本精品男人aⅴ天堂| 亚洲h在线观看| 7777精品伊人久久久大香线蕉的 | 国产a区久久久| 久久久久久电影| 成人综合在线网站| 国产精品国产自产拍在线| 国产美女精品一区二区三区| 久久综合九色综合欧美亚洲| 精品一区二区三区在线观看| 精品日韩在线观看| 国产剧情av麻豆香蕉精品| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 视频一区欧美精品| 精品国产免费人成电影在线观看四季 | 久久精品国产亚洲一区二区三区| 日韩一区二区三区电影在线观看 | www成人在线观看|