diff options
author | dos-reis <gdr@axiomatics.org> | 2007-08-14 05:14:52 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2007-08-14 05:14:52 +0000 |
commit | ab8cc85adde879fb963c94d15675783f2cf4b183 (patch) | |
tree | c202482327f474583b750b2c45dedfc4e4312b1d /src/input/drawcfun.input.pamphlet | |
download | open-axiom-ab8cc85adde879fb963c94d15675783f2cf4b183.tar.gz |
Initial population.
Diffstat (limited to 'src/input/drawcfun.input.pamphlet')
-rw-r--r-- | src/input/drawcfun.input.pamphlet | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/src/input/drawcfun.input.pamphlet b/src/input/drawcfun.input.pamphlet new file mode 100644 index 00000000..2ee9df3f --- /dev/null +++ b/src/input/drawcfun.input.pamphlet @@ -0,0 +1,99 @@ +\documentclass{article} +\usepackage{axiom} +\begin{document} +\title{\$SPAD/src/input drawcfun.input} +\author{The Axiom Team} +\maketitle +\begin{abstract} +\end{abstract} +\eject +\tableofcontents +\eject +\section{License} +<<license>>= +--Copyright The Numerical Algorithms Group Limited 1991. +@ +<<*>>= +<<license>> +)clear all + +-- Two dimensional function plots + +f(x:DFLOAT):DFLOAT == sin(11*x) +draw(f,0..2*%pi) +draw(f,0..2*%pi,adaptive == false,title == "Non-adaptive plot") +draw(f,0..2*%pi,toScale == true,title == "Drawn to scale") +draw(f,0..2*%pi,coordinates == polar,title == "Polar plot") + +g(x:DFLOAT):DFLOAT == tan(x) +draw(g,-6..6,title == "Clipping on") +draw(g,-6..6,clip == false,title == "Clipping off") + +-- Parametric plane curves + +f1(t:DFLOAT):DFLOAT == 9*sin(3*t/4) +f2(t:DFLOAT):DFLOAT == 8*sin(t) +draw(curve(f1,f2),-4*%pi..4*%pi,toScale == true,title == "Lissajous curve") + +g1(t:DFLOAT):DFLOAT == sin(5*t) +g2(t:DFLOAT):DFLOAT == t +draw(curve(g1,g2),0..2*%pi,title == "Parametric curve") +draw(curve(g1,g2),0..2*%pi,_ + coordinates == polar,title == "Parametric polar curve") + +h1(t:DFLOAT):DFLOAT == t +h2(t:DFLOAT):DFLOAT == 2 +draw(curve(h1,h2),-3..3,coordinates == parabolic,title == "Parabolic plot") + +-- Parametric space curves + +i1(t:DFLOAT):DFLOAT == sin(t)*cos(3*t/5) +i2(t:DFLOAT):DFLOAT == cos(t)*cos(3*t/5) +i3(t:DFLOAT):DFLOAT == cos(t)*sin(3*t/5) +draw(curve(i1,i2,i3),0..15*%pi,title == "Parametric curve") +draw(curve(i1,i2,i3),0..15*%pi,tubeRadius == .15,title == "Tube around curve") + +j1(t:DFLOAT):DFLOAT == 4 +j2(t:DFLOAT):DFLOAT == t +draw(curve(j1,j2,j2),-9..9,coordinates == cylindrical,title == "Spiral") + +k1(t:DFLOAT):DFLOAT == 1 +k2(t:DFLOAT):DFLOAT == t/7 +k3(t:DFLOAT):DFLOAT == t/5 +draw(curve(k1,k2,k3),-70*%pi..70*%pi,coordinates == spherical,_ + title == "Gnarly curve on sphere") + +-- Three dimensional function plots + +l(x:DFLOAT,y:DFLOAT):DFLOAT == cos(x*y) +draw(l,-3..3,-3..3) + +colorFunction1(x:DFLOAT,y:DFLOAT):DFLOAT == x +draw(l,-3..3,-3..3,colorFunction == colorFunction1) + +colorFunction2(x:DFLOAT,y:DFLOAT):DFLOAT == x**2 + y**2 +draw(l,-3..3,-3..3,colorFunction == colorFunction2) + +colorFunction3(x:DFLOAT,y:DFLOAT,z:DFLOAT):DFLOAT == -z +draw(l,-3..3,-3..3,colorFunction == colorFunction3) + +m(u:DFLOAT,v:DFLOAT):DFLOAT == 1 +draw(m,0..2*%pi,0..%pi,coordinates == spherical,title == "Sphere") +draw(m,0..2*%pi,0..%pi,coordinates == spherical,_ + colorFunction == colorFunction2,title == "Sphere") + +draw(m,-%pi/2..%pi/2,0..2*%pi,coordinates == oblateSpheroidal(1$DFLOAT),_ + title == "Oblate spheroidal coordinates") + +-- Parametric surfaces + +n1(u:DFLOAT,v:DFLOAT):DFLOAT == 5*sin(u)*cos(v) +n2(u:DFLOAT,v:DFLOAT):DFLOAT == 4*sin(u)*sin(v) +n3(u:DFLOAT,v:DFLOAT):DFLOAT == 3*cos(u) +draw(surface(n1,n2,n3),0..%pi,0..2*%pi,title == "Which came first?") +@ +\eject +\begin{thebibliography}{99} +\bibitem{1} nothing +\end{thebibliography} +\end{document} |