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