Ejemplo n.º 1
0
        public void ComputeLineNormal()
        {
            double[] z = new double[] { 0, 0, 1 }, delta = new double[3];

            //parallel
            foreach (Line l in lines)
            {
                MathExtra.SubVector(l.p2, l.p1, ref delta);
                MathExtra.CrossVector(z, delta, ref l.norm);
                MathExtra.NormVector(ref l.norm);
                l.norm[2] = 0.0;
            }
        }
Ejemplo n.º 2
0
 public static double LineSize(double[] x1, double[] x2)
 {
     double[] delta = new double[3];
     MathExtra.SubVector(x1, x2, ref delta);
     return(MathExtra.LenVector(delta));
 }