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

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

?? poly2.c

?? 關于網格剖分的
?? C
?? 第 1 頁 / 共 5 頁
字號:
/*<html><pre>  -<a                             href="qh-c.htm#poly"
  >-------------------------------</a><a name="TOP">-</a>

   poly2.c 
   implements polygons and simplices

   see qh-c.htm, poly.h and qhull.h

   frequently used code is in poly.c

   copyright (c) 1993-1999, The Geometry Center
*/

#include "qhull_a.h"

/*======== functions in alphabetical order ==========*/

/*-<a                             href="qh-c.htm#poly"
  >-------------------------------</a><a name="addhash">-</a>
  
  qh_addhash( newelem, hashtable, hashsize, hash )
    add newelem to linear hash table at hash if not already there
*/
void qh_addhash (void* newelem, setT *hashtable, int hashsize, unsigned hash) {
  int scan;
  void *elem;

  for (scan= (int)hash; (elem= SETelem_(hashtable, scan)); 
       scan= (++scan >= hashsize ? 0 : scan)) {
    if (elem == newelem)
      break;
  }
  /* loop terminates because qh_HASHfactor >= 1.1 by qh_initbuffers */
  if (!elem)
    SETelem_(hashtable, scan)= newelem;
} /* addhash */

/*-<a                             href="qh-c.htm#poly"
  >-------------------------------</a><a name="check_bestdist">-</a>
  
  qh_check_bestdist()
    check that all points are within max_outside of the nearest facet
    if qh.ONLYgood,
      ignores !good facets

  see: 
    qh_check_maxout(), qh_outerinner()

  notes:
    if notverified>0 at end of routine
      some points were well inside the hull.  If the hull contains
      a lens-shaped component, these points were not verified.  Use
      options 'Qi Tv' to verify all points.  (Exhaustive check also verifies)

  design:
    determine facet for each point (if any)
    for each point
      start with the assigned facet or with the first facet
      find the best facet for the point and check all coplanar facets
      error if point is outside of facet
*/
void qh_check_bestdist (void) {
  boolT waserror= False, isoutside, unassigned;
  facetT *facet, *bestfacet, *errfacet1= NULL, *errfacet2= NULL;
  facetT *facetlist; 
  realT dist, maxoutside, maxdist= -REALmax;
  pointT *point;
  int numpart, facet_i, facet_n, notgood= 0, notverified= 0;
  setT *facets;

  trace1((qh ferr, "qh_check_bestdist: check points below nearest facet.  Facet_list f%d\n",
      qh facet_list->id));
  maxoutside= qh_maxouter();
  maxoutside += qh DISTround;
  /* one more qh.DISTround for check computation */
  trace1((qh ferr, "qh_check_bestdist: check that all points are within %2.2g of best facet\n", maxoutside));
  facets= qh_pointfacet (/*qh facet_list*/);
  if (!qh_QUICKhelp && qh PRINTprecision)
    fprintf (qh ferr, "\n\
qhull output completed.  Verifying that %d points are\n\
below %2.2g of the nearest %sfacet.\n",
	     qh_setsize(facets), maxoutside, (qh ONLYgood ?  "good " : ""));
  FOREACHfacet_i_(facets) {  /* for each point with facet assignment */
    if (facet)
      unassigned= False;
    else {
      unassigned= True;
      facet= qh facet_list;
    }
    point= qh_point(facet_i);
    if (point == qh GOODpointp)
      continue;
    bestfacet= qh_findbest (point, facet, qh_ALL, False, !qh_NOupper,
			    &dist, &isoutside, &numpart);
    /* occurs after statistics reported */
    maximize_(maxdist, dist);
    if (dist > maxoutside) {
      if (qh ONLYgood && !bestfacet->good 
	  && !((bestfacet= qh_findgooddist (point, bestfacet, &dist, &facetlist))
	       && dist > maxoutside))
	notgood++;
      else {
	waserror= True;
	fprintf(qh ferr, "qhull precision error: point p%d is outside facet f%d, distance= %6.8g maxoutside= %6.8g\n", 
		facet_i, bestfacet->id, dist, maxoutside);
	errfacet2= errfacet1;
	errfacet1= bestfacet;		    
      }
    }else if (unassigned && dist < -qh MAXcoplanar)
      notverified++;
  }
  qh_settempfree (&facets);
  if (notverified && !qh DELAUNAY && !qh_QUICKhelp && qh PRINTprecision) 
    fprintf(qh ferr, "\n%d points were well inside the hull.  If the hull contains\n\
a lens-shaped component, these points were not verified.  Use\n\
options 'Qci Tv' to verify all points.\n", notverified); 
  if (maxdist > qh outside_err) {
    fprintf( qh ferr, "qhull precision error (qh_check_bestdist): a coplanar point is %6.2g from convex hull.  The maximum value (qh.outside_err) is %6.2g\n",
              maxdist, qh outside_err);
    qh_errexit2 (qh_ERRprec, errfacet1, errfacet2);
  }else if (waserror && qh outside_err > REALmax/2)
    qh_errexit2 (qh_ERRprec, errfacet1, errfacet2);
  else if (waserror)
    ;                       /* the error was logged to qh_errlog() but does not effect the output */
  trace0((qh ferr, "qh_check_bestdist: max distance outside %2.2g\n", maxdist));
} /* check_bestdist */

