spelling change, spacial to spatial

This commit is contained in:
Grant Sanderson
2015-10-06 15:27:12 -07:00
parent 0bf582a1bc
commit cc6b541f00
4 changed files with 11 additions and 11 deletions

View File

@ -51,8 +51,8 @@ class Animation(object):
(abs(points[:,1]) < self.restricted_height)
for filter_function in self.filter_functions:
admissibles *= ~filter_function(points)
if any(self.spacial_center):
points += self.spacial_center
if any(self.spatial_center):
points += self.spatial_center
#Filter out points pushed off the edge
admissibles *= (abs(points[:,0]) < SPACE_WIDTH) * \
(abs(points[:,1]) < SPACE_HEIGHT)
@ -82,7 +82,7 @@ class Animation(object):
return self
def shift(self, vector):
self.spacial_center += vector
self.spatial_center += vector
return self
def set_run_time(self, time):

View File

@ -5,7 +5,7 @@ import copy
import warnings
from animation import Animation
from mobject import Mobject, Point, Grid
from mobject import Mobject, Point
from constants import *
from helpers import *

View File

@ -18,13 +18,13 @@ class NumberLineScene(Scene):
self.add(self.number_line, *self.number_mobs)
def zoom_in_on(self, number, zoom_factor, run_time = 2.0):
unit_length_to_spacial_width = self.number_line.unit_length_to_spacial_width*zoom_factor
radius = SPACE_WIDTH/unit_length_to_spacial_width
unit_length_to_spatial_width = self.number_line.unit_length_to_spatial_width*zoom_factor
radius = SPACE_WIDTH/unit_length_to_spatial_width
tick_frequency = 10**(np.floor(np.log10(radius)))
left_tick = tick_frequency*(np.ceil((number-radius)/tick_frequency))
new_number_line = NumberLine(
numerical_radius = radius,
unit_length_to_spacial_width = unit_length_to_spacial_width,
unit_length_to_spatial_width = unit_length_to_spatial_width,
tick_frequency = tick_frequency,
leftmost_tick = left_tick,
number_at_center = number

View File

@ -234,13 +234,13 @@ class IntervalScene(NumberLineScene):
return intervals, lines
def add_open_interval(self, num, width, color = None, run_time = 0):
spacial_width = width*self.number_line.unit_length_to_spacial_width
spatial_width = width*self.number_line.unit_length_to_spatial_width
center_point = self.number_line.number_to_point(num)
open_interval = OpenInterval(center_point, spacial_width)
open_interval = OpenInterval(center_point, spatial_width)
color = color or "yellow"
interval_line = Line(
center_point+spacial_width*LEFT/2,
center_point+spacial_width*RIGHT/2
center_point+spatial_width*LEFT/2,
center_point+spatial_width*RIGHT/2
)
interval_line.do_in_place(interval_line.sort_points, np.linalg.norm)
interval_line.highlight(color)