prtools.circle#
- circle(shape, radius, shift=(0, 0), antialias=True, indexing='ij')[source]#
Draw a circle
- Parameters:
shape (array_like) – Size of output in pixels (nrows, ncols)
radius (float) – Radius of circle in pixels
shift ((2,) array_like, optional) – How far to shift center in float (rows, cols). Default is (0, 0).
antialias (bool, optional) – If True (default), the shape edges are antialiased.
indexing ({'ij', 'xy'}, optional) – Matrix (‘ij’, default) or cartesian (‘xy’) indexing of output.
- Return type:
ndarray
Examples
>>> circ = prtools.circle(shape=(256, 256), radius=100) >>> plt.imshow(circ, cmap='gray')
>>> circ = prtools.circle(shape=(256, 256), radius=25, shift=(-80, 50)) >>> plt.imshow(circ, cmap='gray')