00001 /** 00002 * \file NETGeographicLib/EllipticFunction.h 00003 * \brief Header for NETGeographicLib::EllipticFunction class 00004 * 00005 * NETGeographicLib is copyright (c) Scott Heiman (2013) 00006 * GeographicLib is Copyright (c) Charles Karney (2010-2012) 00007 * <charles@karney.com> and licensed under the MIT/X11 License. 00008 * For more information, see 00009 * http://geographiclib.sourceforge.net/ 00010 **********************************************************************/ 00011 #pragma once 00012 00013 namespace NETGeographicLib 00014 { 00015 /** 00016 * \brief .NET wrapper for GeographicLib::EllipticFunction. 00017 * 00018 * This class allows .NET applications to access GeographicLib::EllipticFunction. 00019 * 00020 * This provides the elliptic functions and integrals needed for Ellipsoid, 00021 * GeodesicExact, and TransverseMercatorExact. Two categories of function 00022 * are provided: 00023 * - \e static functions to compute symmetric elliptic integrals 00024 * (http://dlmf.nist.gov/19.16.i) 00025 * - \e member functions to compute Legrendre's elliptic 00026 * integrals (http://dlmf.nist.gov/19.2.ii) and the 00027 * Jacobi elliptic functions (http://dlmf.nist.gov/22.2). 00028 * . 00029 * In the latter case, an object is constructed giving the modulus \e k (and 00030 * optionally the parameter α<sup>2</sup>). The modulus is always 00031 * passed as its square <i>k</i><sup>2</sup> which allows \e k to be pure 00032 * imaginary (<i>k</i><sup>2</sup> < 0). (Confusingly, Abramowitz and 00033 * Stegun call \e m = <i>k</i><sup>2</sup> the "parameter" and \e n = 00034 * α<sup>2</sup> the "characteristic".) 00035 * 00036 * In geodesic applications, it is convenient to separate the incomplete 00037 * integrals into secular and periodic components, e.g., 00038 * \f[ 00039 * E(\phi, k) = (2 E(\phi) / \pi) [ \phi + \delta E(\phi, k) ] 00040 * \f] 00041 * where δ\e E(φ, \e k) is an odd periodic function with period 00042 * π. 00043 * 00044 * The computation of the elliptic integrals uses the algorithms given in 00045 * - B. C. Carlson, 00046 * <a href="http://dx.doi.org/10.1007/BF02198293"> Computation of real or 00047 * complex elliptic integrals</a>, Numerical Algorithms 10, 13--26 (1995) 00048 * . 00049 * with the additional optimizations given in http://dlmf.nist.gov/19.36.i. 00050 * The computation of the Jacobi elliptic functions uses the algorithm given 00051 * in 00052 * - R. Bulirsch, 00053 * <a href="http://dx.doi.org/10.1007/BF01397975"> Numerical Calculation of 00054 * Elliptic Integrals and Elliptic Functions</a>, Numericshe Mathematik 7, 00055 * 78--90 (1965). 00056 * . 00057 * The notation follows http://dlmf.nist.gov/19 and http://dlmf.nist.gov/22 00058 * 00059 * C# Example: 00060 * \include example-EllipticFunction.cs 00061 * Managed C++ Example: 00062 * \include example-EllipticFunction.cpp 00063 * Visual Basic Example: 00064 * \include example-EllipticFunction.vb 00065 * 00066 * <B>INTERFACE DIFFERENCES:</B><BR> 00067 * The k2, kp2, alpha2, and alphap2 functions are implemented as properties. 00068 **********************************************************************/ 00069 public ref class EllipticFunction 00070 { 00071 private: 00072 // a pointer to the unmanaged GeographicLib::EllipticFunction. 00073 GeographicLib::EllipticFunction* m_pEllipticFunction; 00074 00075 // The finalizer frees the unmanaged memory. 00076 !EllipticFunction(); 00077 public: 00078 /** \name Constructor 00079 **********************************************************************/ 00080 ///@{ 00081 /** 00082 * Constructor specifying the modulus and parameter. 00083 * 00084 * @param[in] k2 the square of the modulus <i>k</i><sup>2</sup>. 00085 * <i>k</i><sup>2</sup> must lie in (-∞, 1). (No checking is 00086 * done.) 00087 * @param[in] alpha2 the parameter α<sup>2</sup>. 00088 * α<sup>2</sup> must lie in (-∞, 1). (No checking is done.) 00089 * 00090 * If only elliptic integrals of the first and second kinds are needed, 00091 * then set α<sup>2</sup> = 0 (the default value); in this case, we 00092 * have Π(φ, 0, \e k) = \e F(φ, \e k), \e G(φ, 0, \e k) = \e 00093 * E(φ, \e k), and \e H(φ, 0, \e k) = \e F(φ, \e k) - \e 00094 * D(φ, \e k). 00095 **********************************************************************/ 00096 EllipticFunction(double k2, double alpha2 ); 00097 00098 /** 00099 * Constructor specifying the modulus and parameter and their complements. 00100 * 00101 * @param[in] k2 the square of the modulus <i>k</i><sup>2</sup>. 00102 * <i>k</i><sup>2</sup> must lie in (-∞, 1). (No checking is 00103 * done.) 00104 * @param[in] alpha2 the parameter α<sup>2</sup>. 00105 * α<sup>2</sup> must lie in (-∞, 1). (No checking is done.) 00106 * @param[in] kp2 the complementary modulus squared <i>k'</i><sup>2</sup> = 00107 * 1 − <i>k</i><sup>2</sup>. 00108 * @param[in] alphap2 the complementary parameter α'<sup>2</sup> = 1 00109 * − α<sup>2</sup>. 00110 * 00111 * The arguments must satisfy \e k2 + \e kp2 = 1 and \e alpha2 + \e alphap2 00112 * = 1. (No checking is done that these conditions are met.) This 00113 * constructor is provided to enable accuracy to be maintained, e.g., when 00114 * \e k is very close to unity. 00115 **********************************************************************/ 00116 EllipticFunction(double k2, double alpha2, double kp2, double alphap2); 00117 00118 /** 00119 * Destructor calls the finalizer. 00120 **********************************************************************/ 00121 ~EllipticFunction() 00122 { this->!EllipticFunction(); } 00123 00124 /** 00125 * Reset the modulus and parameter. 00126 * 00127 * @param[in] k2 the new value of square of the modulus 00128 * <i>k</i><sup>2</sup> which must lie in (-∞, 1). (No checking is 00129 * done.) 00130 * @param[in] alpha2 the new value of parameter α<sup>2</sup>. 00131 * α<sup>2</sup> must lie in (-∞, 1). (No checking is done.) 00132 **********************************************************************/ 00133 void Reset(double k2, double alpha2 ); 00134 00135 /** 00136 * Reset the modulus and parameter supplying also their complements. 00137 * 00138 * @param[in] k2 the square of the modulus <i>k</i><sup>2</sup>. 00139 * <i>k</i><sup>2</sup> must lie in (-∞, 1). (No checking is 00140 * done.) 00141 * @param[in] alpha2 the parameter α<sup>2</sup>. 00142 * α<sup>2</sup> must lie in (-∞, 1). (No checking is done.) 00143 * @param[in] kp2 the complementary modulus squared <i>k'</i><sup>2</sup> = 00144 * 1 − <i>k</i><sup>2</sup>. 00145 * @param[in] alphap2 the complementary parameter α'<sup>2</sup> = 1 00146 * − α<sup>2</sup>. 00147 * 00148 * The arguments must satisfy \e k2 + \e kp2 = 1 and \e alpha2 + \e alphap2 00149 * = 1. (No checking is done that these conditions are met.) This 00150 * constructor is provided to enable accuracy to be maintained, e.g., when 00151 * is very small. 00152 **********************************************************************/ 00153 void Reset(double k2, double alpha2, double kp2, double alphap2); 00154 00155 ///@} 00156 00157 /** \name Inspector functions. 00158 **********************************************************************/ 00159 ///@{ 00160 /** 00161 * @return the square of the modulus <i>k</i><sup>2</sup>. 00162 **********************************************************************/ 00163 property double k2 { double get(); } 00164 00165 /** 00166 * @return the square of the complementary modulus <i>k'</i><sup>2</sup> = 00167 * 1 − <i>k</i><sup>2</sup>. 00168 **********************************************************************/ 00169 property double kp2 { double get(); } 00170 00171 /** 00172 * @return the parameter α<sup>2</sup>. 00173 **********************************************************************/ 00174 property double alpha2 { double get(); } 00175 00176 /** 00177 * @return the complementary parameter α'<sup>2</sup> = 1 − 00178 * α<sup>2</sup>. 00179 **********************************************************************/ 00180 property double alphap2 { double get(); } 00181 ///@} 00182 00183 /** \name Complete elliptic integrals. 00184 **********************************************************************/ 00185 ///@{ 00186 /** 00187 * The complete integral of the first kind. 00188 * 00189 * @return \e K(\e k). 00190 * 00191 * \e K(\e k) is defined in http://dlmf.nist.gov/19.2.E4 00192 * \f[ 00193 * K(k) = \int_0^{\pi/2} \frac1{\sqrt{1-k^2\sin^2\phi}}\,d\phi. 00194 * \f] 00195 **********************************************************************/ 00196 double K(); 00197 00198 /** 00199 * The complete integral of the second kind. 00200 * 00201 * @return \e E(\e k) 00202 * 00203 * \e E(\e k) is defined in http://dlmf.nist.gov/19.2.E5 00204 * \f[ 00205 * E(k) = \int_0^{\pi/2} \sqrt{1-k^2\sin^2\phi}\,d\phi. 00206 * \f] 00207 **********************************************************************/ 00208 double E(); 00209 00210 /** 00211 * Jahnke's complete integral. 00212 * 00213 * @return \e D(\e k). 00214 * 00215 * \e D(\e k) is defined in http://dlmf.nist.gov/19.2.E6 00216 * \f[ 00217 * D(k) = \int_0^{\pi/2} \frac{\sin^2\phi}{\sqrt{1-k^2\sin^2\phi}}\,d\phi. 00218 * \f] 00219 **********************************************************************/ 00220 double D(); 00221 00222 /** 00223 * The difference between the complete integrals of the first and second 00224 * kinds. 00225 * 00226 * @return \e K(\e k) − \e E(\e k). 00227 **********************************************************************/ 00228 double KE(); 00229 00230 /** 00231 * The complete integral of the third kind. 00232 * 00233 * @return Π(α<sup>2</sup>, \e k) 00234 * 00235 * Π(α<sup>2</sup>, \e k) is defined in 00236 * http://dlmf.nist.gov/19.2.E7 00237 * \f[ 00238 * \Pi(\alpha^2, k) = \int_0^{\pi/2} 00239 * \frac1{\sqrt{1-k^2\sin^2\phi}(1 - \alpha^2\sin^2\phi_)}\,d\phi. 00240 * \f] 00241 **********************************************************************/ 00242 double Pi(); 00243 00244 /** 00245 * Legendre's complete geodesic longitude integral. 00246 * 00247 * @return \e G(α<sup>2</sup>, \e k) 00248 * 00249 * \e G(α<sup>2</sup>, \e k) is given by 00250 * \f[ 00251 * G(\alpha^2, k) = \int_0^{\pi/2} 00252 * \frac{\sqrt{1-k^2\sin^2\phi}}{1 - \alpha^2\sin^2\phi}\,d\phi. 00253 * \f] 00254 **********************************************************************/ 00255 double G(); 00256 00257 /** 00258 * Cayley's complete geodesic longitude difference integral. 00259 * 00260 * @return \e H(α<sup>2</sup>, \e k) 00261 * 00262 * \e H(α<sup>2</sup>, \e k) is given by 00263 * \f[ 00264 * H(\alpha^2, k) = \int_0^{\pi/2} 00265 * \frac{\cos^2\phi}{(1-\alpha^2\sin^2\phi)\sqrt{1-k^2\sin^2\phi}} 00266 * \,d\phi. 00267 * \f] 00268 **********************************************************************/ 00269 double H(); 00270 ///@} 00271 00272 /** \name Incomplete elliptic integrals. 00273 **********************************************************************/ 00274 ///@{ 00275 /** 00276 * The incomplete integral of the first kind. 00277 * 00278 * @param[in] phi 00279 * @return \e F(φ, \e k). 00280 * 00281 * \e F(φ, \e k) is defined in http://dlmf.nist.gov/19.2.E4 00282 * \f[ 00283 * F(\phi, k) = \int_0^\phi \frac1{\sqrt{1-k^2\sin^2\theta}}\,d\theta. 00284 * \f] 00285 **********************************************************************/ 00286 double F(double phi); 00287 00288 /** 00289 * The incomplete integral of the second kind. 00290 * 00291 * @param[in] phi 00292 * @return \e E(φ, \e k). 00293 * 00294 * \e E(φ, \e k) is defined in http://dlmf.nist.gov/19.2.E5 00295 * \f[ 00296 * E(\phi, k) = \int_0^\phi \sqrt{1-k^2\sin^2\theta}\,d\theta. 00297 * \f] 00298 **********************************************************************/ 00299 double E(double phi); 00300 00301 /** 00302 * The incomplete integral of the second kind with the argument given in 00303 * degrees. 00304 * 00305 * @param[in] ang in <i>degrees</i>. 00306 * @return \e E(π <i>ang</i>/180, \e k). 00307 **********************************************************************/ 00308 double Ed(double ang); 00309 00310 /** 00311 * The inverse of the incomplete integral of the second kind. 00312 * 00313 * @param[in] x 00314 * @return φ = <i>E</i><sup>−1</sup>(\e x, \e k); i.e., the 00315 * solution of such that \e E(φ, \e k) = \e x. 00316 **********************************************************************/ 00317 double Einv(double x); 00318 00319 /** 00320 * The incomplete integral of the third kind. 00321 * 00322 * @param[in] phi 00323 * @return Π(φ, α<sup>2</sup>, \e k). 00324 * 00325 * Π(φ, α<sup>2</sup>, \e k) is defined in 00326 * http://dlmf.nist.gov/19.2.E7 00327 * \f[ 00328 * \Pi(\phi, \alpha^2, k) = \int_0^\phi 00329 * \frac1{\sqrt{1-k^2\sin^2\theta}(1 - \alpha^2\sin^2\theta_)}\,d\theta. 00330 * \f] 00331 **********************************************************************/ 00332 double Pi(double phi); 00333 00334 /** 00335 * Jahnke's incomplete elliptic integral. 00336 * 00337 * @param[in] phi 00338 * @return \e D(φ, \e k). 00339 * 00340 * \e D(φ, \e k) is defined in http://dlmf.nist.gov/19.2.E4 00341 * \f[ 00342 * D(\phi, k) = \int_0^\phi 00343 * \frac{\sin^2\theta}{\sqrt{1-k^2\sin^2\theta}}\,d\theta. 00344 * \f] 00345 **********************************************************************/ 00346 double D(double phi); 00347 00348 /** 00349 * Legendre's geodesic longitude integral. 00350 * 00351 * @param[in] phi 00352 * @return \e G(φ, α<sup>2</sup>, \e k). 00353 * 00354 * \e G(φ, α<sup>2</sup>, \e k) is defined by 00355 * \f[ 00356 * \begin{aligned} 00357 * G(\phi, \alpha^2, k) &= 00358 * \frac{k^2}{\alpha^2} F(\phi, k) + 00359 * \biggl(1 - \frac{k^2}{\alpha^2}\biggr) \Pi(\phi, \alpha^2, k) \\ 00360 * &= \int_0^\phi 00361 * \frac{\sqrt{1-k^2\sin^2\theta}}{1 - \alpha^2\sin^2\theta}\,d\theta. 00362 * \end{aligned} 00363 * \f] 00364 * 00365 * Legendre expresses the longitude of a point on the geodesic in terms of 00366 * this combination of elliptic integrals in Exercices de Calcul 00367 * Intégral, Vol. 1 (1811), p. 181, 00368 * http://books.google.com/books?id=riIOAAAAQAAJ&pg=PA181. 00369 * 00370 * See \ref geodellip for the expression for the longitude in terms of this 00371 * function. 00372 **********************************************************************/ 00373 double G(double phi); 00374 00375 /** 00376 * Cayley's geodesic longitude difference integral. 00377 * 00378 * @param[in] phi 00379 * @return \e H(φ, α<sup>2</sup>, \e k). 00380 * 00381 * \e H(φ, α<sup>2</sup>, \e k) is defined by 00382 * \f[ 00383 * \begin{aligned} 00384 * H(\phi, \alpha^2, k) &= 00385 * \frac1{\alpha^2} F(\phi, k) + 00386 * \biggl(1 - \frac1{\alpha^2}\biggr) \Pi(\phi, \alpha^2, k) \\ 00387 * &= \int_0^\phi 00388 * \frac{\cos^2\theta}{(1-\alpha^2\sin^2\theta)\sqrt{1-k^2\sin^2\theta}} 00389 * \,d\theta. 00390 * \end{aligned} 00391 * \f] 00392 * 00393 * Cayley expresses the longitude difference of a point on the geodesic in 00394 * terms of this combination of elliptic integrals in Phil. Mag. <b>40</b> 00395 * (1870), p. 333, http://books.google.com/books?id=Zk0wAAAAIAAJ&pg=PA333. 00396 * 00397 * See \ref geodellip for the expression for the longitude in terms of this 00398 * function. 00399 **********************************************************************/ 00400 double H(double phi); 00401 ///@} 00402 00403 /** \name Incomplete integrals in terms of Jacobi elliptic functions. 00404 **********************************************************************/ 00405 /** 00406 * The incomplete integral of the first kind in terms of Jacobi elliptic 00407 * functions. 00408 * 00409 * @param[in] sn = sinφ 00410 * @param[in] cn = cosφ 00411 * @param[in] dn = sqrt(1 − <i>k</i><sup>2</sup> 00412 * sin<sup>2</sup>φ) 00413 * @return \e F(φ, \e k) as though φ ∈ (−π, π]. 00414 **********************************************************************/ 00415 double F(double sn, double cn, double dn); 00416 00417 /** 00418 * The incomplete integral of the second kind in terms of Jacobi elliptic 00419 * functions. 00420 * 00421 * @param[in] sn = sinφ 00422 * @param[in] cn = cosφ 00423 * @param[in] dn = sqrt(1 − <i>k</i><sup>2</sup> 00424 * sin<sup>2</sup>φ) 00425 * @return \e E(φ, \e k) as though φ ∈ (−π, π]. 00426 **********************************************************************/ 00427 double E(double sn, double cn, double dn); 00428 00429 /** 00430 * The incomplete integral of the third kind in terms of Jacobi elliptic 00431 * functions. 00432 * 00433 * @param[in] sn = sinφ 00434 * @param[in] cn = cosφ 00435 * @param[in] dn = sqrt(1 − <i>k</i><sup>2</sup> 00436 * sin<sup>2</sup>φ) 00437 * @return Π(φ, α<sup>2</sup>, \e k) as though φ ∈ 00438 * (−π, π]. 00439 **********************************************************************/ 00440 double Pi(double sn, double cn, double dn); 00441 00442 /** 00443 * Jahnke's incomplete elliptic integral in terms of Jacobi elliptic 00444 * functions. 00445 * 00446 * @param[in] sn = sinφ 00447 * @param[in] cn = cosφ 00448 * @param[in] dn = sqrt(1 − <i>k</i><sup>2</sup> 00449 * sin<sup>2</sup>φ) 00450 * @return \e D(φ, \e k) as though φ ∈ (−π, π]. 00451 **********************************************************************/ 00452 double D(double sn, double cn, double dn); 00453 00454 /** 00455 * Legendre's geodesic longitude integral in terms of Jacobi elliptic 00456 * functions. 00457 * 00458 * @param[in] sn = sinφ 00459 * @param[in] cn = cosφ 00460 * @param[in] dn = sqrt(1 − <i>k</i><sup>2</sup> 00461 * sin<sup>2</sup>φ) 00462 * @return \e G(φ, α<sup>2</sup>, \e k) as though φ ∈ 00463 * (−π, π]. 00464 **********************************************************************/ 00465 double G(double sn, double cn, double dn); 00466 00467 /** 00468 * Cayley's geodesic longitude difference integral in terms of Jacobi 00469 * elliptic functions. 00470 * 00471 * @param[in] sn = sinφ 00472 * @param[in] cn = cosφ 00473 * @param[in] dn = sqrt(1 − <i>k</i><sup>2</sup> 00474 * sin<sup>2</sup>φ) 00475 * @return \e H(φ, α<sup>2</sup>, \e k) as though φ ∈ 00476 * (−π, π]. 00477 **********************************************************************/ 00478 double H(double sn, double cn, double dn); 00479 ///@} 00480 00481 /** \name Periodic versions of incomplete elliptic integrals. 00482 **********************************************************************/ 00483 ///@{ 00484 /** 00485 * The periodic incomplete integral of the first kind. 00486 * 00487 * @param[in] sn = sinφ 00488 * @param[in] cn = cosφ 00489 * @param[in] dn = sqrt(1 − <i>k</i><sup>2</sup> 00490 * sin<sup>2</sup>φ) 00491 * @return the periodic function π \e F(φ, \e k) / (2 \e K(\e k)) - 00492 * φ 00493 **********************************************************************/ 00494 double deltaF(double sn, double cn, double dn); 00495 00496 /** 00497 * The periodic incomplete integral of the second kind. 00498 * 00499 * @param[in] sn = sinφ 00500 * @param[in] cn = cosφ 00501 * @param[in] dn = sqrt(1 − <i>k</i><sup>2</sup> 00502 * sin<sup>2</sup>φ) 00503 * @return the periodic function π \e E(φ, \e k) / (2 \e E(\e k)) - 00504 * φ 00505 **********************************************************************/ 00506 double deltaE(double sn, double cn, double dn); 00507 00508 /** 00509 * The periodic inverse of the incomplete integral of the second kind. 00510 * 00511 * @param[in] stau = sinτ 00512 * @param[in] ctau = sinτ 00513 * @return the periodic function <i>E</i><sup>−1</sup>(τ (2 \e 00514 * E(\e k)/π), \e k) - τ 00515 **********************************************************************/ 00516 double deltaEinv(double stau, double ctau); 00517 00518 /** 00519 * The periodic incomplete integral of the third kind. 00520 * 00521 * @param[in] sn = sinφ 00522 * @param[in] cn = cosφ 00523 * @param[in] dn = sqrt(1 − <i>k</i><sup>2</sup> 00524 * sin<sup>2</sup>φ) 00525 * @return the periodic function π Π(φ, \e k) / (2 Π(\e k)) - 00526 * φ 00527 **********************************************************************/ 00528 double deltaPi(double sn, double cn, double dn); 00529 00530 /** 00531 * The periodic Jahnke's incomplete elliptic integral. 00532 * 00533 * @param[in] sn = sinφ 00534 * @param[in] cn = cosφ 00535 * @param[in] dn = sqrt(1 − <i>k</i><sup>2</sup> 00536 * sin<sup>2</sup>φ) 00537 * @return the periodic function π \e D(φ, \e k) / (2 \e D(\e k)) - 00538 * φ 00539 **********************************************************************/ 00540 double deltaD(double sn, double cn, double dn); 00541 00542 /** 00543 * Legendre's periodic geodesic longitude integral. 00544 * 00545 * @param[in] sn = sinφ 00546 * @param[in] cn = cosφ 00547 * @param[in] dn = sqrt(1 − <i>k</i><sup>2</sup> 00548 * sin<sup>2</sup>φ) 00549 * @return the periodic function π \e G(φ, \e k) / (2 \e G(\e k)) - 00550 * φ 00551 **********************************************************************/ 00552 double deltaG(double sn, double cn, double dn); 00553 00554 /** 00555 * Cayley's periodic geodesic longitude difference integral. 00556 * 00557 * @param[in] sn = sinφ 00558 * @param[in] cn = cosφ 00559 * @param[in] dn = sqrt(1 − <i>k</i><sup>2</sup> 00560 * sin<sup>2</sup>φ) 00561 * @return the periodic function π \e H(φ, \e k) / (2 \e H(\e k)) - 00562 * φ 00563 **********************************************************************/ 00564 double deltaH(double sn, double cn, double dn); 00565 ///@} 00566 00567 /** \name Elliptic functions. 00568 **********************************************************************/ 00569 ///@{ 00570 /** 00571 * The Jacobi elliptic functions. 00572 * 00573 * @param[in] x the argument. 00574 * @param[out] sn sn(\e x, \e k). 00575 * @param[out] cn cn(\e x, \e k). 00576 * @param[out] dn dn(\e x, \e k). 00577 **********************************************************************/ 00578 void sncndn(double x, 00579 [System::Runtime::InteropServices::Out] double% sn, 00580 [System::Runtime::InteropServices::Out] double% cn, 00581 [System::Runtime::InteropServices::Out] double% dn); 00582 00583 /** 00584 * The Δ amplitude function. 00585 * 00586 * @param[in] sn sinφ 00587 * @param[in] cn cosφ 00588 * @return Δ = sqrt(1 − <i>k</i><sup>2</sup> 00589 * sin<sup>2</sup>φ) 00590 **********************************************************************/ 00591 double Delta(double sn, double cn); 00592 ///@} 00593 00594 /** \name Symmetric elliptic integrals. 00595 **********************************************************************/ 00596 ///@{ 00597 /** 00598 * Symmetric integral of the first kind <i>R<sub>F</sub></i>. 00599 * 00600 * @param[in] x 00601 * @param[in] y 00602 * @param[in] z 00603 * @return <i>R<sub>F</sub></i>(\e x, \e y, \e z) 00604 * 00605 * <i>R<sub>F</sub></i> is defined in http://dlmf.nist.gov/19.16.E1 00606 * \f[ R_F(x, y, z) = \frac12 00607 * \int_0^\infty\frac1{\sqrt{(t + x) (t + y) (t + z)}}\, dt \f] 00608 * If one of the arguments is zero, it is more efficient to call the 00609 * two-argument version of this function with the non-zero arguments. 00610 **********************************************************************/ 00611 static double RF(double x, double y, double z); 00612 00613 /** 00614 * Complete symmetric integral of the first kind, <i>R<sub>F</sub></i> with 00615 * one argument zero. 00616 * 00617 * @param[in] x 00618 * @param[in] y 00619 * @return <i>R<sub>F</sub></i>(\e x, \e y, 0) 00620 **********************************************************************/ 00621 static double RF(double x, double y); 00622 00623 /** 00624 * Degenerate symmetric integral of the first kind <i>R<sub>C</sub></i>. 00625 * 00626 * @param[in] x 00627 * @param[in] y 00628 * @return <i>R<sub>C</sub></i>(\e x, \e y) = <i>R<sub>F</sub></i>(\e x, \e 00629 * y, \e y) 00630 * 00631 * <i>R<sub>C</sub></i> is defined in http://dlmf.nist.gov/19.2.E17 00632 * \f[ R_C(x, y) = \frac12 00633 * \int_0^\infty\frac1{\sqrt{t + x}(t + y)}\,dt \f] 00634 **********************************************************************/ 00635 static double RC(double x, double y); 00636 00637 /** 00638 * Symmetric integral of the second kind <i>R<sub>G</sub></i>. 00639 * 00640 * @param[in] x 00641 * @param[in] y 00642 * @param[in] z 00643 * @return <i>R<sub>G</sub></i>(\e x, \e y, \e z) 00644 * 00645 * <i>R<sub>G</sub></i> is defined in Carlson, eq 1.5 00646 * \f[ R_G(x, y, z) = \frac14 00647 * \int_0^\infty[(t + x) (t + y) (t + z)]^{-1/2} 00648 * \biggl( 00649 * \frac x{t + x} + \frac y{t + y} + \frac z{t + z} 00650 * \biggr)t\,dt \f] 00651 * See also http://dlmf.nist.gov/19.16.E3. 00652 * If one of the arguments is zero, it is more efficient to call the 00653 * two-argument version of this function with the non-zero arguments. 00654 **********************************************************************/ 00655 static double RG(double x, double y, double z); 00656 00657 /** 00658 * Complete symmetric integral of the second kind, <i>R<sub>G</sub></i> 00659 * with one argument zero. 00660 * 00661 * @param[in] x 00662 * @param[in] y 00663 * @return <i>R<sub>G</sub></i>(\e x, \e y, 0) 00664 **********************************************************************/ 00665 static double RG(double x, double y); 00666 00667 /** 00668 * Symmetric integral of the third kind <i>R<sub>J</sub></i>. 00669 * 00670 * @param[in] x 00671 * @param[in] y 00672 * @param[in] z 00673 * @param[in] p 00674 * @return <i>R<sub>J</sub></i>(\e x, \e y, \e z, \e p) 00675 * 00676 * <i>R<sub>J</sub></i> is defined in http://dlmf.nist.gov/19.16.E2 00677 * \f[ R_J(x, y, z, p) = \frac32 00678 * \int_0^\infty[(t + x) (t + y) (t + z)]^{-1/2} (t + p)^{-1}\, dt \f] 00679 **********************************************************************/ 00680 static double RJ(double x, double y, double z, double p); 00681 00682 /** 00683 * Degenerate symmetric integral of the third kind <i>R<sub>D</sub></i>. 00684 * 00685 * @param[in] x 00686 * @param[in] y 00687 * @param[in] z 00688 * @return <i>R<sub>D</sub></i>(\e x, \e y, \e z) = <i>R<sub>J</sub></i>(\e 00689 * x, \e y, \e z, \e z) 00690 * 00691 * <i>R<sub>D</sub></i> is defined in http://dlmf.nist.gov/19.16.E5 00692 * \f[ R_D(x, y, z) = \frac32 00693 * \int_0^\infty[(t + x) (t + y)]^{-1/2} (t + z)^{-3/2}\, dt \f] 00694 **********************************************************************/ 00695 static double RD(double x, double y, double z); 00696 ///@} 00697 }; 00698 } // namespace NETGeographicLib