diff --git a/python/taichi/ui/canvas.py b/python/taichi/ui/canvas.py index 8d7721d047cf7..d9e3da3689bdd 100644 --- a/python/taichi/ui/canvas.py +++ b/python/taichi/ui/canvas.py @@ -111,7 +111,9 @@ def circles(self, Args: centers: a taichi 2D Vector field, where each element indicate the \ 3D location of a vertex. - radius (float): radius of the circles, relative to the height of the screen. + radius (Union[float, numpy.array]): radius of the circles in pixels. \ + Can be either a single number, which will be applied to all circles, or a 1D NumPy array of the same length as `centers`.\ + The `i-th` item in the array will be the radius for the `i-th` circle in `centers`. color: a global color for the triangles as 3 floats representing \ RGB values. If `per_vertex_color` is provided, this is ignored. per_vertex_color (Tuple[float]): a taichi 3D vector field, where \ diff --git a/python/taichi/ui/gui.py b/python/taichi/ui/gui.py index ddbc99dbb047d..a2dad1dc8d30f 100644 --- a/python/taichi/ui/gui.py +++ b/python/taichi/ui/gui.py @@ -362,7 +362,9 @@ def circles(self, Args: pos (numpy.array): The positions of the circles. - radius (Number, optional): The radius of the circles in pixel. Default is 1. + radius (Union[Number, numpy.array], optional): The radius of the circles in pixel. \ + Can be either a number, which will be applied to all circles, or a 1D NumPy array of the same length as `pos`. \ + The default is 1. color (int, optional): The color of the circles. Default is 0xFFFFFF. palette (list[int], optional): The List of colors from which to choose to draw. Default is None.