/*-<a                             href="qh-c.htm#poly"
  >-------------------------------</a><a name="check_maxout">-</a>
  
  qh_check_maxout()
    updates qh.max_outside by checking all points against bestfacet
    if qh.ONLYgood, ignores !good facets

  returns:
    updates facet->maxoutside via qh_findbest()
    sets qh.maxoutdone
    if printing qh.min_vertex (qh_outerinner), 
      it is updated to the current vertices
    removes inside/coplanar points from coplanarset as needed

  notes:
    defines coplanar as min_vertex instead of MAXcoplanar 
    may not need to check near-inside points because of qh.MAXcoplanar 
      and qh.KEEPnearinside (before it was -DISTround)

  see also:
    qh_check_bestdist()

  design:
    if qh.min_vertex is needed
      for all neighbors of all vertices
        test distance from vertex to neighbor
    determine facet for each point (if any)
    for each point with an assigned facet
      find the best facet for the point and check all coplanar facets
        (updates outer planes)
    remove near-inside points from coplanar sets
*/
#ifndef qh_NOmerge
void qh_check_maxout (void) {
  facetT *facet, *bestfacet, *neighbor, **neighborp, *facetlist;
  realT dist, maxoutside, minvertex;
  pointT *point;
  int numpart, facet_i, facet_n, notgood= 0;
  setT *facets, *vertices;
  vertexT *vertex;

  trace1((qh ferr, "qh_check_maxout: check and update maxoutside for each facet.\n"));
  maxoutside= minvertex= 0;
  if (qh VERTEXneighbors 
  && (qh PRINTsummary || qh KEEPinside || qh KEEPcoplanar 
	|| qh TRACElevel || qh PRINTstatistics
	|| qh PRINTout[0] == qh_PRINTsummary || qh PRINTout[0] == qh_PRINTnone)) { 
    trace1((qh ferr, "qh_check_maxout: determine actual maxoutside and minvertex\n"));
    vertices= qh_pointvertex (/*qh facet_list*/);
    FORALLvertices {
      FOREACHneighbor_(vertex) {
        zinc_(Zdistvertex);  /* distance also computed by main loop below */
	qh_distplane (vertex->point, neighbor, &dist);
	minimize_(minvertex, dist);
	if (-dist > qh TRACEdist || dist > qh TRACEdist 
	|| neighbor == qh tracefacet || vertex == qh tracevertex)
	  fprintf (qh ferr, "qh_check_maxout: p%d (v%d) is %.2g from f%d\n",
		    qh_pointid (vertex->point), vertex->id, dist, neighbor->id);
      }
    }
    if (qh MERGING) {
      wmin_(Wminvertex, qh min_vertex);
    }
    qh min_vertex= minvertex;
    qh_settempfree (&vertices);  
  }
  facets= qh_pointfacet (/*qh facet_list*/);
  FOREACHfacet_i_(facets) {     /* for each point with facet assignment */
    if (facet) { 
      point= qh_point(facet_i);
      if (point == qh GOODpointp)
	continue;
      zinc_(Ztotcheck);
      bestfacet= qh_findbest (point, facet, qh_ALL, False, !qh_NOupper,
			         &dist, NULL, &numpart);
      zadd_(Zcheckpart, numpart);
      if (bestfacet && dist > maxoutside) {
        if (qh ONLYgood && !bestfacet->good 
        && !((bestfacet= qh_findgooddist (point, bestfacet, &dist, &facetlist))
             && dist > maxoutside))
          notgood++;
        else
	  maxoutside= dist;
      }
      if (dist > qh TRACEdist || (bestfacet && bestfacet == qh tracefacet))
	fprintf (qh ferr, "qh_check_maxout: p%d is %.2g above f%d\n",
		   qh_pointid (point), dist, bestfacet->id);
    }
  }
  qh_settempfree (&facets);
  wval_(Wmaxout)= maxoutside - qh max_outside;
  wmax_(Wmaxoutside, qh max_outside);
  qh max_outside= maxoutside;
  qh_nearcoplanar (/*qh.facet_list*/);
  qh maxoutdone= True;
  trace1((qh ferr, "qh_check_maxout: maxoutside %2.2g, min_vertex %2.2g, outside of not good %d\n",
       maxoutside, qh min_vertex, notgood));
} /* check_maxout */
#else /* qh_NOmerge */
void qh_check_maxout (void) {
}
#endif

