# $Id: curves.dem , by Robert Billon , 1999 # set title "DEMO GNUPLOT LINUX" set nokey #set zeroaxis set xrange [0:20] set yrange [0:10] set label 1 " ### ### # # #### #### ##### ### " at 6,9 set label 2 "# # # # # # # # # # # # #" at 6,8.8 set label 3 "# # # # # # # #### #### # " at 6,8.6 set label 4 "# # # # # #### # # # ## " at 6,8.4 set label 5 "# # # # # # # # # # # # #" at 6,8.2 set label 7 " ### ### ### # # #### ##### ### " at 6,8 set label 8 "(C) Robert Billon, 1999, 2001" at 7,6 a=10000; b=200000 plot a*x replot -a*x+b replot 10 replot 7 replot 5 replot 0 set nolabel pause 5 # # Exponent 1 # set title "SINUSOIDES AMORTIES (1)" set nopolar set zeroaxis set samples 1000 set label 1 "y = A * exp(-B * x) * sin(omega * x + phi)" at 10,380 set label 2 "(1) Variation de la phase phi" at 10,350 set xrange [-400:400] set yrange [-400:400] A=100; B=0.0035; omega=pi/100 plot A*exp(-B*x)*sin(omega*x+0) replot A*exp(-B*x)*sin(omega*x+0.4) replot A*exp(-B*x)*sin(omega*x+0.8) replot A*exp(-B*x)*sin(omega*x+1.2) replot A*exp(-B*x)*sin(omega*x+1.6) replot A*exp(-B*x)*sin(omega*x+2.0) replot A*exp(-B*x)*sin(omega*x+2.4) replot A*exp(-B*x)*sin(omega*x+2.8) set samples 160 set polar set nolabel 1 set nolabel 2 pause 5 # # Exponent 2 # set title "SINUSOIDES AMORTIES (2)" set nopolar set samples 1000 set label 1 "y = A * exp(-B * x) * sin(omega * x + phi)" at 10,380 set label 2 "(2) Variation de la pulsation omega" at 10,350 set xrange [-400:400] set yrange [-400:400] A=100; B=0.0035; omega=pi/180 plot A*exp(-B*x)*sin(omega*x) replot A*exp(-B*x)*sin((pi/170)*x) replot A*exp(-B*x)*sin((pi/160)*x) replot A*exp(-B*x)*sin((pi/150)*x) replot A*exp(-B*x)*sin((pi/140)*x) replot A*exp(-B*x)*sin((pi/130)*x) replot A*exp(-B*x)*sin((pi/120)*x) replot A*exp(-B*x)*sin((pi/110)*x) set samples 160 set polar set nolabel 1 set nolabel 2 pause 5 # # Exponent 3 # set title "SINUSOIDES AMORTIES (3)" set nopolar set samples 1000 set label 1 "y = A * exp(-B * x) * sin(omega * x + phi)" at 10,380 set label 2 "(3) Variation du facteur d'amortissement B" at 10,350 set xrange [-400:400] set yrange [-400:400] A=100; B=0.0040; omega=pi/100 plot A*exp(-B*x)*sin(omega*x+0) replot A*exp(-0.0036*x)*sin(omega*x) replot A*exp(-0.0032*x)*sin(omega*x) replot A*exp(-0.0028*x)*sin(omega*x) replot A*exp(-0.0024*x)*sin(omega*x) replot A*exp(-0.0020*x)*sin(omega*x) replot A*exp(-0.0016*x)*sin(omega*x) replot A*exp(-0.0012*x)*sin(omega*x) set samples 160 set nolabel 1 set nolabel 2 pause 5 # # Gauss # set title "COURBES DE GAUSS" set nopolar set label 1 "y = A * (1/sigma * sqrt(2 * pi)) * exp(-x^2/sigma^2)" at -50,9.5 set label 2 "Variation de sigma" at -50,9 set xrange [-50:50] set yrange [-1:10] A=75; K=1; sigma=20*sqrt(K) plot A*(1/(20*sqrt(1))*sqrt(2*pi))*exp(-x**2/sigma**2) replot A*(1/(20*sqrt(1.5))*sqrt(2*pi))*exp(-x**2/sigma**2) replot A*(1/(20*sqrt(2.25))*sqrt(2*pi))*exp(-x**2/sigma**2) replot A*(1/(20*sqrt(3.37))*sqrt(2*pi))*exp(-x**2/sigma**2) replot A*(1/(20*sqrt(5.06))*sqrt(2*pi))*exp(-x**2/sigma**2) replot A*(1/(20*sqrt(7.6))*sqrt(2*pi))*exp(-x**2/sigma**2) replot A*(1/(20*sqrt(11.4))*sqrt(2*pi))*exp(-x**2/sigma**2) replot A*(1/(20*sqrt(17))*sqrt(2*pi))*exp(-x**2/sigma**2) set nolabel 1 set nolabel 2 pause 5 # # Strophoide # set title "STROPHOIDES" set polar set zeroaxis set label 1 "r = (A * cos(2 * t)/cos(t)" at -10,4 set trange [0:pi] set rrange [0:12] set xrange [-12:+12] set yrange [-8:+8] A=1.0; B=2; C=3; D=4; E=5; F=6; G=7; H=8 plot (A*cos(2*t))/cos(t) notitle, -(A*cos(2*t))/cos(t) notitle replot (B*cos(2*t))/cos(t) notitle, -(B*cos(2*t))/cos(t) notitle replot (C*cos(2*t))/cos(t) notitle, -(C*cos(2*t))/cos(t) notitle replot (D*cos(2*t))/cos(t) notitle, -(D*cos(2*t))/cos(t) notitle replot (E*cos(2*t))/cos(t) notitle, -(E*cos(2*t))/cos(t) notitle replot (F*cos(2*t))/cos(t) notitle, -(F*cos(2*t))/cos(t) notitle replot (G*cos(2*t))/cos(t) notitle, -(G*cos(2*t))/cos(t) notitle replot (H*cos(2*t))/cos(t) notitle, -(H*cos(2*t))/cos(t) notitle set nolabel set nopolar pause 5 # # Lemniscate # set polar set zeroaxis set title "LEMNISCATES" set label 1 "r = A * sqrt(2 * cos(2 * t))" at -8,5 set label 2 "Variation de A" at -8,4.5 set trange [-pi/4:pi/4] set rrange [0:10] set xrange [-10:10] set yrange [-5:5] A=1; B=2; C=3; D=4; E=5; F=6; G=7 plot A*sqrt(2*cos(2*t)) notitle,-A*sqrt(2*cos(2*t)) notitle replot B*sqrt(2*cos(2*t)) notitle,-B*sqrt(2*cos(2*t)) notitle replot C*sqrt(2*cos(2*t)) notitle,-C*sqrt(2*cos(2*t)) notitle replot D*sqrt(2*cos(2*t)) notitle,-D*sqrt(2*cos(2*t)) notitle replot E*sqrt(2*cos(2*t)) notitle,-E*sqrt(2*cos(2*t)) notitle replot F*sqrt(2*cos(2*t)) notitle,-F*sqrt(2*cos(2*t)) notitle replot G*sqrt(2*cos(2*t)) notitle,-G*sqrt(2*cos(2*t)) notitle set nopolar set nolabel pause 5 # # Conchoide # set polar set zeroaxis set title "CONCHOIDES DE NICOMEDE " set trange [0:2*pi] set rrange [0:15] set xrange [-10:10] set yrange [-10:10] set label 1 "rho = a /cos(phi) + L" at -8,7 set label 2 "Variation de L" at -8,6 a = 1; l = 1 plot a/cos(t)+l notitle replot a/cos(t)+2*l notitle replot a/cos(t)+3*l notitle replot a/cos(t)+4*l notitle replot a/cos(t)+5*l notitle replot a/cos(t)+6*l notitle replot a/cos(t)+7*l notitle replot a/cos(t)+8*l notitle set nopolar set nolabel pause 5 # # Limacon 1 # set title "LIMAÇONS DE PASCAL (1)" set polar set zeroaxis set label 1 "r = A * cos(t) + L" at 8,7 set label 2 "(1) Variation de A" at 8,6 set label 3 "L = 3" at 8,6.5 set offsets 0,0,-1.4,-1.4 set trange [-pi:pi] set rrange [0:12] set xrange [-5:+15] set yrange [-8:+8] A=1; B=2.5; C=4; D=5.5; E=7; F=8.5 L=3 #L=1; M=2; N=3; P=4; Q=5; R=6 plot A*cos(t)+L notitle,B*cos(t)+L notitle,C*cos(t)+L notitle,\ D*cos(t)+L notitle,E*cos(t)+L notitle,F*cos(t)+L notitle set nolabel set nooffsets set nopolar pause 5 # # Limacon 2 # set title "LIMAÇONS DE PASCAL (2)" set polar set zeroaxis set label 1 "r = A * cos(t) + L" at 8,7 set label 2 "(2) Variation de L" at 8,6 set label 3 "A = 5" at 8,6.5 set offsets 0,0,-1.4,-1.4 set trange [-pi:pi] set rrange [0:12] set xrange [-5:+15] set yrange [-8:+8] A=5 #A=1; B=2.5; C=4; D=5.5; E=7; F=8.5 L=1; M=2; N=3; P=4; Q=5; R=6 plot A*cos(t)+L notitle,A*cos(t)+M notitle,A*cos(t)+N notitle,\ A*cos(t)+P notitle,A*cos(t)+Q notitle,A*cos(t)+R notitle set nolabel set nooffsets set nopolar pause 5 # # Cissoide # set title "CISSOIDES" set polar set zeroaxis set label 1 "r = (A * sin(t)^2)/cos(t)" at 3,2 set label 2 "Variation de A" at 3,1 set trange [0:pi] set rrange [0:15] set xrange [-5:5] set yrange [-10:10] A=0.5; B=1.5; C=2.5;D=3.5; E=4.5; F=5.5; G=6.5; H=7.5 plot (A*sin(t)**2)/cos(t) notitle, -(A*sin(t)**2)/cos(t) notitle replot (B*sin(t)**2)/cos(t) notitle, -(B*sin(t)**2)/cos(t) notitle replot (C*sin(t)**2)/cos(t) notitle, -(C*sin(t)**2)/cos(t) notitle replot (D*sin(t)**2)/cos(t) notitle, -(D*sin(t)**2)/cos(t) notitle replot (E*sin(t)**2)/cos(t) notitle, -(E*sin(t)**2)/cos(t) notitle replot (F*sin(t)**2)/cos(t) notitle, -(F*sin(t)**2)/cos(t) notitle replot (G*sin(t)**2)/cos(t) notitle, -(G*sin(t)**2)/cos(t) notitle replot (H*sin(t)**2)/cos(t) notitle, -(H*sin(t)**2)/cos(t) notitle set nolabel set nopolar pause 5 # # Spirales d'Archimede # set title "SPIRALES D'ARCHIMEDE (1)" set polar set zeroaxis set label 1 "rho = A * phi" at 40,20 set label 2 "Variation de phi : 0 a 2 * pi" at 40,16 set label 3 "Variation de A : 1 a 10" at 40,12 set autoscale set key outside bottom set trange [0:2*pi] plot 1*t replot 2*t replot 3*t replot 4*t replot 5*t replot 6*t replot 7*t replot 8*t replot 9*t replot 10*t #replot 11*t #replot 12*t #replot 13*t #replot 14*t #replot 15*t #replot 16*t #replot 17*t #replot 18*t# #replot 19*t #replot 20*t pause 5 # set title "SPIRALES D'ARCHIMEDE (2)" set label 1 "rho = A * phi" at 18,26 set label 2 "Variation de phi : -3 * pi/2 a + 3 * pi/2" at 14,23 set label 3 "Variation de A : 1 a 10" at 14,20 set autoscale set key outside bottom set trange [-3*pi/2:3*pi/2] plot 1*t replot 2*t replot 3*t replot 4*t replot 5*t replot 6*t replot 7*t replot 8*t replot 9*t replot 10*t pause 5 set nolabel set nopolar # # Folium # set title "FOLIUM DE DESCARTES" set label 1 "x = (3 * A * t)/(1 + t^3)" at -10,-5 set label 2 "y = (3 * A * t^2)/(1 + t^3)" at -10,-6 set label 3 "Variation de A" at -10,-7 set parametric set samples 1000 set trange [-15:15] set xrange [-15:15] set yrange [-15:15] set offsets 0,0,-2,-2 A=1; B=2; C=3; D=4; E=5; F=6; G=7; H=8 plot (3*A*t)/(1+t**3) notitle, (3*A*t**2)/(1+t**3) notitle replot (3*B*t)/(1+t**3) notitle, (3*B*t**2)/(1+t**3) notitle replot (3*C*t)/(1+t**3) notitle, (3*C*t**2)/(1+t**3) notitle replot (3*D*t)/(1+t**3) notitle, (3*D*t**2)/(1+t**3) notitle replot (3*E*t)/(1+t**3) notitle, (3*E*t**2)/(1+t**3) notitle replot (3*F*t)/(1+t**3) notitle, (3*F*t**2)/(1+t**3) notitle replot (3*G*t)/(1+t**3) notitle, (3*G*t**2)/(1+t**3) notitle replot (3*H*t)/(1+t**3) notitle, (3*H*t**2)/(1+t**3) notitle set samples 160 set nooffsets set noparametric set nolabel pause 5 # # Agnesi # set title "BOUCLES D'AGNESI" set zeroaxis set label 1 "y = a^3/(a^2 + x^2)" at -20,0.9 set label 2 "Variation de a" at -20,0.85 set xrange [-25:25] set yrange [-0.1:+1.0] a=1 plot a**3/(a**2+x**2) notitle replot 5*a**3/(5*a**2+x**2) replot 10*a**3/(10*a**2+x**2) replot 15*a**3/(15*a**2+x**2) replot 20*a**3/(20*a**2+x**2) replot 25*a**3/(25*a**2+x**2) replot 30*a**3/(30*a**2+x**2) replot 35*a**3/(35*a**2+x**2) set nolabel pause 5 # # Butterfly # set polar set zeroaxis set title "PAPILLON ?" set offsets -1,0,-2.2,-2.2 set trange [-pi:pi] set rrange [0:+5] set xrange [-4:+4] set yrange [-5:+5] set label 1 "r = exp(cos(t))-2*cos(4*t)+sin(t/12)^5" at -5,-3 set nokey butterfly(t)=exp(cos(t))-2*cos(4*t)+sin(t/12)**5 set samples 2000 plot butterfly(t),butterfly(t)+0.1,butterfly(t)-0.1,butterfly(t)+0.2,\ butterfly(t)-0.2, butterfly(t)+0.3,butterfly(t)-0.3 set nolabel 1 set offsets 0,0,0,0 set nopolar set nozeroaxis pause 10 # # clean up # set nolabel set xrange [-10:10] set yrange [-10:10] set zrange [-10:10] set nocontour set nogrid set nohidden3d set samples 100 set isosamples 10 set view 60,30,1,1 set auto set title "" 0,0 reset