Circle

class nrv.utils.geom.Circle(center: tuple[float, float] = (0, 0), radius: float = 10)[source]

Circle class that inherits from Cshape. Represents a circle with a center and radius.

Attributes

Circle.area

Area of the ellipse.

Circle.bbox

Coordinates of the axis-aligned bounding box.

Circle.bbox_size

Size of the circle bounding box.

Circle.c

Center of the ellipse as an array.

Circle.is_rot

Indicate whether the ellipse is rotated.

Circle.perimeter

Perimeter of the shape in $mu m^2$

Circle.r

Semi-axis lengths of the ellipse.

Circle.rot_mat

rotation matrix

Circle.rot_mat_inverse

Inverse rotation matrix

Circle.x

X-coordinate placeholder for 2D shapes.

Circle.y

Y-coordinate of the shape center.

Circle.z

Z-coordinate of the shape center.

Methods

Circle.__init__([center, radius])

Initializes the Circle

Circle.get_parameters()

Generic method returning all the atributes of an NRV_class instance

Circle.get_point_inside([n_pts, delta])

Draw random points inside the circle.

Circle.get_trace([n_theta])

Sample the ellipse boundary.

Circle.is_inside(point[, delta, for_all])

Check whether one or several points lie inside the ellipse.

Circle.load(data[, blacklist])

Generic loading method for NRV_class instance

Circle.plot(axes[, n_tetha, add_center])

plot the border of the shape

Circle.plot_bbox(axes, *args, **kwgs)

plot the border of the shape

Circle.rotate(angle[, degree])

Rotate the circle.

Circle.save([save, fname, blacklist])

Generic saving method for NRV_class instance.

Circle.set_parameters(**kawrgs)

Generic method to set any attribute of NRV_class instance

Circle.translate([y, z])

Translate the shape.