> plot(3*'x'^2,'x'=0..3);
> f:=x->3*x^2;
> plot(f('x'),'x'=0..3);
> plot(f,0..3);
>
plot(cos('x'),'x'=-5..5);
f:=(x,y)->cos(x+y);
g:=(x,y)->sin(x+y);
plot3d({f,g},-2..2,-2..2);
>
g:=x->`if`(x>1,x^2,-x^3);
plot(g,-5..5);
>
>
plot(['x'^2,'x'^3],'x'=0..2);
>
f:=x->x^2;
g:=proc(x) RETURN(x^3); end;
plot([f,g],0..2);
>
plot([sin(x),cos(x)],x=-5..5);
plot3d(cos(x+y),x=-5..5,y=-5..5);
> plot([seq(x^n,n=0..4)],x=-2..2);
>
affpuissance:=proc(d,f)
li:=[seq(x^n,n=d..f)];
print(li);
plot(li,x=-2..2);
end;
>
Warning, `li` is implicitly declared local
Warning, `n` in call to `seq` is not local
>
affpuissance(0,4);
> affpuissance(1/2,3/2);
> s:=[[1,1],[2,1],[2,2],[1,2],[1,1]];
>
plot([[1,1],[2,1],[2,2],[1,2],[1,1]]);
s:=[[1,1],[2,1],[2,2],[1,2],[1,1]];
plot(s,style=point);
>
s:=[[0,1],[1,-1],[-1,-1],[0,1]];
plot(s);
>
with(plots);
implicitplot(x^2+y^2-1,x=-1..1,y=-1..1);
> implicitplot(tan(x)+cos(y)-1,x=-1..2,y=-5..5);
> implicitplot3d(x^2+y^2+z^2-1,x=-1..1,y=-1..1,z=-1..1);
> implicitplot3d(tan(x)+cos(y)+sin(z)-1,x=-2..2,y=-5..5,z=-4..2);
> animate(x^t,x=1..5,t=0..3);
> x;t;
> animate(sin(x+t),x=0..5,t=0..2*Pi);
> animate3d(sin(x+t)+sin(y),x=0..5,y=0..5,t=0..2*Pi);
> animate({seq(sin(x+i+t),i=1..3)},x=0..5,t=0..2*Pi);
> multsin:=proc(n) animate({seq(sin(x+2*i*Pi/n+t),i=1..n)},x=0..5,t=0..2*Pi); end;
> multsin(3);
> multsin(8);
> multsin(15);
>
multcerc:=proc(li)
ens:=[];
for i from 1 to nops(li) do
ens:={op(ens),li[i]-sqrt('x'^2+'y'^2)};
od;
implicitplot(ens,'x'=-li[-1]..li[-1],'y'=-li[-1]..li[-1]);
end;
Warning, `ens` is implicitly declared local
Warning, `i` is implicitly declared local
> multcerc([1,3]);
>
multcerc3d:=proc(li)
ens:=[];
for i from 1 to nops(li) do
ens:={op(ens),li[i]-sqrt('x'^2+'y'^2+'z'^2)};
od;
implicitplot3d(ens,'x'=-li[-1]..li[-1],'y'=-li[-1]..li[-1],'z'=0..li[-1]);
end;
Warning, `ens` is implicitly declared local
Warning, `i` is implicitly declared local
> multcerc3d([1,2,5]);
>
> plot([seq( (x^((n/2)-1)*exp(-(x/2)))/(GAMMA(n/2)*2^(n/2)) ,n=1..5)],x=0..10);
>
>