EllipticFunctions.jl documentation
Jacobi theta functions and related functions.
using EllipticFunctions
using Images
# array of complex values.
z = (1:-0.001:-1) .* im .+ (-1:0.001:1)';
# function z->RGB
function colormap(z)
if isinf(z) || isnan(z)
return RGB(0, 0, 0)
end
r = mod(abs(z), 1.0)
g = 2 * mod(angle(z), 0.5)
b = mod(real(z) * imag(z), 1.0)
if isnan(b)
return RGB(0, 0, 0)
end
return RGB(
(1.0 - cos(r-0.5))*8.0,
(1.0 - cos(g-0.5))*8.0,
(1.0 - cos(b-0.5))*8.0
)
end
# function to be plotted
function f(z)
return EllipticFunctions.wzeta(z; tau = 0.1 + 3im)
end
# raster image
image = colormap.(f(3*z))
Functions
The Weierstrass elliptic functions $\wp$, $\sigma$ and $\zeta$ are vectorized in the variable $z$. That means you do not need to use broadcasting in order to apply them to an array of $z$ values (this would be slower).
EllipticFunctions.ljtheta1
— Functionljtheta1(z, q)
Logarithm of the first Jacobi theta function.
Arguments
z
: real or complex number or array of numbersq
: the nome
EllipticFunctions.jtheta1
— Functionjtheta1(z, q)
First Jacobi theta function.
Arguments
z
: real or complex number or array of numbersq
: the nome
EllipticFunctions.ljtheta2
— Functionljtheta2(z, q)
Logarithm of the second Jacobi theta function.
Arguments
z
: real or complex number or array of numbersq
: the nome
EllipticFunctions.jtheta2
— Functionjtheta2(z, q)
Second Jacobi theta function.
Arguments
z
: real or complex number or array of numbersq
: the nome
EllipticFunctions.ljtheta3
— Functionljtheta3(z, q)
Logarithm of the third Jacobi theta function.
Arguments
z
: real or complex number or array of complex numbersq
: the nome
EllipticFunctions.jtheta3
— Functionjtheta3(z, q)
Third Jacobi theta function.
Arguments
z
: real or complex number or array of numbersq
: the nome
EllipticFunctions.ljtheta4
— Functionljtheta4(z, q)
Logarithm of the fourth Jacobi theta function.
Arguments
z
: real or complex number or array of complex numbersq
: the nome
EllipticFunctions.jtheta4
— Functionjtheta4(z, q)
Fourth Jacobi theta function.
Arguments
z
: real or complex number or array of numbersq
: the nome
EllipticFunctions.jtheta_ab
— Functionjtheta_ab(a, b, z, q)
Jacobi theta function with characteristics. This is a family of functions parameterized by a
and b
, which contains the opposite of the first Jacobi theta function (a=b=0.5
), the second Jacobi theta function (a=0.5,b=0
), the third Jacobi theta function (a=b=0
), and the fourth Jacobi theta function (a=0,b=0.5
).
Arguments
a
: first characteristic, a real or complex numberb
: second characteristic, a real or complex numberz
: real or complex number or array of numbersq
: the nome
EllipticFunctions.jtheta1dash
— Functionjtheta1dash(z, q)
Derivative of the first Jacobi theta function.
Arguments
z
: real or complex number or array of numbersq
: the nome
EllipticFunctions.qfromtau
— Functionqfromtau(tau)
The nome q
given the tau
parameter.
Arguments
tau
: complex number with nonnegative imaginary part
EllipticFunctions.taufromq
— Functiontaufromq(q)
The tau
parameter given the nome q
.
Arguments
q
: complex number, the nome; it must not be a negative real number and its modulus must be strictly smaller than 1
EllipticFunctions.etaDedekind
— FunctionetaDedekind(tau)
Dedekind eta function.
Arguments
tau
: complex number with nonnegative imaginary part
EllipticFunctions.lambda
— Functionlambda(tau)
Lambda modular function.
Arguments
tau
: complex number with nonnegative imaginary part
EllipticFunctions.kleinj
— Functionkleinj(tau)
Klein j-invariant function.
Arguments
tau
: complex number with nonnegative imaginary part
EllipticFunctions.kleinjinv
— Functionkleinjinv(j)
Inverse of the Klein j-invariant function.
Arguments
j
: real or complex number
EllipticFunctions.CarlsonRC
— FunctionCarlsonRC(x, y)
Carlson 'RC' integral.
Arguments
x
,y
: real or complex numbers;y
cannot be zero
EllipticFunctions.CarlsonRD
— FunctionCarlsonRD(x, y, z)
Carlson 'RD' integral.
Arguments
x
,y
,z
: real or complex numbers; at most one of them can be zero
EllipticFunctions.CarlsonRF
— FunctionCarlsonRF(x, y, z)
Carlson 'RF' integral.
Arguments
x
,y
,z
: real or complex numbers; at most one of them can be zero
EllipticFunctions.CarlsonRG
— FunctionCarlsonRG(x, y, z)
Carlson 'RG' integral.
Arguments
x
,y
,z
: real or complex numbers
EllipticFunctions.CarlsonRJ
— FunctionCarlsonRJ(x, y, z, p)
Carlson 'RJ' integral.
Arguments
x
,y
,z
,p
: real or complex numbers; at most one of them can be zero
EllipticFunctions.ellipticE
— FunctionellipticE(phi, m)
Incomplete elliptic integral of the second kind.
Arguments
phi
: real or complex number, the amplitudem
: real or complex number, the squared modulus
ellipticE(m)
Complete elliptic integral of the second kind.
Arguments
m
: real or complex number, the squared modulus
EllipticFunctions.ellipticF
— FunctionellipticF(phi, m)
Incomplete elliptic integral of the first kind.
Arguments
phi
: real or complex number, the amplitudem
: real or complex number, the squared modulus
EllipticFunctions.ellipticK
— FunctionellipticK(m)
Complete elliptic integral of the first kind.
Arguments
m
: real or complex number, the squared modulus
EllipticFunctions.ellipticPI
— FunctionellipticPI(phi, n, m)
Incomplete elliptic integral of first kind.
Arguments
phi
: real or complex number, the amplituden
: real or complex number, the characteristicm
: real or complex number, the squared modulus
EllipticFunctions.ellipticZ
— FunctionellipticZ(phi, m)
Jacobi Zeta function.
Arguments
phi
: real or complex number, the amplitudem
: real or complex number, the squared modulus
EllipticFunctions.agm
— Functionagm(x, y)
Arithmetic-geometric mean.
Arguments
x
,y
: real or complex numbers
EllipticFunctions.EisensteinE2
— FunctionEisensteinE2(q)
Eisenstein E-series of weight 2.
Arguments
q
: nome, real or complex number; it must not be a negative real number and its modulus must be strictly smaller than 1
EllipticFunctions.EisensteinE4
— FunctionEisensteinE4(q)
Eisenstein E-series of weight 4.
Arguments
q
: nome, real or complex number; it must not be a negative real number and its modulus must be strictly smaller than 1
EllipticFunctions.EisensteinE6
— FunctionEisensteinE6(q)
Eisenstein E-series of weight 6.
Arguments
q
: nome, real or complex number; it must not be a negative real number and its modulus must be strictly smaller than 1
EllipticFunctions.ellipticInvariants
— FunctionellipticInvariants(omega1, omega2)
Weierstrass elliptic invariants $g_2$ and $g_3$ from the half-periods.
Arguments
omega1
,omega2
: the Weierstrass half periods, real or complex numbers
EllipticFunctions.halfPeriods
— FunctionhalfPeriods(g2, g3)
Half-periods $\omega_1$ and $\omega_2$ from the elliptic invariants.
Arguments
g2
,g3
: the Weierstrass elliptic invariants, real or complex numbers
EllipticFunctions.wp
— Functionwp(z; tau, omega, g, derivative=0)
Weierstrass p-function. One and only one of the parameters tau
, omega
or g
must be given.
Arguments
z
: real or complex number or array of numberstau
: half-periods ratio, complex number with non negative imaginary partomega
: half-periods, a pair (tuple) of complex numbersg
: elliptic invariants, a pair (tuple) of complex numbersderivative
: order of differentiation, 0, 1, 2 or 3
EllipticFunctions.wsigma
— Functionwsigma(z; tau, omega, g)
Weierstrass sigma-function. One and only one of the parameters tau
, omega
or g
must be given.
Arguments
z
: real or complex number or array of numberstau
: half-periods ratio, complex number with non negative imaginary partomega
: half-periods, a pair (tuple) of complex numbersg
: elliptic invariants, a pair (tuple) of complex numbers
EllipticFunctions.wzeta
— Functionwzeta(z; tau, omega, g)
Weierstrass zeta-function. One and only one of the parameters tau
, omega
or g
must be given.
Arguments
z
: real or complex number or array of numberstau
: half-periods ratio, complex number with non negative imaginary partomega
: half-periods, a pair of complex numbersg
: elliptic invariants, a pair of complex numbers
EllipticFunctions.thetaC
— FunctionthetaC(z; tau, m)
Neville C-theta function. Only one of the parameters tau
or m
must be supplied.
Arguments
z
: real or complex number or array of numberstau
: complex number with nonnegative imaginary partm
: real or complex number, square of the elliptic modulus
EllipticFunctions.thetaD
— FunctionthetaD(z; tau, m)
Neville D-theta function. Only one of the parameters tau
or m
must be supplied.
Arguments
z
: real or complex number or array of numberstau
: complex number with nonnegative imaginary partm
: real or complex number, square of the elliptic modulus
EllipticFunctions.thetaN
— FunctionthetaN(z; tau, m)
Neville N-theta function. Only one of the parameters tau
or m
must be supplied.
Arguments
z
: real or complex number or vector/array of complex numberstau
: complex number with nonnegative imaginary partm
: real or complex number, square of the elliptic modulus
EllipticFunctions.thetaS
— FunctionthetaS(z; tau, m)
Neville S-theta function. Only one of the parameters tau
or m
must be supplied.
Arguments
z
: real or complex number or array of numberstau
: complex number with nonnegative imaginary partm
: real or complex number, square of the elliptic modulus
EllipticFunctions.jellip
— Functionjellip(kind, u; tau, m)
Jacobi elliptic functions. Only one of the parameters tau
or m
must be supplied.
Arguments
kind
: a string with two characters among 'c', 'd', 'n' or 's'; this string specifies the function: the two letters respectively denote the basic functionssn
,cn
,dn
and1
, and the string specifies the ratio of two such functions, e.g.ns=1/sn
andcd=cn/dn
u
: a real or complex number or array of numberstau
: complex number with nonnegative imaginary partm
: real or complex number, square of the elliptic modulus
EllipticFunctions.am
— Functionam(u, m)
Amplitude function.
Arguments
u
: real or complex number or array of numbersm
: real or complex number, square of the elliptic modulus
Index
EllipticFunctions.CarlsonRC
EllipticFunctions.CarlsonRD
EllipticFunctions.CarlsonRF
EllipticFunctions.CarlsonRG
EllipticFunctions.CarlsonRJ
EllipticFunctions.EisensteinE2
EllipticFunctions.EisensteinE4
EllipticFunctions.EisensteinE6
EllipticFunctions.agm
EllipticFunctions.am
EllipticFunctions.ellipticE
EllipticFunctions.ellipticF
EllipticFunctions.ellipticInvariants
EllipticFunctions.ellipticK
EllipticFunctions.ellipticPI
EllipticFunctions.ellipticZ
EllipticFunctions.etaDedekind
EllipticFunctions.halfPeriods
EllipticFunctions.jellip
EllipticFunctions.jtheta1
EllipticFunctions.jtheta1dash
EllipticFunctions.jtheta2
EllipticFunctions.jtheta3
EllipticFunctions.jtheta4
EllipticFunctions.jtheta_ab
EllipticFunctions.kleinj
EllipticFunctions.kleinjinv
EllipticFunctions.lambda
EllipticFunctions.ljtheta1
EllipticFunctions.ljtheta2
EllipticFunctions.ljtheta3
EllipticFunctions.ljtheta4
EllipticFunctions.qfromtau
EllipticFunctions.taufromq
EllipticFunctions.thetaC
EllipticFunctions.thetaD
EllipticFunctions.thetaN
EllipticFunctions.thetaS
EllipticFunctions.wp
EllipticFunctions.wsigma
EllipticFunctions.wzeta