4-1Construct this pretty flower:
> plot((1+cos(3*t)+sin(3*t)^2),t=0..2*Pi,coords=polar,axes=none,scaling=constrained);
4-2Construct the line segment joining (cos(t),0) with (0,sin(t)) as t ranges over [0,2Pi].
> m:=[[1,-2],[3,4],[1,2]];
> plot(m);
> restart;
> x:=cos(t);
> y:=sin(t);
> m:=[[x,0],[0,y]];
> t:=n*2*Pi/100;
> plot([m$n=1..100],color=green,scaling=constrained,axes=none);
4-3 Construct the velocity vector field along a constant motion around a circle.
> restart;
> x:=cos(t);
> y:=sin(t);
> m:=[[x,y],[x-y,y+x]];
> t:=n*2*Pi/100;
> plot([m$n=1..100],color=red,scaling=constrained,axes=none);
> restart;
> x:=cos(t)+cos(2*t);
> y:=sin(t)+sin(2*t);
> m:=[[x,y],[x+diff(x,t),y+diff(y,t)]];
> t:=n*2*Pi/100;
> plot([m$n=1..100],scaling=constrained,axes=none);
Construct this figure:
> restart;
> x:=cos(t);
> y:=sin(t);
> m:=[[x,y],[x-t*y,y+t*x]];
> t:=n*2*Pi/100;
> plot([m$n=1..100],color=brown,scaling=constrained);
4-5 Construct the line segments joining [cos(t),sin(t)] with [cos(2t),sin(2t)] as t ranges over [0,2Pi].
> restart;
> x1:=cos(t);
> y1:=sin(t);
> x2:=cos(2*t);
> y2:=sin(2*t);
> m:=[[x1,y1],[x2,y2]];
> t:=n*2*Pi/100;
> plot([m$n=1..100],color=pink,scaling=constrained);
4-6 Construct this figure
> restart;
> x1:=cos(t);
> y1:=sin(t);
> x2:=cos(3*t);
> y2:=sin(3*t);
> m:=[[x1,y1],[x2,y2]];
> t:=n*2*Pi/100;
> plot([m$n=1..100],color=green,scaling=constrained);
4-7 Construct this graph associated with the logistic equation
x' = ax(1-x) with a=3.7
> restart;
> x:=0.677:
> a:=3.67:
> y:=a*x*(1-x):
> m:=[];
> for k to 100 do m:=[op(m),[x,x],[x,y]]: x:=y: y:=a*x*(1-x): od:
> plot(m,scaling=constrained,color=brown);
> m:
4-8 Draw 20 concetric circles
> restart;
> c:=[r*cos(t),r*sin(t),t=0..2*Pi];
> r:=n*1;
> plot([c$n=1..20],color=orange,scaling=constrained,axes=none);
4-9 Construct the circles with center at (cos(t),sin(t)) passing through the point (1,0) with t ranging over [0,2Pi]
> restart;
> x:=cos(t);
> y:=sin(t);
> r:=((x-1)^2+y^2)^(1/2);
> m:=[x+r*sin(k),y+r*cos(k),k=-Pi..Pi];
> t:=n*Pi/50;
> plot([m$n=1..100],color=pink,scaling=constrained);
4-10 Construct the circles with center at (cos(t),sin(t)) and tangent to the y-axis with t ranging over [0,2Pi]
> restart;
> x:=cos(t);
> y:=sin(t);
> x1:=1/2*x+1/2*cos(t);
> y1:=1/2*y-1/2*sin(t);
> r:=((x-x1)^2+(y-y1)^2)^(1/2);
> m:=[y+r*sin(s),x+r*cos(s), s=0..2*Pi];
> t:=n*Pi/50;
> plot([m$n=1..100],color=brown,axes=none,scaling=constrained);
4-11 Construct the circles with center at (cos(t),sin(t)) and passing through (2cos(t)/3+cos(2t)/3,2sin(t)/3-sin(2t)/3)
with t ranging over [0,2Pi]
> restart;
> x:=cos(t);
> y:=sin(t);
> x1:=2*x/3+cos(2*t)/3;
> y1:=2*y/3-sin(2*t)/3;
> r:=((x-x1)^2+(y-y1)^2)^(1/2);
> m:=[x+r*sin(k),y+r*cos(k),k=-Pi..Pi];
> t:=n*Pi/50;
> plot([m$n=1..100],color=yellow,scaling=constrained);
4-12 Construct the figure
> restart;
> x:=cos(t);
> y:=sin(t);
> x1:=3/4*x+1/4*cos(3*t);
> y1:=3/4*y-1/4*sin(3*t);
> r:=((x-x1)^2+(y-y1)^2)^(1/2);
> m:=[x+r*sin(k), y+r*cos(k), k=-Pi..Pi];
> t:=n*Pi/50;
> w:=evalf(m):
> plot([w$n=1..100],color=black,axes=none,scaling=constrained);
4-13
> restart;
> x:=cos(t);
> y:=sin(t);
> m:=[x+t*sin(k), y+t*cos(k), k=-Pi..Pi];
> t:=n*Pi/25;
> w:=evalf(m):
> plot([w$n=1..100],color=blue,scaling=constrained,axes=none);
4-14 Construct the reflections of a light ray inside a square
> restart;
> m:=1.7123;
> x:=0:
> y:=0:
> v:=[[x,y]];
> for k to 100 do xx:=floor(x)+1:yy:=floor(y)+1: if (yy-y)>m*(xx-x) then x:=xx:y:+m*x else y:=yy:x:=y/m: fi: v:=[op(v),[1-abs(x-2*floor(x/2)-1),1-abs(m*x-2*floor(m*x/2)-1)]] od:
> plot(v,scaling=constrained,color=blue);
>