예제 #1
0
        //离散点加密
        public static void DescretePointJM(string pathIn)
        {
            //27202 19104;27202 22947;31550 22947;31550 19104
               List <MyPt> listpt= new List<MyPt>();
               string[] line=System.IO.File.ReadAllLines(pathIn);
               for (int i = 0; i < line.Length; i++)
               {
               MyPt mypt= new MyPt();
               mypt.x = double.Parse(line[i].Split(',')[0]);
               mypt.y = double.Parse(line[i].Split(',')[1]);
               mypt.z = double.Parse(line[i].Split(',')[2]);
               listpt.Add(mypt);
               }
               for (int i = 0; i < listpt.Count; i++)
               {
               for (int j = 0; j < listpt.Count; j++)
               {
                   double x=(listpt[i].x + listpt[j].x)/2;
                   double y = (listpt[i].y + listpt[j].y)/2;
                   double z = (listpt[i].z + listpt[j].z) / 2;

               }
               }
        }
예제 #2
0
        //离散点加密
        static public void DescretePointJM(string pathIn)
        {
            //27202 19104;27202 22947;31550 22947;31550 19104
            List <MyPt> listpt = new List <MyPt>();

            string[] line = System.IO.File.ReadAllLines(pathIn);
            for (int i = 0; i < line.Length; i++)
            {
                MyPt mypt = new MyPt();
                mypt.x = double.Parse(line[i].Split(',')[0]);
                mypt.y = double.Parse(line[i].Split(',')[1]);
                mypt.z = double.Parse(line[i].Split(',')[2]);
                listpt.Add(mypt);
            }
            for (int i = 0; i < listpt.Count; i++)
            {
                for (int j = 0; j < listpt.Count; j++)
                {
                    double x = (listpt[i].x + listpt[j].x) / 2;
                    double y = (listpt[i].y + listpt[j].y) / 2;
                    double z = (listpt[i].z + listpt[j].z) / 2;
                }
            }
        }