FilledRectangle class

This commit is contained in:
Grant Sanderson 2016-01-26 10:23:05 -08:00
parent 9705f03c15
commit f0388c5d48

View file

@ -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)
])