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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? dt2.c

?? 是Computational Geometry in C中的原程序
?? C
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
/*This code is described in "Computational Geometry in C" (Second Edition),Chapter 5.  It is not written to be comprehensible without the explanation in that book.Input: 2n integer coordinates for the points.Output: The Delaunay triangulation, in postscript with embedded comments.Compile: gcc -o dt2 dt2.c (or simply: make)Written by Joseph O'Rourke.Last modified: July 1997Questions to orourke@cs.smith.edu.--------------------------------------------------------------------This code is Copyright 1998 by Joseph O'Rourke.  It may be freely redistributed in its entirety provided that this copyright notice is not removed.--------------------------------------------------------------------*/#include <stdio.h>#include <math.h>/*Define Boolean type */typedef	enum { FALSE, TRUE }	bool;/* Define vertex indices. */#define X   0#define Y   1#define Z   2/* Define structures for vertices, edges and faces */typedef struct tVertexStructure tsVertex;typedef tsVertex *tVertex;typedef struct tEdgeStructure tsEdge;typedef tsEdge *tEdge;typedef struct tFaceStructure tsFace;typedef tsFace *tFace;struct tVertexStructure {   int      v[3];   int	    vnum;   tEdge    duplicate;	        /* pointer to incident cone edge (or NULL) */   bool     onhull;		/* T iff point on hull. */   bool	    mark;		/* T iff point already processed. */   tVertex  next, prev;};struct tEdgeStructure {   tFace    adjface[2];   tVertex  endpts[2];   tFace    newface;            /* pointer to incident cone face. */   bool     delete;		/* T iff edge should be delete. */   tEdge    next, prev;};struct tFaceStructure {   tEdge    edge[3];   tVertex  vertex[3];   bool	    visible;	        /* T iff face visible from new point. */   bool     lower;              /* T iff on the lower hull */   tFace    next, prev;};/* Define flags */#define ONHULL   	TRUE#define REMOVED  	TRUE#define VISIBLE  	TRUE#define PROCESSED	TRUE#define SAFE            1000000         /* Range of safe coord values. *//* Global variable definitions */tVertex vertices = NULL;tEdge edges    	 = NULL;tFace faces    	 = NULL;bool debug = FALSE;bool check = FALSE;/* Function declarations */tVertex MakeNullVertex( void );void    ReadVertices( void );void    Print( void );void    SubVec( int a[3], int b[3], int c[3]);void    DoubleTriangle( void );void    ConstructHull( void );bool	AddOne( tVertex p );int     VolumeSign(tFace f, tVertex p);int 	Volumei( tFace f, tVertex p );tFace	MakeConeFace( tEdge e, tVertex p );void    MakeCcw( tFace f, tEdge e, tVertex p );tEdge   MakeNullEdge( void );tFace   MakeNullFace( void );tFace   MakeFace( tVertex v0, tVertex v1, tVertex v2, tFace f );void    CleanUp( void );void    CleanEdges( void );void    CleanFaces( void );void    CleanVertices( void );bool	Collinear( tVertex a, tVertex b, tVertex c );int	Normz( tFace f );void    CheckEuler(int V, int E, int F );void	PrintPoint( tVertex p );void    Checks( void );void	Consistency( void );void	Convexity( void );void	PrintOut( tVertex v );void	PrintVertices( void );void	PrintEdges( void );void	PrintFaces( void );void    LowerFaces( void );#include "macros.h"/*-------------------------------------------------------------------*/main( int argc, char *argv[] ){  if ( argc > 1 && argv[1][0] == '-' ) {    if( argv[1][1] ==  'd' ) {      debug = TRUE;      check = TRUE;      fprintf( stderr, "Debug and check mode\n");    }    if( argv[1][1] == 'c' ) {      check = TRUE;      fprintf( stderr, "Check mode\n");    }  }  else if ( argc > 1 && argv[1][0] != '-' ) {    printf ("Usage:  %s -d[ebug] c[heck]\n", *argv );    printf ("x y z coords of vertices from stdin\n");    exit(1);  }     ReadVertices();   DoubleTriangle();   ConstructHull();   LowerFaces();   Print();}void    LowerFaces( void ){   tFace f = faces;   /*int   z;*/   int   Flower = 0;   /* Total number of lower faces. */   do {     /*z = Normz( f );     if ( z < 0 ) {*/     if ( Normz( f ) < 0 ) {        Flower++;        f->lower = TRUE;        /*printf("z=%10d; lower face indices: %d, %d, %d\n", z, */        /*printf("lower face indices: %d, %d, %d\n",           f->vertex[0]->vnum,           f->vertex[1]->vnum,           f->vertex[2]->vnum );*/     }     else f->lower = FALSE;     f = f->next;   } while ( f != faces );   /*printf("A total of %d lower faces identified.\n", Flower);*/}/*---------------------------------------------------------------------MakeNullVertex: Makes a vertex, nulls out fields.---------------------------------------------------------------------*/tVertex	MakeNullVertex( void ){   tVertex  v;      NEW( v, tsVertex );   v->duplicate = NULL;   v->onhull = !ONHULL;   v->mark = !PROCESSED;   ADD( vertices, v );   return v;}/*---------------------------------------------------------------------ReadVertices: Reads in the vertices, and links them into a circularlist with MakeNullVertex.  There is no need for the # of vertices to bethe first line: the function looks for EOF instead.  Sets the globalvariable vertices via the ADD macro.---------------------------------------------------------------------*/void	ReadVertices( void ){   tVertex  v;   int      x, y, z;   int	    vnum = 0;   while ( scanf ("%d %d", &x, &y ) != EOF )  {      v = MakeNullVertex();      v->v[X] = x;      v->v[Y] = y;      z = x*x + y*y;      v->v[Z] = z;      v->vnum = vnum++;      if ( ( abs(x) > SAFE ) || ( abs(y) > SAFE ) || ( abs(z) > SAFE ) ) {         printf("Coordinate of vertex below might be too large: run with -c flag\n");         PrintPoint(v);      }   }}/*---------------------------------------------------------------------Print: Prints out the vertices and the faces.  Uses the vnum indices corresponding to the order in which the vertices were input.Output is in PostScript format.---------------------------------------------------------------------*/void	Print( void ){   /* Pointers to vertices, edges, faces. */   tVertex  v;   tEdge    e;   tFace    f;   int xmin, ymin, xmax, ymax;   int a[3], b[3];  /* used to compute normal vector */   /* Counters for Euler's formula. */   int 	V = 0, E = 0 , F = 0;   /* Note: lowercase==pointer, uppercase==counter. */   /*-- find X min & max --*/   v = vertices;   xmin = xmax = v->v[X];   do {      if( v->v[X] > xmax ) xmax = v->v[X];      else	 if( v->v[X] < xmin ) xmin = v->v[X];      v = v->next;   } while ( v != vertices );	   /*-- find Y min & max --*/   v = vertices;   ymin = ymax = v->v[Y];   do {      if( v->v[Y] > ymax ) ymax = v->v[Y];      else	 if( v->v[Y] < ymin ) ymin = v->v[Y];      v = v->next;   } while ( v != vertices );	   /* PostScript header */   printf("%%!PS\n");   printf("%%%%BoundingBox: %d %d %d %d\n", 	  xmin, ymin, xmax, ymax);   printf(".00 .00 setlinewidth\n");   printf("%d %d translate\n", -xmin+100, -ymin+100 );   /* The +72 shifts the figure one inch from the lower left corner */   /* Vertices. */   v = vertices;   do {                                       if( v->mark ) V++;                 v = v->next;   } while ( v != vertices );   printf("\n%%%% Vertices:\tV = %d\n", V);   printf("%%%% index:\tx\ty\tz\n");   do {                                       printf( "%%%% %5d:\t%d\t%d\t%d\n", 	     v->vnum, v->v[X], v->v[Y], v->v[Z] );      printf("newpath\n");      printf("%d\t%d 2 0 360 arc\n", v->v[X], v->v[Y]);      printf("closepath stroke\n\n");      v = v->next;   } while ( v != vertices );	   /* Faces. */   /* visible faces are printed as PS output */   f = faces;   do {      ++F;                                    f  = f ->next;   } while ( f  != faces );   printf("\n%%%% Faces:\tF = %d\n", F );   printf("%%%% Visible faces only: \n");   do {                 /* Print face only if it is lower */      if ( f-> lower )      {	 printf("%%%% vnums:  %d  %d  %d\n", 		f->vertex[0]->vnum, 		f->vertex[1]->vnum, 		f->vertex[2]->vnum);	 printf("newpath\n");	 printf("%d\t%d\tmoveto\n", 		f->vertex[0]->v[X], f->vertex[0]->v[Y] );	 printf("%d\t%d\tlineto\n", 		f->vertex[1]->v[X], f->vertex[1]->v[Y] );	 printf("%d\t%d\tlineto\n", 		f->vertex[2]->v[X], f->vertex[2]->v[Y] );	 printf("closepath stroke\n\n");      }      f = f->next;   } while ( f != faces );   /* prints a list of all faces */   printf("%%%% List of all faces: \n");   printf("%%%%\tv0\tv1\tv2\t(vertex indices)\n");   do {      printf("%%%%\t%d\t%d\t%d\n",	     f->vertex[0]->vnum,	     f->vertex[1]->vnum,	     f->vertex[2]->vnum );      f = f->next;   } while ( f != faces );	   /* Edges. */	   e = edges;   do {      E++;      e = e->next;   } while ( e != edges );   printf("\n%%%% Edges:\tE = %d\n", E );   /* Edges not printed out (but easily added). */   printf("\nshowpage\n\n");   printf("%%EOF\n");   check = TRUE;   CheckEuler( V, E, F );}/*---------------------------------------------------------------------SubVec:  Computes a - b and puts it into c.---------------------------------------------------------------------*/void    SubVec( int a[3], int b[3], int c[3]){   int  i;   for( i=0; i < 2; i++ )      c[i] = a[i] - b[i];}/*--------------------------------------------------------------------- DoubleTriangle builds the initial double triangle.  It first finds 3  noncollinear points and makes two faces out of them, in opposite order. It then finds a fourth point that is not coplanar with that face.  The   vertices are stored in the face structure in counterclockwise order so  that the volume between the face and the point is negative. Lastly, the 3 newfaces to the fourth point are constructed and the data structures are cleaned up. ---------------------------------------------------------------------*/void    DoubleTriangle( void ){   tVertex  v0, v1, v2, v3, t;   tFace    f0, f1 = NULL;   tEdge    e0, e1, e2, s;   int      vol;		   /* Find 3 non-Collinear points. */   v0 = vertices;   while ( Collinear( v0, v0->next, v0->next->next ) )      if ( ( v0 = v0->next ) == vertices )         printf("DoubleTriangle:  All points are Collinear!\n"), exit(0);   v1 = v0->next;   v2 = v1->next;	   /* Mark the vertices as processed. */   v0->mark = PROCESSED;   v1->mark = PROCESSED;   v2->mark = PROCESSED;      /* Create the two "twin" faces. */   f0 = MakeFace( v0, v1, v2, f1 );   f1 = MakeFace( v2, v1, v0, f0 );   /* Link adjacent face fields. */   f0->edge[0]->adjface[1] = f1;   f0->edge[1]->adjface[1] = f1;   f0->edge[2]->adjface[1] = f1;   f1->edge[0]->adjface[1] = f0;   f1->edge[1]->adjface[1] = f0;

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲同性同志一二三专区| 久久精品人人做人人爽97| bt7086福利一区国产| 成人国产精品免费网站| 成人动漫精品一区二区| 97精品超碰一区二区三区| 99v久久综合狠狠综合久久| 99久久精品情趣| 一本一本大道香蕉久在线精品| 成人福利视频在线| 日本道免费精品一区二区三区| 色天天综合久久久久综合片| 欧美伊人久久久久久午夜久久久久| 一本一本大道香蕉久在线精品 | 韩国三级电影一区二区| 国产在线精品一区在线观看麻豆| 精品一区二区在线视频| 国产精品资源在线| av毛片久久久久**hd| 色婷婷精品大视频在线蜜桃视频| 欧美中文字幕一二三区视频| 6080国产精品一区二区| 久久香蕉国产线看观看99| 国产精品久久久久久久久晋中| 亚洲色图欧美在线| 日韩福利电影在线观看| 国产一区二区精品久久| 99riav一区二区三区| 在线观看91精品国产入口| 日韩一区二区三区在线| 国产精品丝袜久久久久久app| 青青草一区二区三区| 国产91丝袜在线播放0| 91成人免费在线视频| 日韩欧美一区二区在线视频| 国产精品嫩草99a| 午夜av一区二区| 成人国产视频在线观看 | 亚洲成人先锋电影| 久久99久久99| 欧美午夜理伦三级在线观看| 日韩一区二区精品葵司在线| 国产精品福利一区| 久久激情五月婷婷| 欧美色大人视频| 国产欧美精品一区二区三区四区| 亚洲激情图片一区| 成人app软件下载大全免费| 91精品国产全国免费观看| 欧美经典一区二区三区| 奇米一区二区三区| 色婷婷狠狠综合| 国产精品另类一区| 韩国欧美国产一区| 日韩一区二区视频| 午夜久久久久久久久| 91影视在线播放| 国产婷婷色一区二区三区四区| 日本中文字幕一区| 欧美日韩成人激情| 一区二区成人在线视频| 成人av网在线| 国产精品你懂的| 国产精品一区二区视频| 91精品在线免费| 午夜电影网一区| 欧美人妇做爰xxxⅹ性高电影| 亚洲日穴在线视频| 色婷婷综合久久久中文字幕| 国产精品久久久久aaaa| 国产a区久久久| 国产欧美日韩综合精品一区二区| 精品一区二区三区av| 欧美大度的电影原声| 另类小说综合欧美亚洲| 日韩亚洲欧美综合| 精久久久久久久久久久| 精品国产电影一区二区| 韩国一区二区三区| 久久精品水蜜桃av综合天堂| 国产乱码精品一区二区三区五月婷| 欧美成人一区二区| 国产一区二区免费看| 欧美精品一区二| 国产成人在线视频网址| 国产日韩影视精品| 91在线无精精品入口| 一区二区三区免费网站| 欧美理论电影在线| 国产在线播放一区三区四| 久久久亚洲精品石原莉奈| 成人综合在线视频| 一区二区三区在线高清| 欧美视频一区二区三区在线观看| 亚洲一区日韩精品中文字幕| 欧美日韩1234| 国产一区二区视频在线播放| 国产精品久久久久一区二区三区| 97精品国产露脸对白| 天天综合天天做天天综合| 精品国产乱码久久久久久闺蜜| 国产一区二区三区av电影 | 欧美在线高清视频| 日韩av成人高清| 国产日韩欧美一区二区三区乱码| 成人三级伦理片| 日本在线播放一区二区三区| 久久婷婷成人综合色| 在线欧美小视频| 韩国女主播一区二区三区| 亚洲乱码国产乱码精品精的特点 | 久久夜色精品国产欧美乱极品| 粉嫩aⅴ一区二区三区四区 | 欧美一级理论片| 成人美女视频在线观看18| 亚洲高清久久久| 欧美国产视频在线| 911精品产国品一二三产区| 成人亚洲一区二区一| 天堂午夜影视日韩欧美一区二区| 国产亚洲欧美在线| 正在播放一区二区| 91麻豆国产精品久久| 加勒比av一区二区| 亚洲国产aⅴ天堂久久| 国产日产欧美一区| 日韩三级精品电影久久久 | 亚洲地区一二三色| 国产精品人成在线观看免费| 精品剧情在线观看| 欧美视频一区二区| 91首页免费视频| 国产91精品一区二区| 久久se精品一区精品二区| 亚洲国产欧美在线| 自拍偷在线精品自拍偷无码专区| 久久亚洲一级片| 日韩免费一区二区| 欧美一区二区视频网站| 欧美三级视频在线| 在线一区二区三区| 91丨九色丨蝌蚪富婆spa| 成人激情免费网站| 国产成人免费视频一区| 国内偷窥港台综合视频在线播放| 日韩精品免费视频人成| 亚洲一区中文日韩| 亚洲一区二区三区四区五区中文 | 69堂精品视频| 欧美性色综合网| 欧美中文字幕一二三区视频| 色先锋aa成人| 在线观看av一区| 精品视频999| 欧美精品第1页| 日韩一级片在线观看| 日韩欧美国产电影| 久久综合九色综合欧美98| 精品久久久网站| 国产色产综合色产在线视频| 国产日韩欧美综合在线| 国产精品美女久久久久久久久久久 | 国产一区二区在线免费观看| 激情综合五月天| 国产电影一区在线| 成a人片亚洲日本久久| 91在线播放网址| 欧美日韩精品一区二区三区四区| 欧美老年两性高潮| 精品国产免费一区二区三区香蕉| 欧美精品一区二区三区久久久| 久久婷婷色综合| 亚洲视频在线观看一区| 偷窥国产亚洲免费视频| 久久99精品国产.久久久久| 国产电影精品久久禁18| 色噜噜夜夜夜综合网| 91精品免费观看| 国产清纯美女被跳蛋高潮一区二区久久w | 亚洲男人的天堂一区二区| 一区二区三区日本| 老司机免费视频一区二区三区| 韩国成人福利片在线播放| 成人免费视频网站在线观看| 一本到三区不卡视频| 91精品婷婷国产综合久久性色 | 国产精品一区二区久久精品爱涩 | 日本美女一区二区| 国产成人免费在线视频| 色婷婷国产精品| 2021久久国产精品不只是精品| 国产精品护士白丝一区av| 同产精品九九九| 白白色 亚洲乱淫| 日韩欧美在线123| 亚洲色欲色欲www在线观看| 久久精品国产亚洲a| 99国产欧美另类久久久精品 | 美脚の诱脚舐め脚责91| 99re热视频这里只精品|