Summer Session 3
July 11

PARI-GP



Construct the graph of sin(x) with x ranging in [0, 2[Maple Math]].
> plot(sin(x),x=0..2*Pi);

[Maple Plot]



Draw a circle given by the parametric equations
x=cos(t), y=sin(t), t[Maple Math][0,2[Maple Math]]

> plot([cos(t),sin(t),t=0..2*Pi],scaling=constrained,axes=none);

[Maple Plot]


Draw the graphs of the first six Chebyshev polynomials in the interval [-1,1].

> m:=[cos(x),cos(n*x),x=0..Pi];

[Maple Math]

> plot({m$n=1..6},axes=none);

[Maple Plot]


Draw this pretty leaf:

> w:=1+cos(t)/2:z:=t/6-sin(2*t)/12:x:=w*cos(z):y:=w*sin(z):
plot([x,y,t=0..12*Pi],axes=none,scaling=constrained);

[Maple Plot]


Draw the graphs of the polynomials given by the binomial expansions

> restart;

> m:=[x,binomial(100,k)*x^(100-k)*(1-x)^k,x=0..1]:

> plot({m$k=0..100},axes=none);
 
 

[Maple Plot]


Construct this pattern of the "sunflower":
> r:=exp(t);

> m:=64;

> a:=plot([[r*cos(t+2*Pi*k/m),r*sin(t+2*Pi*k/m),t=3..5]$k=1..m],scaling=constrained,color=red,axes=none):

> b:=plot([[r*cos(t+2*Pi*k/m),-r*sin(t+2*Pi*k/m),t=3..5]$k=1..m],scaling=constrained,color=blue,axes=none):

> with(plots):

> display(a,b);

Reference: T. Cook: The Curves of Life.



Construct he graph given in polar coordinates by

[Maple Math][0,4[Maple Math]]> plot(cos(7*t/2)+1/4,t=0..4*Pi,coords=polar,axes=none,scaling=constrained);

[Maple Plot]



Construct this interesting drawing:

> plot(2-cos(3*t)-cos(31*3*t/32),t=0..64*Pi,coords=polar,
numpoints=1000,axes=none,scaling=constrained);

[Maple Plot]

Reference: William F. Rigge, Envelope Rosettes, Amer. Math. Monthly, (1920), p. 152.



> plot(2-cos(7*t)-cos(31*7*t/32),t=0..64*Pi,coords=polar,
numpoints=1000,axes=none,scaling=constrained);

[Maple Plot]

Reference: William F. Rigge, Envelope Rosettes, Amer. Math. Monthly, (1920), p. 154.


Draw this interesting pattern:

> plot(100+t+15*cos(3.05*t), t = 0 .. 200, coords =
polar, axes = none,scaling=constrained);

[Maple Plot]

Construct a gif file animating the function
f(x,t) = sin (x + t)
and include the gif in your web page.