The class Circle¶
The class Circle represents a circle of the 2D space through its center, radius and color.
- class circle.Circle(center, radius, color)¶
Class methods:
Attributes:
- color¶
the color of the circle, an (R, G, B) tuple
- center¶
the center of the circle (
Point)
Methods:
- bounding_box()¶
To be implemented. Returns the bounding box of the circle (
Rectangle)
- rasterization(mtx)¶
To be implemented. Returns a list of pixels
point.Pointcorresponding the circle’s rasterization with the given window-to -viewport transformations matrix mtx
The class supports the function
str()and the comparison operator ==.
The class Circle is implemented in the file circle.py.
You can pass the tests of the following test files test-circle.txt.