--Copyright The Numerical Algorithms Group Limited 1994.
-- Color gallery page 6

-- 3-d surface whose height is the real part of the Gamma function,
-- and whose color is the argument of the Gamma function
gam(x,y) == 
  g := Gamma complex(x,y)
  point [x,y,max(min(real g, 4), -4), argument g]

draw(gam, -%pi..%pi, -%pi..%pi, title == "Gamma(x + %i*y)", 
     var1Steps == 100, var2Steps == 100)

-- The Beta function

b(x,y) == Beta(x,y)
draw(b, -3.1..3, -3.1 .. 3, title == "Beta(x,y)")

-- The complex arc tangent function
atf(x,y) == 
  a := atan complex(x,y)
  point [x,y,real a, argument a]

draw(atf, -3.0..%pi, -3.0..%pi)

