/// <summary> Translates the hyperbolic tree by the given vector. /// </summary> /// <param name="zs">The first coordinates.</param> /// <param name="ze">The second coordinates.</param> public void Translate(EuclidianVector zs, EuclidianVector ze) { EuclidianVector __zo = new EuclidianVector(_rootNodeView.OldCoordinates); __zo.X = -__zo.X; __zo.Y = -__zo.Y; EuclidianVector __zs2 = new EuclidianVector(zs); __zs2.Translate(__zo); EuclidianVector __t = new EuclidianVector(); double __de = ze.D2(); double __ds = __zs2.D2(); double __dd = 1.0 - __de * __ds; __t.X = (ze.X * (1.0 - __ds) - __zs2.X * (1.0 - __de)) / __dd; __t.Y = (ze.Y * (1.0 - __ds) - __zs2.Y * (1.0 - __de)) / __dd; if (__t.IsValid) { HyperbolicTransformation __to = new HyperbolicTransformation(); __to.Composition(__zo, __t); _rootNodeView.Transform(__to); _view.Repaint(); } }