diff options
Diffstat (limited to 'Master/texmf/doc/asymptote/examples/sinc.asy')
-rw-r--r-- | Master/texmf/doc/asymptote/examples/sinc.asy | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Master/texmf/doc/asymptote/examples/sinc.asy b/Master/texmf/doc/asymptote/examples/sinc.asy new file mode 100644 index 00000000000..cd0d377e633 --- /dev/null +++ b/Master/texmf/doc/asymptote/examples/sinc.asy @@ -0,0 +1,19 @@ +import graph3; +import contour; + +currentprojection=orthographic(1,-2,1); +currentlight=(1,-1,0.5); + +size(12cm,0); + +real sinc(pair z) { + real r=2pi*abs(z); + return r != 0 ? sin(r)/r : 1; +} + +draw(lift(sinc,contour(sinc,(-2,-2),(2,2),new real[] {0})),red); +draw(surface(sinc,(-2,-2),(2,2),Spline),lightgray+opacity(0.5)); + +xaxis3("$x$",Bounds,InTicks); +yaxis3("$y$",Bounds,InTicks(beginlabel=false)); +zaxis3("$z$",Bounds,InTicks); |