From: Jean-Michel Sarlat Date: Mon, 5 Sep 2011 16:27:59 +0000 (+0200) Subject: De nouveaux exemples : représentations de fonctions X-Git-Url: https://melusine.eu.org/syracuse/G/git/?a=commitdiff_plain;h=a6fb5252f2681651f8552938cdb76f85f8f779a0;p=mp-gdd.git De nouveaux exemples : représentations de fonctions --- diff --git a/exemples/fonctions/LISTE.txt b/exemples/fonctions/LISTE.txt new file mode 100644 index 0000000..8a88154 --- /dev/null +++ b/exemples/fonctions/LISTE.txt @@ -0,0 +1,9 @@ +fonction1-1.png +fonction2-1.png +== Les sources +fonction1.mp +fonction2.mp +== Les PDF +fonction1-1.pdf +fonction2-1.pdf + diff --git a/exemples/fonctions/fonction1-1.pdf b/exemples/fonctions/fonction1-1.pdf new file mode 100644 index 0000000..03d492a Binary files /dev/null and b/exemples/fonctions/fonction1-1.pdf differ diff --git a/exemples/fonctions/fonction1-1.png b/exemples/fonctions/fonction1-1.png new file mode 100644 index 0000000..c951951 Binary files /dev/null and b/exemples/fonctions/fonction1-1.png differ diff --git a/exemples/fonctions/fonction1.mp b/exemples/fonctions/fonction1.mp new file mode 100644 index 0000000..72a6fad --- /dev/null +++ b/exemples/fonctions/fonction1.mp @@ -0,0 +1,42 @@ +input gdd; +input gdd-rep; +input gdd-lbl; +input gdd-tra; +input svgnames; + +lblPreambule := "\usepackage[frenchb]{babel}" & + "\usepackage[garamond]{mathdesign}" & + "\usepackage{amsmath}\usepackage{mflogo}"; + +input gdd-fct; +input gdd-plt; + +labeloffset := 6; +gddU:=1.2cm; + +vardef f(expr x) = sqrt(x+3-4*sqrt(x-1))+sqrt(x+8-6*sqrt(x-1)) enddef; + +def avecCrayon(expr t,c) = withpen pencircle scaled t withcolor c enddef; + + + +beginfig(1); + +Repere(10,6,1,2,.8,0.8); + Axes; + Debut; + Graduations; Unites(1); + + trace Representation(f,1,12,100) avecCrayon(1.5,Indigo); + + pointe Point(5,1); + pointe Point(10,1); + + label.top(TEX("\(y=\sqrt{x+3-4\sqrt{x-1}}+\sqrt{x+8-6\sqrt{x-1}}\)"), + (7,2.5) gddEnPlace) withcolor Olive; + Fin; + + +endfig; + +end \ No newline at end of file diff --git a/exemples/fonctions/fonction2-1.pdf b/exemples/fonctions/fonction2-1.pdf new file mode 100644 index 0000000..f9ece3b Binary files /dev/null and b/exemples/fonctions/fonction2-1.pdf differ diff --git a/exemples/fonctions/fonction2-1.png b/exemples/fonctions/fonction2-1.png new file mode 100644 index 0000000..5d86b93 Binary files /dev/null and b/exemples/fonctions/fonction2-1.png differ diff --git a/exemples/fonctions/fonction2.mp b/exemples/fonctions/fonction2.mp new file mode 100644 index 0000000..29621b0 --- /dev/null +++ b/exemples/fonctions/fonction2.mp @@ -0,0 +1,70 @@ +input gdd; +input gdd-rep; +input gdd-lbl; +input gdd-tra; +input svgnames; + +lblPreambule := "\usepackage[frenchb]{babel}" & + "\usepackage[garamond]{mathdesign}" & + "\usepackage{amsmath}\usepackage{mflogo}"; + +input gdd-fct; +input gdd-plt; + +labeloffset := 6; +gddU:=1.2cm; + +vardef f(expr x) = x*(Pi-x) enddef; % f +vardef g(expr x) = Pi-2*x enddef; % f' +vardef h(expr x) = -2 enddef; % f'' + +def avecCrayon(expr t,c) = withpen pencircle scaled t withcolor c enddef; + + + +beginfig(1); + +Repere(10,6,5,3,.8,0.8); +Axes; + Debut; + Graduations; + + trace (Pi,-2)--(Pi,2) dashed evenly; + trace (-Pi,-2)--(-Pi,2) dashed evenly; + + trace Representation(f,0,Pi,100) avecCrayon(1.5,Indigo); + trace (Representation(f,0,Pi,100) scaled -1) avecCrayon(1.5,Indigo); + trace (Representation(f,0,Pi,100) shifted (-2*Pi,0)) avecCrayon(1.5,Indigo); + trace (Representation(f,0,Pi,100) scaled -1 shifted (2*Pi,0)) avecCrayon(1.5,Indigo); + + trace Representation(g,0,Pi,100) avecCrayon(1.5,Olive); + trace (Representation(g,0,Pi,100) xscaled -1) avecCrayon(1.5,Olive); + trace (Representation(g,0,Pi,100) shifted (-2*Pi,0)) avecCrayon(1.5,Olive); + trace (Representation(g,0,Pi,100) xscaled -1 shifted (2*Pi,0)) avecCrayon(1.5,Olive); + + trace Representation(h,0,Pi,100) avecCrayon(1.5,Orange); + trace (Representation(h,0,Pi,100) scaled -1) avecCrayon(1.5,Orange); + trace (Representation(h,0,Pi,100) shifted (-2*Pi,0)) avecCrayon(1.5,Orange); + trace (Representation(h,0,Pi,100) scaled -1 shifted (2*Pi,0)) avecCrayon(1.5,Orange); + + pointe Point(Pi,2); + pointe Point(Pi,-2); + pointe Point(-Pi,2); + pointe Point(-Pi,-2); + + label.urt(TEX("\(-\pi\)"), (-Pi,0) gddEnPlace) withcolor Peru; + label.ulft(TEX("\(\pi\)"), (Pi,0) gddEnPlace) withcolor Peru; +Fin; + +trace (0,-0.5)--(1,-0.5) avecCrayon(1.5,Indigo); +label.rt(TEX("\(f\)"), (1,-0.5) gddEnPlace); +trace (2,-0.5)--(3,-0.5) avecCrayon(1.5,Olive); +label.rt(TEX("\(f'\)"), (3,-0.5) gddEnPlace); +trace (4,-0.5)--(5,-0.5) avecCrayon(1.5,Orange); +label.rt(TEX("\(f''\)"), (5,-0.5) gddEnPlace); +labeloffset := 0; +label.lft(TEX("\MP{}"), (10,-0.5) gddEnPlace); + +endfig; + +end \ No newline at end of file diff --git a/exemples/fonctions/index.xml b/exemples/fonctions/index.xml new file mode 100644 index 0000000..fac2ec6 --- /dev/null +++ b/exemples/fonctions/index.xml @@ -0,0 +1,3 @@ + + mp-gdd – Représentations de fonctions + \ No newline at end of file