Example #1
0
        /// <summary>
        /// Transform this node by the given transformation.
        /// </summary>
        /// <param name="t">The transformation.</param>
        public void Transform(HyperbolicTransformation t)
        {
            EuclidianVector __z = new EuclidianVector(this);

            Multiply(t.O);
            _x += t.P._x;
            _y += t.P._y;

            EuclidianVector __d = new EuclidianVector(t.P);

            __d._y = -__d._y;
            __d.Multiply(__z);
            __d.Multiply(t.O);
            __d._x += 1;

            this.Divide(__d);
        }
        /// <summary> Compose the 2 given vectors translations into one given transformation.
        /// </summary>
        /// <param name="first"></param>
        /// <param name="second"></param>
        public void Composition(EuclidianVector v1, EuclidianVector v2)
        {
            _p.X = v1.X + v2.X;
              _p.Y = v1.Y + v2.Y;

              EuclidianVector __d = new EuclidianVector(v2);
              __d.Y = -__d.Y;
              __d.Multiply(v1);
              __d.X += 1;
              _p.Divide(__d);

              _o.X = v1.X;
              _o.Y = -v1.Y;
              _o.Multiply(v2);
              _o.X += 1;
              _o.Divide(__d);
        }
        /// <summary> Compose the 2 given vectors translations into one given transformation.
        /// </summary>
        /// <param name="first"></param>
        /// <param name="second"></param>
        public void Composition(EuclidianVector v1, EuclidianVector v2)
        {
            _p.X = v1.X + v2.X;
            _p.Y = v1.Y + v2.Y;

            EuclidianVector __d = new EuclidianVector(v2);

            __d.Y = -__d.Y;
            __d.Multiply(v1);
            __d.X += 1;
            _p.Divide(__d);

            _o.X = v1.X;
            _o.Y = -v1.Y;
            _o.Multiply(v2);
            _o.X += 1;
            _o.Divide(__d);
        }
        /// <summary>
        /// Transform this node by the given transformation.
        /// </summary>
        /// <param name="t">The transformation.</param>
        public void Transform(HyperbolicTransformation t)
        {
            EuclidianVector __z = new EuclidianVector(this);
              Multiply(t.O);
              _x += t.P._x;
              _y += t.P._y;

              EuclidianVector __d = new EuclidianVector(t.P);
              __d._y = -__d._y;
              __d.Multiply(__z);
              __d.Multiply(t.O);
              __d._x += 1;

              this.Divide(__d);
        }