資源簡介
最大內(nèi)接圓,最小外接圓的開源庫,內(nèi)涵參考論文,以及使用例程(帶數(shù)據(jù))

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Text;
using?MCCLib;
using?MICLib;
using?System.IO;
using?System.Collections;
using?System.Windows;
namespace?DllTest
{
????class?Program
????{
????????static?void?Main(string[]?args)
????????{
????????????//StreamReader?sr?=?new?StreamReader(“1-3.ron“);
????????????StreamReader?sr?=?new?StreamReader(“1-10.ron“);
????????????//StreamReader?sr?=?new?StreamReader(“1-20.ron“);
????????????string?str?=?sr.ReadLine();
????????????int?index;
????????????ArrayList?angleList?=?new?ArrayList();
????????????ArrayList?radiusList?=?new?ArrayList();
????????????while?(str?!=?“SampleEnd“)
????????????{
????????????????index?=?str.IndexOf(““);
????????????????angleList.Add(Convert.ToDouble(str.Substring(0?index)));
????????????????radiusList.Add(Convert.ToDouble(str.Substring(index?+?1))?+?10);
????????????????str?=?sr.ReadLine();
????????????}
????????????sr.Close();
????????????double[]?angle?=?(double[])angleList.ToArray(typeof(double));
????????????double[]?radius?=?(double[])radiusList.ToArray(typeof(double));
????????????
????????????double?[]?x?=new?double[angle.Length];
????????????double?[]?y?=new?double[angle.Length];
????????????for?(int?i=0;i ????????????{
????????????????//p[i]?=new?Point();
????????????????x[i]?=Math.Cos(?angle[i]*Math.PI/180)?*radius[i];
????????????????y[i]?=Math.Sin(angle[i]*Math.PI/180)?*radius[i];
????????????}
????????????double?xc?=0;
????????????double?yc?=0;
????????????double?r?=0;
????????????//int?result?=?MCC.MCCircleFit(x?y?ref?xc?ref?yc?ref?r);
????????????int?result?=?MIC.MICircleFit(x?y?ref?xc?ref?yc?ref?r);
????????????
????????????StreamWriter?sw?=?new?StreamWriter(“output2.m“);
????????????sw.Write(“x=[“);
????????????int?j;
????????????for?(j?=?0;?j?????????????{
????????????????sw.Write(x[j].ToString()+““);
????????????}
????????????sw.WriteLine(x[j].ToString()?+?“];“);
????????????sw.Write(“y=[“);
????????????for?(j?=?0;?j?????????????{
????????????????sw.Write(y[j].ToString()?+?““);
????????????}
????????????sw.WriteLine(y[j].ToString()?+?“];“);
????????????sw.WriteLine(“xc=“?+?xc.ToString()+“;“);
????????????sw.WriteLine(“yc=“?+?yc.ToString()?+?“;“);
????????????sw.WriteLine(“r=“?+?r.ToString()?+?“;“);
????????????sw.Flush();
????????????sw.Close();
????????}
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????142973??2013-09-27?09:27??MCCLib\DllTest\bin\Debug\1-10.ron
?????文件?????143023??2013-09-27?09:32??MCCLib\DllTest\bin\Debug\1-20.ron
?????文件?????147985??2013-09-27?09:22??MCCLib\DllTest\bin\Debug\1-3.ron
?????文件???????6144??2013-10-06?19:44??MCCLib\DllTest\bin\Debug\DllTest.exe
?????文件??????13824??2013-10-06?19:44??MCCLib\DllTest\bin\Debug\DllTest.pdb
?????文件??????14328??2013-10-07?02:28??MCCLib\DllTest\bin\Debug\DllTest.vshost.exe
?????文件????????490??2009-06-11?05:14??MCCLib\DllTest\bin\Debug\DllTest.vshost.exe.manifest
?????文件???????8192??2013-10-06?19:43??MCCLib\DllTest\bin\Debug\MCCLib.dll
?????文件??????17920??2013-10-06?19:43??MCCLib\DllTest\bin\Debug\MCCLib.pdb
?????文件???????8704??2013-10-06?19:43??MCCLib\DllTest\bin\Debug\MICLib.dll
?????文件??????19968??2013-10-06?19:43??MCCLib\DllTest\bin\Debug\MICLib.pdb
?????文件?????143069??2013-10-06?15:53??MCCLib\DllTest\bin\Debug\output.m
?????文件?????142990??2013-10-08?16:34??MCCLib\DllTest\bin\Debug\output2.m
?????文件???????2987??2013-10-06?19:43??MCCLib\DllTest\DllTest.csproj
?????文件????????636??2013-10-07?02:28??MCCLib\DllTest\obj\Debug\DllTest.csproj.FileListAbsolute.txt
?????文件???????6144??2013-10-06?19:44??MCCLib\DllTest\obj\Debug\DllTest.exe
?????文件??????13824??2013-10-06?19:44??MCCLib\DllTest\obj\Debug\DllTest.pdb
?????文件???????6161??2013-10-06?19:43??MCCLib\DllTest\obj\Debug\ResolveAssemblyReference.cache
?????文件???????2476??2013-10-06?19:44??MCCLib\DllTest\Program.cs
?????文件???????1346??2013-10-05?22:28??MCCLib\DllTest\Properties\AssemblyInfo.cs
?????文件???????8192??2013-10-06?19:43??MCCLib\MCCLib\bin\Debug\MCCLib.dll
?????文件??????17920??2013-10-06?19:43??MCCLib\MCCLib\bin\Debug\MCCLib.pdb
?????文件??????14857??2013-10-06?19:42??MCCLib\MCCLib\MCC.cs
?????文件???????2604??2013-10-06?16:39??MCCLib\MCCLib\MCCLib.csproj
?????文件????????355??2013-10-06?15:08??MCCLib\MCCLib\obj\Debug\MCCLib.csproj.FileListAbsolute.txt
?????文件???????8192??2013-10-06?19:43??MCCLib\MCCLib\obj\Debug\MCCLib.dll
?????文件??????17920??2013-10-06?19:43??MCCLib\MCCLib\obj\Debug\MCCLib.pdb
?????文件???????1344??2013-10-05?22:27??MCCLib\MCCLib\Properties\AssemblyInfo.cs
?????文件???????1855??2013-10-06?17:40??MCCLib\MCCLib.sln
????..A..H.?????23040??2013-10-07?02:28??MCCLib\MCCLib.suo
............此處省略37個文件信息
評論
共有 條評論