/*-<a                             href="qh-c.htm#poly"
  >-------------------------------</a><a name="check_output">-</a>
  
  qh_check_output()
    performs the checks at the end of qhull algorithm
*/
void qh_check_output (void) {
  int i;

  if (qh STOPcone)
    return;
  if (qh VERIFYoutput | qh IStracing | qh CHECKfrequently) {
    qh_checkpolygon (qh facet_list);
    qh_checkflipped_all (qh facet_list);
    qh_checkconvex (qh facet_list, qh_ALGORITHMfault);
  }else if (!qh MERGING && qh_newstats (qhstat precision, &i)) {
    qh_checkflipped_all (qh facet_list);
    qh_checkconvex (qh facet_list, qh_ALGORITHMfault);
  }
} /* check_output */



/*-<a                             href="qh-c.htm#poly"
  >-------------------------------</a><a name="check_point">-</a>
  
  qh_check_point( point, facet, maxoutside, maxdist, errfacet1, errfacet2 )
    check that point is less than maxoutside from facet
*/
void qh_check_point (pointT *point, facetT *facet, realT *maxoutside, realT *maxdist, facetT **errfacet1, facetT **errfacet2) {
  realT dist;

  /* occurs after statistics reported */
  qh_distplane(point, facet, &dist);
  if (dist > *maxoutside) {
    *errfacet2= *errfacet1;
    *errfacet1= facet;
    fprintf(qh ferr, "qhull precision error: point p%d is outside facet f%d, distance= %6.8g maxoutside= %6.8g\n", 
	      qh_pointid(point), facet->id, dist, *maxoutside);
  }
  maximize_(*maxdist, dist);
} /* qh_check_point */


/*-<a                             href="qh-c.htm#poly"
  >-------------------------------</a><a name="check_points">-</a>
  
  qh_check_points()
    checks that all points are inside all facets

  notes:
    uses qh_findbest if lots of points
    ignores flipped facets
    maxoutside includes 2 qh.DISTrounds
      one qh.DISTround for the computed distances in qh_check_points
    qh_printafacet and qh_printsummary needs only one qh.DISTround
    the computation for qh.VERIFYdirect does not account for qh.other_points

  design:
    if many points
      use qh_check_bestdist()
    else
      for all facets
        for all points
          check that point is inside facet
*/
void qh_check_points (void) {
  facetT *facet, *errfacet1= NULL, *errfacet2= NULL;
  realT total, maxoutside, maxdist= -REALmax;
  pointT *point, **pointp, *pointtemp;
  boolT testouter;

  maxoutside= qh_maxouter();
  maxoutside += qh DISTround;
  /* one more qh.DISTround for check computation */
  trace1((qh ferr, "qh_check_points: check all points below %2.2g of all facet planes\n",
	  maxoutside));
  if (qh num_good)   /* miss counts other_points and !good facets */
     total= (float) qh num_good * qh num_points;
  else
     total= (float) qh num_facets * qh num_points;
  if (total >= qh_VERIFYdirect && !qh maxoutdone) {
    if (!qh_QUICKhelp && qh SKIPcheckmax && qh MERGING)
      fprintf (qh ferr, "\n\
qhull input warning: merging without checking outer planes ('Q5').\n\
Verify may report that a point is outside of a facet.\n");
    qh_check_bestdist();
  }else {
    if (qh_MAXoutside && qh maxoutdone)
      testouter= True;
    else
      testouter= False;
    if (!qh_QUICKhelp) {
      if (qh MERGEexact || qh SKIPcheckmax || qh NOnearinside)
	fprintf (qh ferr, "\n\
qhull input warning: exact merge ('Qx'), no outer plane check ('Q5'), or\n\
no processing of near-inside points ('Q8').  Verify may report that a point\n\
is outside of a facet.\n");
    }
    if (qh PRINTprecision) {
      if (testouter)
	fprintf (qh ferr, "\n\
Output completed.  Verifying that all points are below outer planes of\n\
all %sfacets.  Will make %2.0f distance computations.\n", 
	      (qh ONLYgood ?  "good " : ""), total);
      else
	fprintf (qh ferr, "\n\
Output completed.  Verifying that all points are below %2.2g of\n\
all %sfacets.  Will make %2.0f distance computations.\n", 
	      maxoutside, (qh ONLYgood ?  "good " : ""), total);
    }
    FORALLfacets {
      if (!facet->good && qh ONLYgood)
        continue;
      if (facet->flipped)
        continue;
      if (testouter) {
#if qh_MAXoutside
	maxoutside= facet->maxoutside + 2* qh DISTround;
	/* one DISTround to actual point and another to computed point */
#endif
      }
      FORALLpoints {
	if (point != qh GOODpointp)
	  qh_check_point (point, facet, &maxoutside, &maxdist, &errfacet1, &errfacet2);
      }
      FOREACHpoint_(qh other_points) {
	if (point != qh GOODpointp)
	  qh_check_point (point, facet, &maxoutside, &maxdist, &errfacet1, &errfacet2);
      }
    }
    if (maxdist > qh outside_err) {
      fprintf( qh ferr, "qhull precision error (qh_check_points): a coplanar point is %6.2g from convex hull.  The maximum value (qh.outside_err) is %6.2g\n",
                maxdist, qh outside_err );
      qh_errexit2( qh_ERRprec, errfacet1, errfacet2 );
    }else if (errfacet1 && qh outside_err > REALmax/2)
        qh_errexit2( qh_ERRprec, errfacet1, errfacet2 );
    else if (errfacet1)
        ;  /* the error was logged to qh.ferr but does not effect the output */
    trace0((qh ferr, "qh_check_points: max distance outside %2.2g\n", maxdist));
  }
} /* check_points */


