used to draw a function pattern.  code by python