diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/generic/labtex/xminus1.mf |
Initial commit
Diffstat (limited to 'macros/generic/labtex/xminus1.mf')
-rw-r--r-- | macros/generic/labtex/xminus1.mf | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/macros/generic/labtex/xminus1.mf b/macros/generic/labtex/xminus1.mf new file mode 100644 index 0000000000..e99076494a --- /dev/null +++ b/macros/generic/labtex/xminus1.mf @@ -0,0 +1,40 @@ +mode_setup;
+input labtex;
+u#=12pt#; if mode=smoke: u#:=.4pt#; fi
+nib#=.5pt#; if mode=smoke: nib#:=.1pt#; fi
+define_pixels(u, nib);
+beginchar(0, 12u#, 6u#, 0);
+ pickup pencircle scaled 2nib;
+ z1=(w/8,h); z2=(w/4, h/2); z3=(w/2, h/4); % points on the curve
+ z4=(w,h/8);
+ path p; p=z1..z2..z3..z4;
+ draw p; % draw the $1/x$ curve
+ z.x=point 2.6 of p; % another point
+ z5=(x2,0); z6=(x.x,0); % points on the $x$-axis
+ pickup pencircle scaled nib;
+ draw origin--(w,0); % bottom axis
+ draw z2--z5; draw z.x--z6; % vertical struts
+ pickup pencircle scaled 6nib;
+ drawdot z2; drawdot z.x; drawdot z5; drawdot z6;
+ save I; numeric I; I=0;
+ labtex(z2, z.x, z5, (x.x,0));
+endchar;
+
+beginchar(1, 12u#, 6u#, 0);
+ pickup pencircle scaled 2nib;
+ z1=(w/8,h); z2=(w/4, h/2); z3=(w/2, h/4); % points on the curve
+ z4=(w,h/8);
+ path p; p=z1..z2..z3..z4;
+ draw p; % draw the $1/x$ curve
+ z.x=point 2.6 of p; % another point
+ z5=(x2,0); z6=(x.x,0); % points on the $x$-axis
+ pickup pencircle scaled nib;
+ draw origin--(w,0); % bottom axis
+ draw z2--z5; draw z.x--z6; % vertical struts
+ pickup pencircle scaled 6nib;
+ drawdot z2; drawdot z.x; drawdot z5; drawdot z6;
+ save I; numeric I; I=0;
+ labtex(z2, z.x, z5, (x.x,0));
+endchar;
+
+bye.
|