summaryrefslogtreecommitdiff
path: root/Master/texmf/doc/asymptote/examples/gamma3.asy
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf/doc/asymptote/examples/gamma3.asy')
-rw-r--r--Master/texmf/doc/asymptote/examples/gamma3.asy29
1 files changed, 29 insertions, 0 deletions
diff --git a/Master/texmf/doc/asymptote/examples/gamma3.asy b/Master/texmf/doc/asymptote/examples/gamma3.asy
new file mode 100644
index 00000000000..1e400152a93
--- /dev/null
+++ b/Master/texmf/doc/asymptote/examples/gamma3.asy
@@ -0,0 +1,29 @@
+import graph3;
+import palette;
+
+size(12cm,IgnoreAspect);
+currentprojection=orthographic(1,-2,1);
+
+real X=4.5;
+real M=abs(gamma((X,0)));
+
+pair Gamma(pair z)
+{
+ return (z.x > 0 || z != floor(z.x)) ? gamma(z) : M;
+}
+
+real f(pair z) {return min(abs(Gamma(z)),M);}
+
+surface s=surface(f,(-2.1,-2),(X,2),70,Spline);
+
+real Arg(triple v)
+{
+ return degrees(Gamma((v.x,v.y)),warn=false);
+}
+
+s.colors(palette(s.map(Arg),Wheel()));
+draw(s);
+
+xaxis3("$\mathop{\rm Re} z$",Bounds,InTicks);
+yaxis3("$\mathop{\rm Im} z$",Bounds,InTicks(beginlabel=false));
+zaxis3("$|\Gamma(z)|$",Bounds,InTicks);