prtools.sin#
- sin(shape, cycles, shift=(0, 0), angle=0, indexing='ij')[source]#
Generate a 2D sine function.
- Parameters:
shape (array_like) – Size of output in pixels (nrows, ncols)
cycles (float) – Number of cycles represented across the shape.
shift ((2,) array_like, optional) – Shape translation from center of containing array. Default is (0, 0)
angle (float, optional) – Rotation in degrees from horizontal. Default is 0.
indexing ({'ij', 'xy'}, optional) – Matrix (‘ij’, default) or cartesian (‘xy’) indexing of output.
- Return type:
ndarray
Examples
>>> sin = prtools.sin(shape=(256,256), cycles=5) >>> plt.imshow(sin, cmap='gray')