A community-maintained Python framework for creating mathematical animations.
FilledRectangle class
Grant Sandersonf0388c5d48b8
diff --git a/topics/geometry.py b/topics/geometry.pyindex 7e01e24c5..0d47e4243 100644--- a/topics/geometry.py+++ b/topics/geometry.py@@ -253,5 +253,18 @@ class Square(Rectangle):+class FilledRectangle(Mobject1D):+ DEFAULT_CONFIG = {+ "color" : GREY,+ "height" : 2.0,+ "width" : 4.0,+ }+ def generate_points(self):+ self.add_points([+ (x, y, 0)+ for x in np.arange(-self.width, self.width, self.epsilon)+ for y in np.arange(-self.height, self.height, self.epsilon)+ ])+