CVBpy 15.0
Circle Class Reference

Class representing a circle. More...

Inherits object.

Public Member Functions

bool contains (self, cvb.Point2D point)
 Check whether a point is inside or outside a circle. More...
 
bool is_on_radius (self, cvb.Point2D point, float epsilon)
 Check whether a point is on the radius of a circle. More...
 

Properties

 center = property
 cvb.Point2D: Gets or sets the center of the circle.
 
 radius = property
 float: Gets or sets the radius of the circle. More...
 

Detailed Description

Class representing a circle.

For the purpose of regression and other calculations.

Create a circle.

Default creates a 0 degree angle.

Parameters

center : cvb.Point2D Center of the circle.

radius : float Radius of the circle.

Member Function Documentation

◆ contains()

bool contains (   self,
cvb.Point2D  point 
)

Check whether a point is inside or outside a circle.

Parameters

point : cvb.Point2D Point to be checked.

Returns

bool True if the point is inside the circle, False otherwise.

◆ is_on_radius()

bool is_on_radius (   self,
cvb.Point2D  point,
float  epsilon 
)

Check whether a point is on the radius of a circle.

Parameters

point : cvb.Point2D Point to be checked.

epsilon : float Maximum allowable deviation.

Returns

bool True if the point lies within the allowable deviation of the circle's radius, False otherwise.

Property Documentation

◆ radius

radius = property
static

float: Gets or sets the radius of the circle.

If the radius is negative, the absolute value is used.