public static Vector3D Dini(Vector3D uv, double a, double b) { uv = DiskToUpper(uv); // Eq 1.86 on p36 of book Backlund and Darboux Transformations double eta = Math.PI / 2 - Math.PI / 20; //double eta = Math.PI / 2; double p = 1; // curvature double x = DonHatch.acosh(uv.Y); // Used info on mathworld for tractrix to figure this out. //double x = DonHatch.acosh( Math.Exp( DonHatch.acosh( ( uv.Y * uv.Y + 1 ) / ( 2 * uv.Y ) ) ) ); //double x = Math.Log( uv.Y ); double y = uv.X; double pSinEta = p * Math.Sin(eta); double chi = (x - y * Math.Cos(eta)) / pSinEta; if (x <= -4 || x > 4 || y < -3 * Math.PI || y > 3 * Math.PI) { return(Infinity.InfinityVector); } Vector3D result = new Vector3D( pSinEta * Sech(chi) * Math.Cos(y / p), pSinEta * Sech(chi) * Math.Sin(y / p), x - pSinEta * Math.Tanh(chi)); return(result); /* * System.Func<double, Complex> tractrix = new System.Func<double, Complex>( * ( t ) => * { * //return new Complex( t - Math.Tanh( t ), 1.0 / Math.Cosh( t ) ); * return new Complex( - Math.Sqrt( 1 - 1 / (t*t) ) + DonHatch.acosh( t ), 1.0 / t ); * } ); * * double logy = Math.Log( uv.Y ); * //Complex tract = tractrix( logy ); * Complex tract = tractrix( uv.Y ); * return new Vector3D( * a * Math.Cos( uv.X ) * tract.Imaginary, * a * Math.Sin( uv.X ) * tract.Imaginary, * a * tract.Real + b * uv.X ); */ /* * return new Vector3D( * a * Math.Cos( uv.X ) / Math.Cosh( uv.Y ), * a * Math.Sin( uv.X ) / Math.Cosh( uv.Y ), * a * (uv.Y - Math.Tanh( uv.Y )) + b * uv.X ); */ /*return new Vector3D( * a * Math.Cos( uv.X ) * Math.Sin( uv.Y ), * a * Math.Sin( uv.X ) * Math.Sin( uv.Y ), * a * (Math.Cos( uv.Y ) + Math.Log( Math.Tan( 0.5 * uv.Y ) )) + b * uv.X );*/ }
private static int Math_Tanh(ILuaState lua) { lua.PushNumber(Math.Tanh(lua.L_CheckNumber(1))); return(1); }
public static double Tanh(object self, [DefaultProtocol] double x) { return(SM.Tanh(x)); }
public static float Tanh(float value) { return((float)SMath.Tanh(value)); }
public static double Tanh(object self, double x) { return(SM.Tanh(x)); }
/// <summary> /// Returns the hyperbolic tangent of the specified angle. /// </summary> /// <param name="radians">The angle in radians.</param> /// <returns>System.Double.</returns> public static double TanH(double radians) { return(NMath.Tanh(radians)); }