mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Remove Grid
This commit is contained in:
parent
5b5415cc3e
commit
2449f3a284
1 changed files with 0 additions and 26 deletions
|
@ -754,29 +754,3 @@ class RoundedRectangle(Rectangle):
|
|||
def __init__(self, **kwargs):
|
||||
Rectangle.__init__(self, **kwargs)
|
||||
self.round_corners(self.corner_radius)
|
||||
|
||||
|
||||
class Grid(VMobject):
|
||||
CONFIG = {
|
||||
"height": 6.0,
|
||||
"width": 6.0,
|
||||
}
|
||||
|
||||
def __init__(self, rows, columns, **kwargs):
|
||||
digest_config(self, kwargs, locals())
|
||||
VMobject.__init__(self, **kwargs)
|
||||
|
||||
def generate_points(self):
|
||||
x_step = self.width / self.columns
|
||||
y_step = self.height / self.rows
|
||||
|
||||
for x in np.arange(0, self.width + x_step, x_step):
|
||||
self.add(Line(
|
||||
[x - self.width / 2., -self.height / 2., 0],
|
||||
[x - self.width / 2., self.height / 2., 0],
|
||||
))
|
||||
for y in np.arange(0, self.height + y_step, y_step):
|
||||
self.add(Line(
|
||||
[-self.width / 2., y - self.height / 2., 0],
|
||||
[self.width / 2., y - self.height / 2., 0]
|
||||
))
|
||||
|
|
Loading…
Add table
Reference in a new issue