texmf-dist/doc/metapost/mp-geom2d/exemples/fonctions/fonction1.mp
raw| 1 | input geom2d; |
| 2 | |
| 3 | labeloffset := 6; |
| 4 | gddU:=1.2cm; |
| 5 | |
| 6 | vardef f(expr x) = sqrt(x+3-4*sqrt(x-1))+sqrt(x+8-6*sqrt(x-1)) enddef; |
| 7 | |
| 8 | |
| 9 | beginfig(1); |
| 10 | |
| 11 | Repere(10,6,1,2,.8,0.8); |
| 12 | Axes; |
| 13 | Debut; |
| 14 | Graduations; Unites(1); |
| 15 | |
| 16 | trace Representation(f,1,12,100) avecCrayon(1.5,Indigo); |
| 17 | |
| 18 | pointe Point(5,1); |
| 19 | pointe Point(10,1); |
| 20 | |
| 21 | label.top(textext("\(y=\sqrt{x+3-4\sqrt{x-1}}+\sqrt{x+8-6\sqrt{x-1}}\)"), |
| 22 | (7,2.5) gddEnPlace) withcolor Olive; |
| 23 | Fin; |
| 24 | endfig; |
| 25 | end |