ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: David Arnold <darnold@northcoast.com>
Cc: ntg-context@ntg.nl
Subject: Re: no mp-cont.mp and Co.
Date: Mon, 12 Jun 2000 16:36:24 -0700	[thread overview]
Message-ID: <3.0.5.32.20000612163624.0089d8b0@mail.northcoast.com> (raw)
In-Reply-To: <00061217481300.00217@leonore>

[-- Attachment #1: Type: text/plain, Size: 1567 bytes --]

Uwe,

I don't know if this is what you are looking for, but I've attached a
metapost file that I used for the images in a pretest.

If you compile it, then you should get a whole lot of images, named
pretest.1 through pretest.31.

>Thank you for your precise and satisfying answers!
>
>You wrote on Sam, 10 Jun 2000:
>>At 07:12 PM 6/10/2000 +0200, you wrote:
>>
>>No reason to be desperate about that. This graphic is only available when I
>>process the files here, since all the logo's are in our big company logo mp
>>file, which, as you can understand is not public. The next doc styles btw
>>will not have that message (but still a graphic, I made a new one, so that
>>I can recognize what is typeset here -).
>
>Just to sort it out right:
>the lines responsible for making metapost create a bunch of logo files are:
>   \startMPrun
>      mpgraph := #1 ; 
>      input mp-cont ; 
>   \stopMPrun
>and mp-cont.mp is the metapost source of your company graphics -- right?
>You know that the logo that you want to place on the frontmatter is
>mprun.512.
>
>Is there an example for such a metapost source that produces a bunch of
>pictures? 
>
>>
>>>And last:  I thought the core-fig.tex bug is gone away -- is
>>
>>Remind me, what bug? 
>
>"% TOBIAS" and "% TOM"
>
>>
>>>Have a nice evening ;-)
>>
>
>All this good wishes back to you :-)))
>
>Uwe
>
>
>-- 
>mailto:koloska@rcs.urz.tu-dresden.de
>http://rcswww.urz.tu-dresden.de/~koloska/
>--                                    --
>right now the web page is in german only
>but this will change as time goes by ;-)
>
>

