File: elliptic.dem

package info (click to toggle)
gnuplot 6.0.2%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 14,940 kB
  • sloc: ansic: 95,319; cpp: 7,590; makefile: 2,470; javascript: 2,328; sh: 1,531; lisp: 664; perl: 304; pascal: 191; tcl: 88; python: 46
file content (42 lines) | stat: -rw-r--r-- 1,305 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#
# Elliptic integrals of the third kind
#
save_encoding = GPVAL_ENCODING
set encoding utf8

set title "Complete elliptic integral of the third kind EllipticPi(n,k)"

set key reverse left Left
set key title "Π(n,k) = {/*2 ∫@_{/*0.5 0}^{/*.5 π/2}}"\
             ."{/:Italic [1-nsin^2(t)]^{-1} sqrt(1-k^2sin^2(t))^{-1} dt}\n"

set border 3
set margins 10,10,-1,4
set sample 250
set xrange [0:1]
set xtics 0.1 format "%.1f" nomirror
set yrange [0:6]
set ytics 1 nomirror
set xlabel "{/:Italic k}"

plot EllipticPi(0.5,x) with lines lw 2 title "n = 0.5", \
     EllipticPi(0.0,x) with lines lw 2 title "n = 0", \
     EllipticPi(-1.,x) with lines lw 2 title "n = -1", \
     EllipticPi(-3.,x) with lines lw 2 title "n = -3", \
     EllipticPi(-10.,x) with lines lw 2 lc "brown" title "n = -10"

pause -1 "<cr> to continue"

set title "Complete elliptic integrals of the first and second kinds"
set key notitle invert top center spacing 2
set xtics 0.5
set xlabel "x"
set xrange [-1:1]
set yrange [1:3]

plot EllipticE(x) lw 2 title "\nEllipticE(x)={/*1.5 ∫@_{/*0.5 0}^{/*.5 π/2}}{/:Italic sqrt(1-k^2sin^2(t)) dt}\n",\
     EllipticK(x) lw 2 title "\nEllipticK(x)={/*1.5 ∫@_{/*0.5 0}^{/*.5 π/2}}{/:Italic sqrt(1-k^2sin^2(t))^{-1} dt}\n"

pause -1 "<cr> to continue"
reset
set encoding save_encoding