Example #1
0
        /// <summary>
        /// assigns the PC Axes to both pointsSource and mypointCloudSourceCentered
        /// </summary>
        /// <param name="pointsSource"></param>
        /// <param name="mypointCloudSourceCentered"></param>
        private void AssignPCAxes(PointCloudVertices pointsSource, PointCloudVertices mypointCloudSourceCentered)
        {
            pointsSource.CentroidVector = Centroid;
            pointsSource.PCAAxes        = new PointCloudVertices();
            List <Vector3d> vectorList = PointCloudVertices.ToVectors(mypointCloudSourceCentered);

            for (int i = 0; i < 3; i++)
            {
                Vector3d v = VT.ExtractColumn(i);
                v = v * Convert.ToSingle(Math.Sqrt(EV[i]));
                Vertex ve = new Vertex(i, v);
                pointsSource.PCAAxes.Add(ve);
            }

            mypointCloudSourceCentered.PCAAxes = pointsSource.PCAAxes;
        }