public override Point Fun(Point p)
        {
            //            var r = VariationHelper.R(p);
            //            var theta = VariationHelper.Theta(p);
            //            return new Point(
            //                Math.Sin(theta) / r,
            //                r * Math.Cos(theta));

            var preSqrt = VariationHelper.PreSqrt(p);

            return(new Point(W * VariationHelper.PreSinA(p, preSqrt) / preSqrt,
                             W * VariationHelper.PreCosA(p, preSqrt) * preSqrt));
        }
        public override Point Fun(Point p)
        {
            //            var r = VariationHelper.R(p);
            //            var theta = VariationHelper.Theta(p);
            //            return new Point(
            //                W * Math.Sin(theta) * Math.Cos(r),
            //                W * Math.Cos(theta) * Math.Sin(r));
            var preSqrt = VariationHelper.PreSqrt(p);
            var preSinA = VariationHelper.PreSinA(p, preSqrt); //xyzPoint.getPrecalcSinA();
            var preCosA = VariationHelper.PreCosA(p, preSqrt); //xyzPoint.getPrecalcCosA();
            var sin     = Math.Sin(preSqrt);

            return(new Point(W * preSinA * Math.Cos(preSqrt), W * preCosA * sin));
        }
Exemple #3
0
        public override Point Fun(Point p)
        {
            //            var theta = VariationHelper.Theta(p);
            //            var sin = Math.Sin(theta);
            //            var q = W * Math.Pow(VariationHelper.R(p), sin);
            //            return new Point(q * Math.Cos(theta), q * sin);

            var preSqrt = VariationHelper.PreSqrt(p);
            var preSinA = VariationHelper.PreSinA(p, preSqrt);
            var preCosA = VariationHelper.PreCosA(p, preSqrt);

            var n2 = W * Math.Pow(preSqrt, preSinA);

            return(new Point(n2 * preCosA, n2 * preSinA));
        }
        public override Point Fun(Point p)
        {
            //            var x = p.X;
            //            var y = p.Y;
            //            var q = 1.0 / VariationHelper.R(p);
            //            return new Point(
            //                q * (x - y) * (x + y),
            //                q * (2.0 * x * y));

            var preSqrt = VariationHelper.PreSqrt(p);
            var preSinA = VariationHelper.PreSinA(p, preSqrt);
            var preCosA = VariationHelper.PreCosA(p, preSqrt);

            return(new Point(W * (preSinA * p.X - preCosA * p.Y),
                             W * (preCosA * p.X + preSinA * p.Y)));
        }
        public override Point Fun(Point p)
        {
            //            var r = VariationHelper.R(p);
            //            var theta = VariationHelper.Theta(p);
            //            var c2 = C * C;
            //            var q = (r + c2) % (2.0 * c2) - c2 + r * (1.0 - c2);
            //            var dx = q * Math.Cos(theta);
            //            var dy = q * Math.Sin(theta);
            //            return new Point(dx, dy);

            // var coeff20 = E;
            // var n2 = coeff20 * coeff20 + 1.0E-300;
            var preSqrt = VariationHelper.PreSqrt(p);
            var n3      = preSqrt + _n2 - (int)((preSqrt + _n2) / (2.0 * _n2)) * 2 * _n2 - _n2 +
                          preSqrt * (1.0 - _n2);

            return(new Point(
                       n3 * VariationHelper.PreCosA(p, preSqrt),
                       n3 * VariationHelper.PreSinA(p, preSqrt)
                       ));
        }
Exemple #6
0
        public override Point Fun(Point p)
        {
            //            var r = VariationHelper.R(p);
            //            var theta = VariationHelper.Theta(p);
            //            var q = 1.0 / r;
            //            return new Point(
            //                q * (Math.Cos(theta) + Math.Sin(r)),
            //                q * (Math.Sin(theta) - Math.Cos(r))
            //            );

            var preSqrt = VariationHelper.PreSqrt(p);
            var preSinA = VariationHelper.PreSinA(p, preSqrt);
            var preCosA = VariationHelper.PreCosA(p, preSqrt);
            var sin     = Math.Sin(preSqrt);
            var cos     = Math.Cos(preSqrt);
            var n2      = W / preSqrt;

            return(new Point(
                       (preCosA + sin) * n2,
                       (preSinA - cos) * n2
                       ));
        }