Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

dashed_segment_length -> dash_length

Grant Sanderson2dfd6f72f43b
diff --git a/old_projects/WindingNumber.py b/old_projects/WindingNumber.py
index c9690814f..6489edb0f 100644
--- a/old_projects/WindingNumber.py
+++ b/old_projects/WindingNumber.py
@@ -127,7 +127,7 @@ class EquationSolver1d(GraphScene, ZoomedScene):
target_line_object = DashedLine(
self.coords_to_point(self.x_min, self.targetY),
self.coords_to_point(self.x_max, self.targetY),
- dashed_segment_length = 0.1)
+ dash_length = 0.1)
self.add(target_line_object)
target_label_num = 0 if self.show_y_as_deviation else self.targetY
diff --git a/old_projects/WindingNumber_G.py b/old_projects/WindingNumber_G.py
index 637e556b5..cea4524da 100644
--- a/old_projects/WindingNumber_G.py
+++ b/old_projects/WindingNumber_G.py
@@ -1268,7 +1268,7 @@ class DotsHoppingToColor(InputOutputScene):
# Show yellow points
inspector = DashedLine(
ORIGIN, TAU*UP,
- dashed_segment_length = TAU/24,
+ dash_length = TAU/24,
fill_opacity = 0,
stroke_width = 3,
stroke_color = WHITE,
diff --git a/old_projects/borsuk_addition.py b/old_projects/borsuk_addition.py
index 612cc7694..dfb8d806c 100644
--- a/old_projects/borsuk_addition.py
+++ b/old_projects/borsuk_addition.py
@@ -735,7 +735,7 @@ class FunctionGInputSpace(SpecialThreeDScene):
)
path.apply_matrix(z_to_vector(start))
- dashed_path = DashedMobject(path)
+ dashed_path = DashedVMobject(path)
dashed_path.set_shade_in_3d(True)
return dashed_path
@@ -747,9 +747,9 @@ class FunctionGInputSpace(SpecialThreeDScene):
np.sin(lat)
]))
equator.rotate(-90 * DEGREES)
- dashed_equator = DashedMobject(
+ dashed_equator = DashedVMobject(
equator,
- dashes_num=40,
+ num_dashes=40,
color=RED,
)
dashed_equator.set_shade_in_3d(True)
@@ -882,7 +882,7 @@ class FunctionGOutputSpace(FunctionGInputSpace):
])
pre_path.rotate(-45 * DEGREES, about_point=ORIGIN)
pre_path.shift(dot.get_center())
- path = DashedMobject(pre_path)
+ path = DashedVMobject(pre_path)
fp_label = self.fp_label
equals = TexMobject("=")
diff --git a/old_projects/clacks/solution2/position_phase_space.py b/old_projects/clacks/solution2/position_phase_space.py
index 0634e3f57..b2cc122b3 100644
--- a/old_projects/clacks/solution2/position_phase_space.py
+++ b/old_projects/clacks/solution2/position_phase_space.py
@@ -1533,7 +1533,7 @@ class IntroduceVelocityVector(PositionPhaseSpaceScene, MovingCameraScene):
DashedLine(
ps_vect.get_end(),
vect.get_end(),
- dashed_segment_length=0.01,
+ dash_length=0.01,
color=vect.get_color(),
)
for vect in (x_vect, y_vect)
diff --git a/old_projects/clacks/solution2/simple_scenes.py b/old_projects/clacks/solution2/simple_scenes.py
index a0a81a352..443a9d080 100644
--- a/old_projects/clacks/solution2/simple_scenes.py
+++ b/old_projects/clacks/solution2/simple_scenes.py
@@ -179,7 +179,7 @@ class ShowDotProductMeaning(Scene):
v_vect.get_end(),
proj_v.get_end(),
stroke_width=1,
- dashed_segment_length=0.025,
+ dash_length=0.025,
)
proj_line = updating_mobject_from_func(get_proj_line)
diff --git a/old_projects/clacks/solution2/wordy_scenes.py b/old_projects/clacks/solution2/wordy_scenes.py
index 2a89d9e8e..07458d18c 100644
--- a/old_projects/clacks/solution2/wordy_scenes.py
+++ b/old_projects/clacks/solution2/wordy_scenes.py
@@ -26,10 +26,10 @@ class ConnectionToOptics(Scene):
width += 2 * MED_SMALL_BUFF
rects = VGroup()
for k in [0, 2]:
- rect = DashedMobject(Rectangle(
+ rect = DashedVMobject(Rectangle(
height=FRAME_HEIGHT - 1.5,
width=width
- ), dashes_num=100)
+ ), num_dashes=100)
rect.move_to(everything.target[k])
rect.to_edge(DOWN, buff=SMALL_BUFF)
rects.add(rect)
diff --git a/old_projects/efvgt.py b/old_projects/efvgt.py
index b4dcfb762..173fb373b 100644
--- a/old_projects/efvgt.py
+++ b/old_projects/efvgt.py
@@ -1028,7 +1028,7 @@ class AddCubeSymmetries(GroupOfCubeSymmetries):
class DihedralGroupStructure(SymmetriesOfSquare):
CONFIG = {
"dashed_line_config" : {
- "dashed_segment_length" : 0.1
+ "dash_length" : 0.1
},
"filed_sum_scale_factor" : 0.4,
"num_rows" : 5,
diff --git a/old_projects/eoc/chapter2.py b/old_projects/eoc/chapter2.py
index 602976dbe..f17f5d4d6 100644
--- a/old_projects/eoc/chapter2.py
+++ b/old_projects/eoc/chapter2.py
@@ -981,7 +981,7 @@ class DsOverDtGraphically(GraphCarTrajectory, ZoomedScene):
input_point_line = self.get_vertical_line_to_graph(
self.start_time,
line_kwargs = {
- "dashed_segment_length" : 0.02,
+ "dash_length" : 0.02,
"stroke_width" : 4,
"color" : WHITE,
},
@@ -1687,7 +1687,7 @@ class TCubedExample(SecantLineToTangentLine):
line_class = DashedLine,
line_kwargs = {
"color" : WHITE,
- "dashed_segment_length" : 0.05,
+ "dash_length" : 0.05,
}
)
for time in (self.start_time, self.start_time+self.start_dt)
diff --git a/old_projects/eoc/chapter3.py b/old_projects/eoc/chapter3.py
index 194e1658c..0c0060e11 100644
--- a/old_projects/eoc/chapter3.py
+++ b/old_projects/eoc/chapter3.py
@@ -250,7 +250,7 @@ class DerivativeOfXSquaredAsGraph(GraphScene, ZoomedScene, PiCreatureScene):
x, self.graph,
line_class = DashedLine,
color = RED,
- dashed_segment_length = 0.025
+ dash_length = 0.025
)
for x in (self.start_x, self.start_x+self.dx)
]
@@ -2536,7 +2536,7 @@ class DerivativeFromZoomingInOnSine(IntroduceUnitCircleWithSine, ZoomedScene):
interim_point = nudged_point[0]*RIGHT+point[1]*UP
h_line = DashedLine(
interim_point, point,
- dashed_segment_length = 0.01
+ dash_length = 0.01
)
d_sine_line = Line(interim_point, nudged_point, color = DERIVATIVE_COLOR)
d_sine_brace = Brace(Line(ORIGIN, UP), LEFT)
diff --git a/old_projects/eola/chapter7.py b/old_projects/eola/chapter7.py
index 23aca2fea..5e98027e1 100644
--- a/old_projects/eola/chapter7.py
+++ b/old_projects/eola/chapter7.py
@@ -1525,7 +1525,7 @@ class ProjectOntoUnitVectorNumberline(VectorScene):
DashedLine(
d1.get_center(), d2.get_center(),
buff = 0, color = d1.get_color(),
- dashed_segment_length = 0.15
+ dash_length = 0.15
)
for d1, d2 in zip(dots, proj_dots)
])
@@ -1941,7 +1941,7 @@ class ScaleUpUHat(ProjectOntoUnitVectorNumberline) :
b.proj = get_vect_mob_projection(b, self.u_hat)
b.proj_line = DashedLine(
b.get_end(), b.proj.get_end(),
- dashed_segment_length = 0.05
+ dash_length = 0.05
)
b.proj.label = TexMobject("u_%s"%char)
b.proj.label.set_color(b.get_color())
diff --git a/old_projects/sphere_area.py b/old_projects/sphere_area.py
index 28f691815..92ecab516 100644
--- a/old_projects/sphere_area.py
+++ b/old_projects/sphere_area.py
@@ -789,7 +789,7 @@ class ShowProjection(SphereCylinderScene):
])
for lines in lat_lines, lon_lines:
for line in lines:
- line.add(DashedMobject(line, spacing=-1))
+ line.add(DashedVMobject(line, spacing=-1))
line.set_points([])
line.set_stroke(width=2)
lines.set_shade_in_3d(True)
diff --git a/old_projects/uncertainty.py b/old_projects/uncertainty.py
index 30f802188..99bfbeb37 100644
--- a/old_projects/uncertainty.py
+++ b/old_projects/uncertainty.py
@@ -1937,7 +1937,7 @@ class IntroduceDopplerRadar(Scene):
frequency_axes.coords_to_point(8, 0),
frequency_axes.coords_to_point(8, 1.2*f_max),
color = YELLOW,
- dashed_segment_length = 0.025,
+ dash_length = 0.025,
)
v_line_pair = VGroup(*[
v_line.copy().shift(u*0.6*RIGHT)