Ejemplo n.º 1
0
        public void RotateVector(double alpha)
        {
            NIRotMatrix rotation = new NIRotMatrix(alpha);
            double      X        = this.x1;
            double      Y        = this.x2;

            this.x1 = rotation.r11 * X + rotation.r12 * Y;
            this.x2 = rotation.r21 * X + rotation.r22 * Y;
        }
Ejemplo n.º 2
0
        public static NI2dPoint line2DIntersection(NI2dPoint P, NI2dVector v, NI2dPoint Q, NI2dVector u)
        {
            NIRotMatrix rotation = new NIRotMatrix(Math.PI / 2);

            u.RotateVector(Math.PI / 2);
            NI2dVector up  = u;
            NI2dVector qp  = new NI2dVector(Q - P);
            NI2dPoint  isl = P + (((qp.DotProduct(up)) / v.DotProduct(up)) * v).ConverttoPoint();

            return(isl);
        }