code: def _create_and_rotate_coordinate_arrays(self, x, y, p):
          
  
          if p.aspect_ratio == 0 or p.size == 0:
              x = x * 0.0
              y = y * 0.0
          else:
              x = (x*10.0) / (p.size*p.aspect_ratio)
              y = (y*10.0) / p.size
  
          offset = np.exp(p.size)
          pattern_x = np.add.outer(np.sin(p.orientation)*y, np.cos(p.orientation)*x) + offset
          pattern_y = np.subtract.outer(np.cos(p.orientation)*y, np.sin(p.orientation)*x) + offset
  
          np.clip(pattern_x, 0, np.Infinity, out=pattern_x)
          np.clip(pattern_y, 0, np.Infinity, out=pattern_y)
  
          return pattern_x, pattern_y
docs: Create pattern matrices from x and y vectors, and rotate
          them to the specified orientation.