[-- Attachment #2: pretest.mp --]
[-- Type: text/plain, Size: 24087 bytes --]

input mp-tool;

prologues:=0;

%pi
numeric pi;
pi:=3.14159;

%cos function for radian input
def cos(expr x)=
 cosd(180/pi*x)
enddef;

%sin function for radian input
def sin(expr x)=
 sind(180/pi*x)
enddef;

%xtick marks
def xtick(expr p)=
 draw ((0,-2pt)--(0,2pt)) shifted p;
enddef;

%ytick marks
def ytick(expr p)=
 draw ((-2pt,0)--(2pt,0)) shifted p;
enddef;

beginfig(1);

%initialize scaling
numeric u;
10u=2in;

%Initialize vertices
pair A, B, C;
A:=(0,0);
B:=(10u,0);
C:=A+whatever*dir(43)=B+whatever*up;

%Draw and label the triangle
draw A--B--C--cycle;
label.llft(btex $A$ etex, A);
label.lrt(btex $B$ etex, B);
label.top(btex $C$ etex, C);
label(btex $43^\circ$ etex, 2u*dir(20));
label.rt(btex $a$ etex, 0.5[B,C]);
label.ulft(btex $b$ etex, 0.5[A,C]);
label.bot(btex $10$ etex, 0.5[A,B]);

endfig;

beginfig(2);

%initialize scaling
numeric u;
10u=2.5in;

%Initialize vertices
pair A, B, C;
A:=(0,0);
C:=(0,5u);
B:=A+whatever*right=C+whatever*dir(-35);

%Draw and label the triangle
draw A--B--C--cycle;
label.llft(btex $A$ etex, A);
label.lrt(btex $B$ etex, B);
label.top(btex $C$ etex, C);
label.urt(btex $10$ etex, 0.5[B,C]);
label.ulft(btex $5$ etex, 0.5[A,C]);
label.bot(btex $c$ etex, 0.5[A,B]);

endfig;

beginfig(3);

%initialize scaling
numeric u;
10u=2in;

%Initialize vertices
pair A, B, C;
A:=(0,0);
C:=A+7u*dir(40);
B:=A+whatever*right=C+whatever*dir(-asin(7*sind(40)/10)*180/pi);

%Draw and label the triangle
draw A--B--C--cycle;
label.llft(btex $A$ etex, A);
label.lrt(btex $B$ etex, B);
label.top(btex $C$ etex, C);
label.urt(btex $10$ etex, 0.5[B,C]);
label.ulft(btex $7$ etex, 0.5[A,C]);
label.bot(btex $c$ etex, 0.5[A,B]);
label(btex $40^\circ$ etex, 1.5u*dir(20));

endfig;

beginfig(4);

%initialize scaling
numeric u;
10u=2.5in;

%Initialize angle mA
numeric mA;
mA:=(acos(60/84))*180/pi;

%Initialize vertices
pair A, B, C;
A:=(0,0);
B:=(6u,0);
C:=A+7u*dir(mA);

%Draw and label the triangle
draw A--B--C--cycle;
label.llft(btex $A$ etex, A);
label.lrt(btex $B$ etex, B);
label.top(btex $C$ etex, C);
label.urt(btex $5$ etex, 0.5[B,C]);
label.ulft(btex $7$ etex, 0.5[A,C]);
label.bot(btex $6$ etex, 0.5[A,B]);

endfig;

beginfig(5);

%initialize scaling
numeric u;
10u=2.5in;

%Initialize vertices
pair A, B, C;
A:=(0,0);
B:=(15u,0);
C:=A+10u*dir(30);

%Draw and label the triangle
draw A--C;
draw A--B;
label.llft(btex $A$ etex, A);
label.lrt(btex $B$ etex, B);
label.top(btex $C$ etex, C);
label.ulft(btex $10$ etex, 0.5[A,C]);
label.urt(btex $30^\circ$ etex, 1u*dir(8));

%Draw and rotate remaining side
pair D;
D:=C+4u*dir(-30);
drawarrow C--D;
label.urt(btex $4$ etex, 0.5[C,D]);
path p;
p:=D{dir(-120)}..(C+4u*down){left}..(C+4u*dir(-150)){dir(-240)};
draw p dashed evenly withcolor red;

%Draw shortest distance across
pair E;
E:=A+whatever*right=C+whatever*down;
draw C--E dashed evenly withcolor green;
label.rt(btex $h$ etex, 0.5[C,E]);

endfig;

beginfig(6);

%initialize scale
numeric u;
200u=2in;

%initialize vertices
pair A, B, C, D;
A:=(0,0);
B=(200u,0);
C:=A+whatever*dir(40)=B+whatever*up;
D:=A+whatever*dir(30)=B+whatever*up;

%Draw and label figure;
draw A--B--C--cycle;
draw A--D;
label.llft(btex $A$ etex, A);
label.lrt(btex $B$ etex, B);
label.rt(btex $D$ etex, D);
label.top(btex $C$ etex, C);
label.rt(btex $x$ etex, 0.5[D,C]);
label.rt(btex $h$ etex, 0.5[D,B]);
label.bot(btex $200$ etex,0.5[A,B]);

%Mark and label angles
path p;
p:=right{up}..dir(30){dir(120)};
drawarrow p scaled 20u;
label.rt(btex $30^\circ$ etex, 20u*dir(20));
p:=right{up}..dir(40){dir(130)};
drawarrow p scaled 50u;
label.rt(btex $40^\circ$ etex, 50u*dir(20));

endfig;

beginfig(7);

%initialize scaling
numeric u;
10u=2in;

%Initialize vertices
pair A, B, C;
A:=(0,0);
B:=(10u,0);
C:=A+7u*dir(44);

%Draw and label the triangle
draw A--B--C--cycle;
label.llft(btex $A$ etex, A);
label.lrt(btex $B$ etex, B);
label.top(btex $C$ etex, C);
label(btex $40^\circ$ etex, 1.5u*dir(20));
label.urt(btex $a$ etex, 0.5[B,C]);
label.ulft(btex $7$ etex, 0.5[A,C]);
label.bot(btex $10$ etex, 0.5[A,B]);

endfig;

beginfig(8);

%Initialize scale
numeric u;
1u=1in;

%Initialize axes
pair x,y;
x:=(1.2u,0);
y:=(0,1.2u);

%draw axes
drawdblarrow (-x)--x;
drawdblarrow (-y)--y;

%draw the unit circle
path p;
p:=fullcircle scaled 2u;
draw p;

%initialize points on the unit circle
z0=(1u,0);
z1=z0 rotated 30;
z2=z0 rotated 45;
z3=z0 rotated 60;
z4=z0 rotated 90;
z5=z0 rotated 120;
z6=z0 rotated 135;
z7=z0 rotated 150;

%auxiliary lines
draw z1--(-z1) dashed evenly withcolor red;
draw z2--(-z2) dashed evenly withcolor red;
draw z3--(-z3) dashed evenly withcolor red;
draw z5--(-z5) dashed evenly withcolor red;
draw z6--(-z6) dashed evenly withcolor red;
draw z7--(-z7) dashed evenly withcolor red;

%label (1,0)
dotlabel.urt(btex $(1,0)$ etex, z0);

%highlight point at 22pi/3
draw (0,0)--(-z3) withcolor blue;
path p;
p:=right{up}..up{left}..left{down}..dir(240){dir(330)};
drawarrow p scaled 0.1u;
picture pic;
pic:=thelabel.ulft(btex $4\pi/3$ etex,0.1u*dir(135));
unfill bbox pic;
draw pic;
dotlabel.llft(btex $(-1/2,-\sqrt3/2)$ etex, -z3);

endfig;

beginfig(9);

%Initialize scale
numeric u;
1u=1in;

%Initialize axes
pair x,y;
x:=(1.2u,0);
y:=(0,1.2u);

%draw axes
drawdblarrow (-x)--x;
drawdblarrow (-y)--y;

%initialize points on the unit circle
z0=(0,0);
z1=(1,0) rotated 160;
z2=(1,0) rotated 20;

%draw and label angle
drawarrow z0--(z1 scaled u) withcolor blue;
path p;
p:=right{up}..up{left}..z1{dir(250)};
drawarrow p scaled 0.1u;
label.urt(btex $\theta$ etex, 0.1u*dir(70));

endfig;

beginfig(10);

%Initialize scale
numeric u;
1u=1in;

%Initialize axes
pair x,y;
x:=(1.2u,0);
y:=(0,1.2u);

%draw axes
drawdblarrow (-x)--x;
drawdblarrow (-y)--y;

%initialize points on the unit circle
z0=(0,0);
z1=(1,0) rotated 160;
z2=(1,0) rotated 20;

%draw and label angle
drawarrow z0--(z1 scaled u) withcolor blue;
drawarrow z0--(z2 scaled u) withcolor red;
path p;
p:=right{up}..z2{dir(110)};
drawarrow p scaled 0.4u;
label.urt(btex $\pi-\theta$ etex, 0.4u*dir(3));

endfig;

beginfig(11);

%Initialize scale
numeric u;
5u=1in;

%Initialize axes
pair x,y;
x:=(5u,0);
y:=(0,5u);

%draw axes
drawdblarrow (-x)--x;
drawdblarrow (-y)--y;

%draw angle
z0=(0,0);
z1=(-3u,-4u);
draw z0--z1 withcolor blue;

%label endpoint
dotlabel.llft(btex $(-3,y)$ etex, z1);

%label radius
label.lrt(btex $5$ etex, 0.5[z0,z1]);

%mark and label angle
path p;
p:=right{up}..up{left}..left{down}..unitvector(z1);
drawarrow p scaled 0.5u;
label.ulft(btex $\theta$ etex, 0.5u*dir(135));

endfig;

beginfig(12);

%Define function to be drawn
def f(expr x)=
 -2*sin(2*x-pi/3)
enddef;

%Declare and initialize viewing window
numeric xmin, xmax, ymin, ymax;
xmin=0;
xmax=2*pi;
ymin=-3.5;
ymax=3.5;

%Declare and initialize scaling variables
numeric ux, uy;
(xmax-xmin)*ux=3in;
(ymax-ymin)*uy=2in;

%Declare and initialize clipping boundary
path q;
q:=(xmin,ymin)--(xmin,ymax)--(xmax,ymax)--(xmax,ymin)--cycle;
q:=q xscaled ux yscaled uy;

%Declare and initialize number of plotted points
numeric N;
N:=500;

%Declare and calculate plotting increment delta x
numeric dx;
dx:=(xmax-xmin)/N;

%Declare and create function path
path p;
p:=(xmin,f(xmin));
for x=xmin step dx until xmax:
 p:=p--(x,f(x));
endfor;
p:=p--(xmax,f(xmax));

%Scale function path
p:=p xscaled ux yscaled uy;

%Clip function path
draw p;
clip currentpicture to q;

%Save and clear the function path
picture pic;
pic:=currentpicture;
clearit;

%Draw and label coordinate axes
draw (xmin*ux,0)--(xmax*ux,0);
label.rt(btex $\theta$ etex,(xmax*ux,0));
drawdblarrow (0,ymin*uy)--(0,ymax*uy);
label.top(btex $y$ etex,(0,ymax*uy));

%Superimpose function plot
draw pic withcolor blue;

%xtick marks
for k=0 step pi/2 until 2*pi:
 xtick((k*ux,0))
endfor;
xtick ((2*pi*ux,0));

%label xticks
label.bot(btex $\pi$ etex, (pi*ux,0));
label.bot(btex $2\pi$ etex, (2*pi*ux,0));

%ytick marks
for k=-3 step 1 until 3:
 ytick((0,k*uy))
endfor;

%label yticks
label.lft(btex $3$ etex, (0,3uy));
label.lft(btex $-3$ etex, (0,-3uy));

endfig;

beginfig(13);

%Define function to be drawn
def f(expr x)=
 -2*cos(2*x)
enddef;

%Declare and initialize viewing window
numeric xmin, xmax, ymin, ymax;
xmin=0;
xmax=2*pi;
ymin=-3.5;
ymax=3.5;

%Declare and initialize scaling variables
numeric ux, uy;
(xmax-xmin)*ux=3in;
(ymax-ymin)*uy=2in;

%Declare and initialize clipping boundary
path q;
q:=(xmin,ymin)--(xmin,ymax)--(xmax,ymax)--(xmax,ymin)--cycle;
q:=q xscaled ux yscaled uy;

%Declare and initialize number of plotted points
numeric N;
N:=500;

%Declare and calculate plotting increment delta x
numeric dx;
dx:=(xmax-xmin)/N;

%Declare and create function path
path p;
p:=(xmin,f(xmin));
for x=xmin step dx until xmax:
 p:=p--(x,f(x));
endfor;
p:=p--(xmax,f(xmax));

%Scale function path
p:=p xscaled ux yscaled uy;

%Clip function path
draw p;
clip currentpicture to q;

%Save and clear the function path
picture pic;
pic:=currentpicture;
clearit;

%Draw and label coordinate axes
draw (xmin*ux,0)--(xmax*ux,0);
label.rt(btex $\theta$ etex,(xmax*ux,0));
drawdblarrow (0,ymin*uy)--(0,ymax*uy);
label.top(btex $y$ etex,(0,ymax*uy));

%Superimpose function plot
draw pic withcolor blue;

%xtick marks
for k=0 step pi/2 until 2*pi:
 xtick((k*ux,0))
endfor;
xtick ((2*pi*ux,0));

%label xticks
label.bot(btex $\pi$ etex, (pi*ux,0));
label.bot(btex $2\pi$ etex, (2*pi*ux,0));

%ytick marks
for k=-3 step 1 until 3:
 ytick((0,k*uy))
endfor;

%label yticks
label.lft(btex $3$ etex, (0,3uy));
label.lft(btex $-3$ etex, (0,-3uy));

endfig;

beginfig(14);

%Define function to be drawn
def f(expr x)=
 sin(x)
enddef;

%Declare and initialize viewing window
numeric xmin, xmax, ymin, ymax;
xmin=-2*pi;
xmax=2*pi;
ymin=-1.5;
ymax=1.5;

%Declare and initialize scaling variables
numeric ux, uy;
(xmax-xmin)*ux=3in;
(ymax-ymin)*uy=2in;

%Declare and initialize clipping boundary
path q;
q:=(xmin,ymin)--(xmin,ymax)--(xmax,ymax)--(xmax,ymin)--cycle;
q:=q xscaled ux yscaled uy;

%Declare and initialize number of plotted points
numeric N;
N:=500;

%Declare and calculate plotting increment delta x
numeric dx;
dx:=(xmax-xmin)/N;

%Declare and create function path
path p;
p:=(xmin,f(xmin));
for x=xmin step dx until xmax:
 p:=p--(x,f(x));
endfor;
p:=p--(xmax,f(xmax));

%Scale function path
p:=p xscaled ux yscaled uy;

%Clip function path
draw p;
clip currentpicture to q;

%Save and clear the function path
picture pic;
pic:=currentpicture;
clearit;

%Draw and label coordinate axes
draw (xmin*ux,0)--(xmax*ux,0);
label.rt(btex $x$ etex,(xmax*ux,0));
drawdblarrow (0,ymin*uy)--(0,ymax*uy);
label.top(btex $y$ etex,(0,ymax*uy));

%Superimpose function plot
draw pic withcolor blue;

%xtick marks
for k=-2*pi step pi/2 until 2*pi:
 xtick((k*ux,0))
endfor;
xtick ((2*pi*ux,0));

%label xticks
label.bot(btex $-2\pi$ etex, (-2*pi*ux,0));
label.top(btex $2\pi$ etex, (2*pi*ux,0));

%ytick marks
for k=-1 step 1 until 1:
 ytick((0,k*uy))
endfor;

%label yticks
label.lft(btex $1$ etex, (0,1uy));
label.lft(btex $-1$ etex, (0,-1uy));

%restrict domain
xmin:=-pi/2;
xmax:=pi/2;
p:=(xmin,f(xmin));
for x=xmin step dx until xmax:
 p:=p--(x,f(x));
endfor;
p:=p--(xmax,f(xmax));

%Scale function path
p:=p xscaled ux yscaled uy;

%draw restricted domain
pickup pencircle scaled 2pt;
draw p withcolor red;
pickup defaultpen;

endfig;

beginfig(15);

%Define function to be drawn
def f(expr x)=
 asin(x)
enddef;

%Declare and initialize viewing window
numeric xmin, xmax, ymin, ymax;
xmin=-1;
xmax=1;
ymin=-2;
ymax=2;

%Declare and initialize scaling variables
numeric ux, uy;
(xmax-xmin)*ux=2in;
(ymax-ymin)*uy=3in;

%Declare and initialize clipping boundary
path q;
q:=(xmin,ymin)--(xmin,ymax)--(xmax,ymax)--(xmax,ymin)--cycle;
q:=q xscaled ux yscaled uy;

%Declare and initialize number of plotted points
numeric N;
N:=500;

%Declare and calculate plotting increment delta x
numeric dx;
dx:=(xmax-xmin)/N;

%Declare and create function path
path p;
p:=(xmin,f(xmin));
for x=xmin step dx until xmax:
 p:=p--(x,f(x));
endfor;
p:=p--(xmax,f(xmax));

%Scale function path
p:=p xscaled ux yscaled uy;

%Clip function path
draw p;
clip currentpicture to q;

%Save and clear the function path
picture pic;
pic:=currentpicture;
clearit;

%Draw and label coordinate axes
draw (xmin*ux,0)--(xmax*ux,0);
label.rt(btex $x$ etex,(xmax*ux,0));
drawdblarrow (0,ymin*uy)--(0,ymax*uy);
label.top(btex $y$ etex,(0,ymax*uy));

%Superimpose function plot
draw pic withcolor blue;

%xtick marks
for k=-1 step 1 until 1:
 xtick((k*ux,0))
endfor;

%label xticks
label.bot(btex $-1$ etex, (-1*ux,0));
label.bot(btex $1$ etex, (1*ux,0));

%ytick marks
ytick((0,asin(1)*uy))
ytick((0,asin(-1)*uy))

%label yticks
label.lft(btex $\pi/2$ etex, (0,(asin(1))*uy));
label.rt(btex $-\pi/2$ etex, (0,(asin(-1))*uy));

endfig;

beginfig(16);

%initialize scaling
numeric u;
3u=1in;

%initialize axes
pair x, y;
x:=(-3u,0);
y:=(0,-3u);

%draw axes
drawdblarrow x--(-x);
drawdblarrow y--(-y);

%initialize endpoints of radius
pair A, B;
z0=(0,0);
z1=(1u,-2u);

%draw and label radius
draw z0--z1 withcolor blue;
label.llft(btex $r$ etex, 0.5[z0,z1]);

%label endpoint
dotlabel.lrt(btex $(1,-2)$ etex, z1);

%draw and label angle
path p;
p:=right{down}..unitvector(z1){dir(angle(z1)-90)};
drawarrow p scaled 0.5u;
label.lrt(btex $\theta$ etex, 0.5u*dir(-30));

endfig;

beginfig(17);

%initialize scaling
numeric u;
3u=1in;

%initialize axes
pair x, y;
x:=(-3u,0);
y:=(0,-3u);

%draw axes
drawdblarrow x--(-x);
drawdblarrow y--(-y);

%initialize endpoints of radius
pair A, B;
z0=(0,0);
z1=(1u,-2u);
z2=(1u,2u);

%draw and label radii
draw z0--z1 withcolor blue;
label.llft(btex $1$ etex, 0.5[z0,z1]);
draw z0--z2 withcolor blue;
label.ulft(btex $1$ etex, 0.5[z0,z2]);

%label endpoint
dotlabel.lrt(btex $(\sqrt{1-u^2},u)$ etex, z1);
dotlabel.urt(btex $(\sqrt{1-u^2},u)$ etex, z2);

%draw and label angle
path p;
p:=right{down}..unitvector(z1){dir(angle(z1)-90)};
drawarrow p scaled 0.5u;
label.lrt(btex $\theta$ etex, 0.5u*dir(-30));
p:=right{up}..unitvector(z2){dir(angle(z2)+90)};
drawarrow p scaled 0.5u;
label.urt(btex $\theta$ etex, 0.5u*dir(30));

endfig;

beginfig(18);

%initialize scaling
numeric u;
10u=2in;

%Initialize vertices
pair A, B, C;
A:=(0,0);
C:=A+7u*dir(40);
B:=A+whatever*right=C+whatever*dir(-asin(7*sind(40)/10)*180/pi);
D:=A+whatever*left=C+whatever*dir(-180+asin(7*sind(40)/10)*180/pi);

%Draw and label the triangle
draw A--B--C--cycle;
label.llft(btex $A$ etex, A);
label.lrt(btex $B$ etex, B);
label.top(btex $C$ etex, C);
label.urt(btex $10$ etex, 0.5[B,C]);
label.lrt(btex $7$ etex, 0.5[A,C]);
label.bot(btex $c$ etex, 0.5[A,B]);
label(btex $40^\circ$ etex, 1.5u*dir(20));

%Draw second possible triangle
draw A--D;
draw C--D;
label.llft(btex $B'$ etex,D);

%draw arc path
path p;
numeric m;
m:=asin(7*sind(40)/10)*180/pi;
p:=dir(-m){dir(-m-90)}..down{left}..dir(-180+m){dir(-270+m)};
draw p scaled 10u shifted C dashed evenly withcolor red;

endfig;

beginfig(19);

%initialize scaling
numeric u;
10u=2in;

%Initialize vertices
pair A, B, C, D;
A:=(0,0);
B:=(10u,0);
C:=A+7u*dir(44);
D:=A+whatever*right=C+whatever*down;

%Draw and label the triangle
draw A--B--C--cycle;
label.llft(btex $A$ etex, A);
label.lrt(btex $B$ etex, B);
label.top(btex $C$ etex, C);
label(btex $40^\circ$ etex, 1.5u*dir(20));
label.urt(btex $a$ etex, 0.5[B,C]);
label.ulft(btex $7$ etex, 0.5[A,C]);
label.bot(btex $10$ etex, 0.5[A,B]);

%draw and label the altitude
draw C--D dashed evenly withcolor red;
label.rt(btex $h$ etex, 0.5[C,D]);
endfig;

beginfig(20);

%Initialize scale
numeric u;
6u=2.25in;

%Initialize axes
pair x,y;
x:=(3u,0);
y:=(0,3u);

%draw axes
drawdblarrow (-x)--x;
drawdblarrow (-y)--y;

%draw angle
z0=(0,0);
z1=(-1u,2u);
draw z0--z1 withcolor blue;

%label endpoint
dotlabel.ulft(btex $(-1,2)$ etex, z1);

%label radius
label.lft(btex $r$ etex, 0.5[z0,z1]);

%mark and label angle
path p;
p:=right{up}..up{left}..unitvector(z1);
drawarrow p scaled 0.5u;
label.urt(btex $\theta$ etex, 0.5u*dir(50));

endfig;

beginfig(21);

%Initialize scale
numeric u;
4u=2.25in;

%Initialize axes
pair x,y;
x:=(2u,0);
y:=(0,2u);

%draw axes
drawdblarrow (-x)--x;
drawdblarrow (-y)--y;

%draw angle
z0=(0,0);
z1=(1u,-1u);
draw z0--z1 withcolor blue;
z2=(-1u,1u);
draw z0--z2 dashed evenly withcolor green;

%label endpoint
dotlabel.lrt(btex $(1,-1)$ etex, z1);
dotlabel.ulft(btex $(-1,1)$ etex, z2);

%label radius
label.llft(btex $r$ etex, 0.5[z0,z1]);

%mark and label angle
path p;
p:=right{down}..unitvector(z1){dir(-45-90)};
drawarrow p scaled 0.5u;
label.rt(btex $\theta$ etex, 0.5u*dir(-22));

endfig;

beginfig(22);

%Initialize scale
numeric u;
1u=1in;

%Initialize axes
pair x,y;
x:=(1.2u,0);
y:=(0,1.2u);

%draw axes
drawdblarrow (-x)--x;
drawdblarrow (-y)--y;

%draw the unit circle
path p;
p:=fullcircle scaled 2u;
draw p;

%initialize points on the unit circle
z0=(1u,0);
z1=z0 rotated 135;
z2=z0 rotated 315;

%auxiliary line
draw z1--z2 dashed evenly withcolor red;

%label locations
dotlabel.ulft(btex $(-\sqrt2/2,\sqrt2/2)$ etex, z1);
dotlabel.lrt(btex $(\sqrt2/2,-\sqrt2/2)$ etex, z2);

endfig;

beginfig(23);

%Initialize scale
numeric u;
1u=1in;

%Initialize axes
pair x,y;
x:=(1.2u,0);
y:=(0,1.2u);

%draw axes
drawdblarrow (-x)--x;
drawdblarrow (-y)--y;

%draw the unit circle
path p;
p:=fullcircle scaled 2u;
draw p;

%initialize points on the unit circle
z0=(0,0);
z1=(1u,0) rotated 30;
z2=(1u,0) rotated 150;
z3=(1u,0) rotated 270;

%auxiliary lines
draw z0--z1 dashed evenly withcolor red;
draw z0--z2 dashed evenly withcolor red;
draw z0--z3 dashed evenly withcolor red;

%label z1, z2, z3
dotlabel.urt(btex $(\sqrt3/2,1/2)$ etex, z1);
dotlabel.ulft(btex $(-\sqrt3/2,1/2)$ etex, z2);
dotlabel.llft(btex $(0,-1)$ etex, z3);

endfig;

beginfig(24);

%Initialize scale
numeric u;
6u=2.25in;

%Initialize axes
pair x,y;
x:=(3u,0);
y:=(0,3u);

%draw axes
drawdblarrow (-x)--x;
drawdblarrow (-y)--y;

%draw angle
z0=(0,0);
z1=(-sqrt(2)*2u,1u);
draw z0--z1 withcolor blue;

%label endpoint
dotlabel.ulft(btex $(x,1)$ etex, z1);

%label radius
label.llft(btex $3$ etex, 0.5[z0,z1]);

%mark and label angle
path p;
p:=right{up}..up{left}..unitvector(z1);
drawarrow p scaled 0.5u;
label.urt(btex $\theta$ etex, 0.5u*dir(50));

endfig;

beginfig(25);

%Initialize scale
numeric u;
6u=2.25in;

%Initialize axes
pair x,y;
x:=(3u,0);
y:=(0,3u);

%draw axes
drawdblarrow (-x)--x;
drawdblarrow (-y)--y;

%draw angle
z0=(0,0);
z1=(2u,2u);
drawarrow z0--z1 withcolor blue;

%label endpoint
label.urt(btex $(a,b)$ etex, z1);

%label radius
label.ulft(btex $r$ etex, 0.5[z0,z1]);

%mark and label angle
path p;
p:=right{up}..unitvector(z1);
drawarrow p scaled 0.5u;
label.rt(btex $\theta$ etex, 0.5u*dir(30));

endfig;

beginfig(26);

%Initialize scale
numeric u;
6u=2.25in;

%Initialize axes
pair x,y;
x:=(3u,0);
y:=(0,3u);

%draw axes
drawdblarrow (-x)--x;
drawdblarrow (-y)--y;

%draw angle
z0=(0,0);
z1=(1u,sqrt(3)*u);
drawarrow z0--z1 withcolor blue;

%label endpoint
label.urt(btex $(1,\sqrt3)$ etex, z1);

%label radius
label.ulft(btex $r$ etex, 0.5[z0,z1]);

%mark and label angle
path p;
p:=right{up}..unitvector(z1);
drawarrow p scaled 0.5u;
label.rt(btex $\theta$ etex, 0.5u*dir(30));

endfig;

beginfig(27);

%Initialize scale
numeric u;
6u=2.25in;

%Initialize axes
pair x,y;
x:=(3u,0);
y:=(0,4u);

%draw axes
drawdblarrow (-x)--x;
drawdblarrow (-y)--y;

%scale axes
for k=-2 step 1 until 2:
 xtick((k*u,0));
endfor;
for k=-3 step1 until 3:
 ytick((0,k*u));
endfor;

%draw ellipse
path p;
p:=fullcircle xscaled 4u yscaled 6u;
draw p withcolor blue;

%initialize center, vertex, focus
z0=(0,0);
z1=(-2u,0);
z2=(0,sqrt(5)*u);

%draw and label triangle
pickup pencircle scaled 2pt;
draw z0--z1--z2--cycle withcolor red;
pickup defaultpen;
label.bot(btex $b$ etex, 0.5[z0,z1]);
label.ulft(btex $a$ etex, 0.5[z1,z2]);
label.rt(btex $c$ etex, 0.5[z0,z2]);

endfig;

beginfig(28);

%Define function to be drawn
def f(expr x)=
 sqrt(-4*x)
enddef;

%Declare and initialize viewing window
numeric xmin, xmax, ymin, ymax;
xmin=-5;
xmax=5;
ymin=-5;
ymax=5;

%Declare and initialize scaling variables
numeric ux, uy;
(xmax-xmin)*ux=2.5in;
(ymax-ymin)*uy=2.5in;

%Declare and initialize clipping boundary
path q;
q:=(xmin,ymin)--(xmin,ymax)--(xmax,ymax)--(xmax,ymin)--cycle;
q:=q xscaled ux yscaled uy;

%Declare and initialize number of plotted points
numeric N;
N:=500;

%Declare and calculate plotting increment delta x
numeric dx;
dx:=(xmax-xmin)/N;

%Declare and create function path
path p;
p:=(xmin,f(xmin));
for x=xmin step dx until 0:
 p:=p--(x,f(x));
endfor;
p:=p--(0,f(0));

%Scale function path
p:=p xscaled ux yscaled uy;

%Clip function path
draw p;
draw p reflectedabout ((-1,0),(1,0));
clip currentpicture to q;

%Save and clear the function path
picture pic;
pic:=currentpicture;
clearit;

%Draw and label coordinate axes
drawdblarrow (xmin*ux,0)--(xmax*ux,0);
label.rt(btex $x$ etex,(xmax*ux,0));
drawdblarrow (0,ymin*uy)--(0,ymax*uy);
label.top(btex $y$ etex,(0,ymax*uy));

%Superimpose function plot
draw pic withcolor blue;

%xtick marks
for k=-5 step 1 until 5:
 xtick((k*ux,0))
endfor;

%ytick marks
for k=-5 step 1 until 5:
 ytick((0,k*uy))
endfor;

%label the focus
dotlabel.llft(btex $F(-1,0)$ etex, (-1ux,0));

%draw the directrix
drawdblarrow (1ux,-5uy)--(1ux,5uy) withcolor red;
label.lrt(btex $x=1$ etex, (1ux,-5uy));
endfig;

beginfig(29);

%Define function to be drawn
def f(expr x)=
 sqrt(-4*x-8)
enddef;

%Declare and initialize viewing window
numeric xmin, xmax, ymin, ymax;
xmin=-5;
xmax=5;
ymin=-5;
ymax=5;

%Declare and initialize scaling variables
numeric ux, uy;
(xmax-xmin)*ux=2.5in;
(ymax-ymin)*uy=2.5in;

%Declare and initialize clipping boundary
path q;
q:=(xmin,ymin)--(xmin,ymax)--(xmax,ymax)--(xmax,ymin)--cycle;
q:=q xscaled ux yscaled uy;

%Declare and initialize number of plotted points
numeric N;
N:=500;

%Declare and calculate plotting increment delta x
numeric dx;
dx:=(xmax-xmin)/N;

%Declare and create function path
path p;
p:=(xmin,f(xmin));
for x=xmin step dx until -2:
 p:=p--(x,f(x));
endfor;
p:=p--(-2,f(-2));

%Scale function path
p:=p xscaled ux yscaled uy;

%Clip function path
draw p;
draw p reflectedabout ((-1,0),(1,0));
clip currentpicture to q;

%Save and clear the function path
picture pic;
pic:=currentpicture;
clearit;

%Draw and label coordinate axes
drawdblarrow (xmin*ux,0)--(xmax*ux,0);
label.rt(btex $x$ etex,(xmax*ux,0));
drawdblarrow (0,ymin*uy)--(0,ymax*uy);
label.top(btex $y$ etex,(0,ymax*uy));

%Superimpose function plot
draw pic withcolor blue;

%xtick marks
for k=-5 step 1 until 5:
 xtick((k*ux,0))
endfor;

%ytick marks
for k=-5 step 1 until 5:
 ytick((0,k*uy))
endfor;

%label the focus
dotlabel.llft(btex $F(-3,0)$ etex, (-3ux,0));

%draw the directrix
drawdblarrow (-1ux,-5uy)--(-1ux,5uy) withcolor red;
label.lrt(btex $x=-1$ etex, (-1ux,-5uy));
endfig;

beginfig(30);

%initialize the scale
numeric u;
10u=2.5in;

%draw the rectangle
draw (-2u,-1u)--(2u,-1u)--(2u,1u)--(-2u,1u)--cycle withcolor
red dashed evenly;

%draw the asymptotes
z0=(5u,5/2*u);
draw -z0--z0 withcolor blue;
z1=(-5u,5/2*u);
draw -z1--z1 withcolor blue;

%grab current picture
picture pic;
pic:=currentpicture;
clearit;

%initialize axes
pair x, y;
x=(5u,0);
y=(0,5u);

%draw and label the axes
drawdblarrow -x--x;
drawdblarrow -y--y;
label.rt(btex $x$ etex, x);
label.top(btex $y$ etex, y);

%scale the axes
for k=-5 step 1 until 5:
 xtick((k*u,0));
endfor;
for k=-5 step 1 until 5:
 ytick((0,k*u));
endfor;

draw pic;

endfig;

beginfig(31);

%initialize the scale
numeric u;
10u=2.5in;

%draw the rectangle
draw (-2u,-1u)--(2u,-1u)--(2u,1u)--(-2u,1u)--cycle withcolor
red dashed evenly;

%draw the asymptotes
z0=(5u,5/2*u);
draw -z0--z0 withcolor blue;
z1=(-5u,5/2*u);
draw -z1--z1 withcolor blue;

%grab current picture
picture pic;
pic:=currentpicture;
clearit;

%initialize axes
pair x, y;
x=(5u,0);
y=(0,5u);

%draw and label the axes
drawdblarrow -x--x;
drawdblarrow -y--y;
label.rt(btex $x$ etex, x);
label.top(btex $y$ etex, y);

%scale the axes
for k=-5 step 1 until 5:
 xtick((k*u,0));
endfor;
for k=-5 step 1 until 5:
 ytick((0,k*u));
endfor;

draw pic shifted (1u,-1u);

endfig;

end

[-- Attachment #3: Type: text/plain, Size: 287 bytes --]

-
David Arnold
College of the Redwoods
Mathematics Department
7351 Tompkins Hill Road
Eureka, CA 95501
(707) 476-4222

My Home Page
http://online.redwoods.cc.ca.us/instruct/darnold/index.htm

Ordinary Differential Equations Using Matlab
http://www.prenhall.com/books/esm_0130113816.html

  reply	other threads:[~2000-06-12 23:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-06-10 17:12 Uwe Koloska
2000-06-10 19:48 ` Hans Hagen
2000-06-12 15:37   ` Uwe Koloska
2000-06-12 23:36     ` David Arnold [this message]
2000-06-13  7:48     ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3.0.5.32.20000612163624.0089d8b0@mail.northcoast.com \
    --to=darnold@northcoast.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).