资源简介
欢迎大家交流,资源共享,很高兴使用这个平台,这个程序已经运行测试,无错误,欢迎使用
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Display;
using ESRI.ArcGIS.Geometry;
using ESRI.ArcGIS.Geodatabase;
namespace drawtest
{
public partial class Form1 : Form
{
public struct Vertex
{
public double x;
public double y;
public int ID;
}
public struct Triangle
{
public int V1Index;
public int V2Index;
public int V3Index;
}
public static int maxVertex = 300;
public static int maxTiangle = 500;
Vertex[] Vertices = new Vertex[maxVertex];
Triangle[] TinTriangles = new Triangle[maxTiangle];
public int[] edges = new int[2 maxTiangle * 3];
public Form1()
{
InitializeComponent();
}
private bool InCircle(float xp float yp float x1 float y1 float x2 float y2 float x3 float y3 double xc double yc double r)
{
double eps m1 m2 mx1 mx2 my1 my2 dx dy rsqr drsqr;
eps = 0.00000001;
if (Math.Abs(y1 - y2) < eps && Math.Abs(y2 - y3) < eps)
{
MessageBox.Show(“INCIRCUM - F - Points are coincident !!“);
return false;
}
if (Math.Abs(y2 - y1) < eps)
{
m2 = (-(Convert.ToDouble(x3) - Convert.ToDouble(x2)) / (Convert.ToDouble(y3) - Convert.ToDouble(y2)));
mx2 = Convert.ToDouble((x2 + x3) / 2.0);
my2 = Convert.ToDouble((y2 + y3) / 2.0);
xc = Convert.ToDouble((x2 + x1) / 2.0);
yc = Convert.ToDouble(m2 * (xc - mx2) + my2);
}
else if (Math.Abs(y3 - y2) < eps)
{
m1 = (-(Convert.ToDouble(x2) - Convert.ToDouble(x1)) / (Convert.ToDouble(y2) - Convert.ToDouble(y1)));
mx1 = Convert.ToDouble((x1 + x2) / 2.0);
my1 = Convert.ToDouble((y1 + y2) / 2.0);
xc = Convert.ToDouble((x3 + x2) / 2.0);
yc = Convert.ToDouble(m1 * (xc - mx1) + my1);
}
else
{
m1 = (-(Convert.ToDouble(x2) - Convert.ToDouble(x1)) / (Convert.ToDouble(y2) - Convert.ToDouble(y1)));
m2 = (-(Convert.ToDouble(x3) - Convert.ToDouble(x2)) / (Convert.ToDouble(y3) - Convert.ToDouble(y2)));
mx1 = Convert.ToDouble((x1 + x2) / 2.0);
mx2 = Convert.ToDouble((x2 + x3) / 2.0);
my1 = Convert.ToDouble((y1 + y2) / 2.0);
my2 = Convert.ToDouble((y2 + y3) / 2.0);
xc = Convert.ToDouble((m1 * mx1 - m2 * mx2 + my2 - my1) / (m1 - m2));
yc = Convert.ToDouble(m1 * (xc - mx1) + my1);
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 28672 2010-04-20 22:04 drawtest\drawtest\bin\Debug\drawtest.exe
文件 36352 2010-04-20 22:04 drawtest\drawtest\bin\Debug\drawtest.pdb
文件 5632 2005-11-11 22:25 drawtest\drawtest\bin\Debug\drawtest.vshost.exe
文件 4676 2010-04-19 14:32 drawtest\drawtest\drawtest.csproj
文件 14012 2010-04-20 22:17 drawtest\drawtest\Form1.cs
文件 4787 2010-04-20 16:20 drawtest\drawtest\Form1.Designer.cs
文件 10096 2010-04-20 16:20 drawtest\drawtest\Form1.resx
文件 842 2010-04-20 16:20 drawtest\drawtest\obj\Debug\drawtest.csproj.GenerateResource.Cache
文件 28672 2010-04-20 22:04 drawtest\drawtest\obj\Debug\drawtest.exe
文件 3064 2010-04-20 16:20 drawtest\drawtest\obj\Debug\drawtest.Form1.resources
文件 36352 2010-04-20 22:04 drawtest\drawtest\obj\Debug\drawtest.pdb
文件 180 2010-04-19 14:32 drawtest\drawtest\obj\Debug\drawtest.Properties.Resources.resources
文件 112408 2010-04-19 14:32 drawtest\drawtest\obj\Debug\ResolveAssemblyReference.cache
文件 4608 2010-04-20 20:24 drawtest\drawtest\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll
文件 2062 2010-04-20 22:10 drawtest\drawtest\obj\drawtest.csproj.FileListAbsolute.txt
文件 467 2010-04-19 13:42 drawtest\drawtest\Program.cs
文件 1188 2010-04-19 13:42 drawtest\drawtest\Properties\AssemblyInfo.cs
文件 2840 2010-04-20 20:24 drawtest\drawtest\Properties\Resources.Designer.cs
文件 5612 2010-04-19 13:42 drawtest\drawtest\Properties\Resources.resx
文件 1106 2010-04-20 20:24 drawtest\drawtest\Properties\Settings.Designer.cs
文件 249 2010-04-19 13:42 drawtest\drawtest\Properties\Settings.settings
文件 913 2010-04-19 13:42 drawtest\drawtest.sln
..A..H. 36352 2010-04-20 22:17 drawtest\drawtest.suo
目录 0 2010-04-20 21:26 drawtest\drawtest\obj\Debug\TempPE
目录 0 2010-04-20 21:26 drawtest\drawtest\bin\Debug
目录 0 2010-04-20 22:04 drawtest\drawtest\obj\Debug
目录 0 2010-04-20 21:26 drawtest\drawtest\bin
目录 0 2010-04-20 21:26 drawtest\drawtest\obj
目录 0 2010-04-20 21:26 drawtest\drawtest\Properties
目录 0 2010-04-20 22:17 drawtest\drawtest
............此处省略4个文件信息
评论
共有 条评论