Characters are vectorized

This commit is contained in:
Grant Sanderson
2016-04-17 19:29:27 -07:00
parent f5e4c3b334
commit e4c73306db
9 changed files with 231 additions and 290 deletions

View File

@ -2,14 +2,14 @@ from .mobject import Mobject
from helpers import *
class PMobject(Mobject):
def init_colors(self):
def init_points(self):
self.rgbs = np.zeros((0, 3))
self.points = np.zeros((0, 3))
return self
def get_array_attrs(self):
return Mobject.get_array_attrs(self) + ["rgbs"]
def add_points(self, points, rgbs = None, color = None):
"""
points must be a Nx3 numpy array, as must rgbs if it is not None