/*-<a                             href="qh-c.htm#poly"
  >-------------------------------</a><a name="checkconvex">-</a>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美体内she精高潮| 亚洲理论在线观看| 亚洲乱码精品一二三四区日韩在线| 亚洲1区2区3区4区| www.欧美精品一二区| 日韩亚洲欧美综合| 亚洲精品国产一区二区三区四区在线| 日本不卡一区二区| 欧美性色欧美a在线播放| 中文子幕无线码一区tr| 精品影视av免费| 在线观看日产精品| 亚洲欧美激情在线| 成人网页在线观看| 国产日韩欧美不卡在线| 久久www免费人成看片高清| 欧美吞精做爰啪啪高潮| 亚洲男人天堂一区| 91在线视频播放地址| 中文字幕欧美区| 福利一区福利二区| 国产欧美日韩麻豆91| 韩国v欧美v亚洲v日本v| 精品av久久707| 蜜臀av性久久久久蜜臀av麻豆 | 欧美日韩免费电影| 樱桃国产成人精品视频| av中文字幕在线不卡| 中文字幕中文字幕在线一区| 国产精选一区二区三区| 国产日韩欧美激情| 成人在线视频一区| 亚洲视频在线一区二区| 91一区二区三区在线播放| 亚洲色图在线看| 在线精品视频一区二区三四| 亚洲最新视频在线观看| 欧美日韩精品高清| 奇米一区二区三区av| 欧美变态tickle挠乳网站| 毛片不卡一区二区| 国产亚洲欧美日韩在线一区| 成人网在线播放| 亚洲人成网站影音先锋播放| 色综合天天性综合| 婷婷国产在线综合| 精品少妇一区二区三区视频免付费 | 国产精品影视在线| 国产精品网站在线播放| 日本道色综合久久| 日韩精品电影在线| 久久久久99精品国产片| 波多野结衣精品在线| 一区二区三区中文在线观看| 欧美午夜精品一区二区蜜桃| 日韩不卡一二三区| 日本一区二区在线不卡| 色呦呦一区二区三区| 日本网站在线观看一区二区三区 | 国产一二三精品| 最新久久zyz资源站| 欧美怡红院视频| 韩国欧美国产1区| 亚洲欧美另类久久久精品| 欧美一级淫片007| 不卡电影一区二区三区| 蜜桃传媒麻豆第一区在线观看| 国产女人水真多18毛片18精品视频 | 精品美女在线播放| 91香蕉视频污| 国精产品一区一区三区mba视频| 中文字幕在线一区免费| 欧美一区二区三区公司| 91浏览器入口在线观看| 久久66热偷产精品| 亚洲影院久久精品| 国产人妖乱国产精品人妖| 7777精品伊人久久久大香线蕉| 国产精品一色哟哟哟| 亚洲国产另类av| 中文字幕一区二区三区四区不卡 | 一区在线中文字幕| 日韩欧美激情在线| 欧美午夜精品一区二区蜜桃| 成人福利在线看| 极品少妇xxxx偷拍精品少妇| 午夜亚洲福利老司机| 亚洲精品一二三四区| 日本一区二区免费在线| 日韩精品一区二区三区四区| 欧美性受极品xxxx喷水| 99re这里都是精品| 成人亚洲一区二区一| 精品一区二区三区视频在线观看 | 精品国产乱码久久久久久牛牛| 欧美在线观看视频一区二区| 成人午夜视频免费看| 国产精品18久久久久久久久久久久| 亚洲成人第一页| 亚洲一二三级电影| 一区av在线播放| 亚洲欧美成aⅴ人在线观看| 国产嫩草影院久久久久| 精品免费99久久| 日韩欧美aaaaaa| 欧美一级高清大全免费观看| 欧美日韩黄色影视| 欧美乱妇一区二区三区不卡视频| 91捆绑美女网站| 色999日韩国产欧美一区二区| 国产精品888| 成人免费视频视频在线观看免费| 国内成人免费视频| 国产风韵犹存在线视精品| 开心九九激情九九欧美日韩精美视频电影 | 免费观看在线色综合| 蜜臀久久久久久久| 久久91精品久久久久久秒播| 韩日av一区二区| 国产高清久久久久| 99九九99九九九视频精品| 99久久夜色精品国产网站| 91蜜桃视频在线| 欧美色图免费看| 欧美猛男男办公室激情| 日韩一级精品视频在线观看| 亚洲精品一线二线三线| 国产欧美日韩不卡| 亚洲欧美国产77777| 日韩专区欧美专区| 国产另类ts人妖一区二区| 成年人午夜久久久| 欧美男男青年gay1069videost| 日韩欧美一二区| 国产欧美视频一区二区| 一区二区三区在线观看欧美| 亚洲bt欧美bt精品| 国模无码大尺度一区二区三区| 国产精品538一区二区在线| av资源站一区| 91麻豆精品国产91久久久久| 亚洲精品一区二区三区精华液| 久久久一区二区| 亚洲在线成人精品| 国产成人亚洲综合a∨婷婷图片| 一本久久精品一区二区| 日韩一区二区精品在线观看| 国产精品第四页| 日韩高清中文字幕一区| 成人免费毛片app| 欧美丰满少妇xxxbbb| 久久青草国产手机看片福利盒子| 亚洲精品亚洲人成人网 | 久久综合九色综合97_久久久| 亚洲欧洲无码一区二区三区| 亚瑟在线精品视频| 成人福利视频在线看| 91麻豆精品国产| 中文字幕 久热精品 视频在线 | 亚洲国产精品影院| 成人性生交大片免费看在线播放 | 这里只有精品视频在线观看| 国产三级精品视频| 美女久久久精品| 欧美中文字幕亚洲一区二区va在线 | 国产一区中文字幕| 欧美人成免费网站| 亚洲欧洲一区二区在线播放| 蜜桃av一区二区| 91国产精品成人| 国产精品久久久久国产精品日日| 日韩国产精品久久| 欧美亚洲精品一区| 亚洲欧美偷拍三级| 成人亚洲精品久久久久软件| 26uuu精品一区二区| 无吗不卡中文字幕| 欧美在线短视频| 亚洲欧美激情视频在线观看一区二区三区 | 久久久久久久网| 麻豆一区二区在线| 欧美男女性生活在线直播观看| 樱花草国产18久久久久| 99精品国产热久久91蜜凸| 国产亚洲精品资源在线26u| 久久成人18免费观看| 欧美不卡一区二区三区四区| 午夜电影一区二区| 欧美性色黄大片| 亚洲国产成人av好男人在线观看| 91麻豆.com| 亚洲成人自拍偷拍| 欧美日韩国产精品成人| 午夜国产精品一区| 日韩一区二区影院| 久久99这里只有精品| 日韩欧美色电影| 国内精品伊人久久久久av影院 | 国产成人av一区二区三区在线观看| 欧美精品一区二区在线观看|