3838 proportions_along_bezier_curve_for_point ,
3939)
4040from manim .utils .color import BLACK , WHITE , ManimColor , ParsableManimColor
41+ from manim .utils .decorators import internal
4142from manim .utils .iterables import (
4243 make_even ,
4344 resize_array ,
@@ -191,6 +192,7 @@ def get_mobject_type_class() -> type[VMobject]:
191192 return VMobject
192193
193194 # Colors
195+ @internal
194196 def init_colors (self , propagate_colors : bool = True ) -> Self :
195197 self .set_fill (
196198 color = self .fill_color ,
@@ -221,6 +223,7 @@ def init_colors(self, propagate_colors: bool = True) -> Self:
221223
222224 return self
223225
226+ @internal
224227 def generate_rgbas_array (
225228 self , color : ManimColor | list [ManimColor ], opacity : float | Iterable [float ]
226229 ) -> RGBA_Array_Float :
@@ -249,6 +252,7 @@ def generate_rgbas_array(
249252 rgbas = np .append (rgbas , light_rgbas , axis = 0 )
250253 return rgbas
251254
255+ @internal
252256 def update_rgbas_array (
253257 self ,
254258 array_name : str ,
@@ -708,6 +712,7 @@ def set_shade_in_3d(
708712 submob .z_index_group = self
709713 return self
710714
715+ @internal
711716 def set_points (self , points : Point3D_Array ) -> Self :
712717 self .points : Point3D_Array = np .array (points )
713718 return self
@@ -795,6 +800,7 @@ def append_points(self, new_points: Point3D_Array) -> Self:
795800 self .points = points
796801 return self
797802
803+ @internal
798804 def start_new_path (self , point : Point3D ) -> Self :
799805 """Append a ``point`` to the :attr:`VMobject.points`, which will be the
800806 beginning of a new Bézier curve in the path given by the points. If
@@ -825,6 +831,7 @@ def start_new_path(self, point: Point3D) -> Self:
825831 self .append_points ([point ])
826832 return self
827833
834+ @internal
828835 def add_cubic_bezier_curve (
829836 self ,
830837 anchor1 : CubicBezierPoints ,
@@ -836,9 +843,11 @@ def add_cubic_bezier_curve(
836843 self .append_points ([anchor1 , handle1 , handle2 , anchor2 ])
837844
838845 # what type is curves?
846+ @internal
839847 def add_cubic_bezier_curves (self , curves ) -> None :
840848 self .append_points (curves .flatten ())
841849
850+ @internal
842851 def add_cubic_bezier_curve_to (
843852 self ,
844853 handle1 : CubicBezierPoints ,
@@ -871,6 +880,7 @@ def add_cubic_bezier_curve_to(
871880 self .append_points ([self .get_last_point ()] + new_points )
872881 return self
873882
883+ @internal
874884 def add_quadratic_bezier_curve_to (
875885 self ,
876886 handle : QuadraticBezierPoints ,
@@ -1114,11 +1124,13 @@ def make_smooth(self) -> Self:
11141124 def make_jagged (self ) -> Self :
11151125 return self .change_anchor_mode ("jagged" )
11161126
1127+ @internal
11171128 def add_subpath (self , points : Point3D_Array ) -> Self :
11181129 assert len (points ) % 4 == 0
11191130 self .append_points (points )
11201131 return self
11211132
1133+ @internal
11221134 def append_vectorized_mobject (self , vectorized_mobject : VMobject ) -> None :
11231135 if self .has_new_path_started ():
11241136 # Remove last point, which is starting
@@ -1146,6 +1158,7 @@ def rotate(
11461158 super ().rotate (angle , axis , about_point , ** kwargs )
11471159 return self
11481160
1161+ @internal
11491162 def scale_handle_to_anchor_distances (self , factor : float ) -> Self :
11501163 """If the distance between a given handle point H and its associated
11511164 anchor point A is d, then it changes H to be a distances factor*d
@@ -1177,10 +1190,11 @@ def scale_handle_to_anchor_distances(self, factor: float) -> Self:
11771190 submob .set_anchors_and_handles (a1 , new_h1 , new_h2 , a2 )
11781191 return self
11791192
1180- #
1193+ @ internal
11811194 def consider_points_equals (self , p0 : Point3D , p1 : Point3D ) -> bool :
11821195 return np .allclose (p0 , p1 , atol = self .tolerance_for_point_equality )
11831196
1197+ @internal
11841198 def consider_points_equals_2d (self , p0 : Point2D , p1 : Point2D ) -> bool :
11851199 """Determine if two points are close enough to be considered equal.
11861200
@@ -1207,11 +1221,13 @@ def consider_points_equals_2d(self, p0: Point2D, p1: Point2D) -> bool:
12071221 return True
12081222
12091223 # Information about line
1224+ @internal
12101225 def get_cubic_bezier_tuples_from_points (
12111226 self , points : Point3D_Array
12121227 ) -> npt .NDArray [Point3D_Array ]:
12131228 return np .array (self .gen_cubic_bezier_tuples_from_points (points ))
12141229
1230+ @internal
12151231 def gen_cubic_bezier_tuples_from_points (
12161232 self , points : Point3D_Array
12171233 ) -> tuple [Point3D_Array ]:
@@ -1238,6 +1254,7 @@ def gen_cubic_bezier_tuples_from_points(
12381254 # Basically take every nppcc element.
12391255 return tuple (points [i : i + nppcc ] for i in range (0 , len (points ), nppcc ))
12401256
1257+ @internal
12411258 def get_cubic_bezier_tuples (self ) -> npt .NDArray [Point3D_Array ]:
12421259 return self .get_cubic_bezier_tuples_from_points (self .points )
12431260
@@ -1275,6 +1292,7 @@ def _gen_subpaths_from_points(
12751292 if (i2 - i1 ) >= nppcc
12761293 )
12771294
1295+ @internal
12781296 def get_subpaths_from_points (self , points : Point3D_Array ) -> list [Point3D_Array ]:
12791297 return list (
12801298 self ._gen_subpaths_from_points (
@@ -1283,6 +1301,7 @@ def get_subpaths_from_points(self, points: Point3D_Array) -> list[Point3D_Array]
12831301 ),
12841302 )
12851303
1304+ @internal
12861305 def gen_subpaths_from_points_2d (
12871306 self , points : Point3D_Array
12881307 ) -> Generator [Point3D_Array ]:
@@ -1291,6 +1310,7 @@ def gen_subpaths_from_points_2d(
12911310 lambda n : not self .consider_points_equals_2d (points [n - 1 ], points [n ]),
12921311 )
12931312
1313+ @internal
12941314 def get_subpaths (self ) -> list [Point3D_Array ]:
12951315 """Returns subpaths formed by the curves of the VMobject.
12961316
@@ -1303,6 +1323,7 @@ def get_subpaths(self) -> list[Point3D_Array]:
13031323 """
13041324 return self .get_subpaths_from_points (self .points )
13051325
1326+ @internal
13061327 def get_nth_curve_points (self , n : int ) -> Point3D_Array :
13071328 """Returns the points defining the nth curve of the vmobject.
13081329
@@ -1320,6 +1341,7 @@ def get_nth_curve_points(self, n: int) -> Point3D_Array:
13201341 nppcc = self .n_points_per_cubic_curve
13211342 return self .points [nppcc * n : nppcc * (n + 1 )]
13221343
1344+ @internal
13231345 def get_nth_curve_function (self , n : int ) -> Callable [[float ], Point3D ]:
13241346 """Returns the expression of the nth curve.
13251347
@@ -1335,6 +1357,7 @@ def get_nth_curve_function(self, n: int) -> Callable[[float], Point3D]:
13351357 """
13361358 return bezier (self .get_nth_curve_points (n ))
13371359
1360+ @internal
13381361 def get_nth_curve_length_pieces (
13391362 self ,
13401363 n : int ,
@@ -1363,6 +1386,7 @@ def get_nth_curve_length_pieces(
13631386
13641387 return norms
13651388
1389+ @internal
13661390 def get_nth_curve_length (
13671391 self ,
13681392 n : int ,
@@ -1387,6 +1411,7 @@ def get_nth_curve_length(
13871411
13881412 return length
13891413
1414+ @internal
13901415 def get_nth_curve_function_with_length (
13911416 self ,
13921417 n : int ,
@@ -1426,6 +1451,7 @@ def get_num_curves(self) -> int:
14261451 nppcc = self .n_points_per_cubic_curve
14271452 return len (self .points ) // nppcc
14281453
1454+ @internal
14291455 def get_curve_functions (
14301456 self ,
14311457 ) -> Generator [Callable [[float ], Point3D ]]:
@@ -1442,6 +1468,7 @@ def get_curve_functions(
14421468 for n in range (num_curves ):
14431469 yield self .get_nth_curve_function (n )
14441470
1471+ @internal
14451472 def get_curve_functions_with_lengths (
14461473 self , ** kwargs
14471474 ) -> Generator [tuple [Callable [[float ], Point3D ], float ]]:
@@ -1582,6 +1609,7 @@ def proportion_from_point(
15821609
15831610 return alpha
15841611
1612+ @internal
15851613 def get_anchors_and_handles (self ) -> list [Point3D_Array ]:
15861614 """Returns anchors1, handles1, handles2, anchors2,
15871615 where (anchors1[i], handles1[i], handles2[i], anchors2[i])
@@ -1596,6 +1624,7 @@ def get_anchors_and_handles(self) -> list[Point3D_Array]:
15961624 nppcc = self .n_points_per_cubic_curve
15971625 return [self .points [i ::nppcc ] for i in range (nppcc )]
15981626
1627+ @internal
15991628 def get_start_anchors (self ) -> Point3D_Array :
16001629 """Returns the start anchors of the bezier curves.
16011630
@@ -1606,6 +1635,7 @@ def get_start_anchors(self) -> Point3D_Array:
16061635 """
16071636 return self .points [:: self .n_points_per_cubic_curve ]
16081637
1638+ @internal
16091639 def get_end_anchors (self ) -> Point3D_Array :
16101640 """Return the end anchors of the bezier curves.
16111641
@@ -1617,6 +1647,7 @@ def get_end_anchors(self) -> Point3D_Array:
16171647 nppcc = self .n_points_per_cubic_curve
16181648 return self .points [nppcc - 1 :: nppcc ]
16191649
1650+ @internal
16201651 def get_anchors (self ) -> Point3D_Array :
16211652 """Returns the anchors of the curves forming the VMobject.
16221653
@@ -1731,6 +1762,7 @@ def get_nth_subpath(path_list, n):
17311762 vmobject .set_points (new_path2 )
17321763 return self
17331764
1765+ @internal
17341766 def insert_n_curves (self , n : int ) -> Self :
17351767 """Inserts n curves to the bezier curves of the vmobject.
17361768
@@ -1755,6 +1787,7 @@ def insert_n_curves(self, n: int) -> Self:
17551787 self .append_points ([new_path_point ])
17561788 return self
17571789
1790+ @internal
17581791 def insert_n_curves_to_point_list (
17591792 self , n : int , points : Point3D_Array
17601793 ) -> npt .NDArray [BezierPoints ]:
@@ -1782,6 +1815,7 @@ def insert_n_curves_to_point_list(
17821815 new_points = new_bezier_tuples .reshape (- 1 , 3 )
17831816 return new_points
17841817
1818+ @internal
17851819 def align_rgbas (self , vmobject : VMobject ) -> Self :
17861820 attrs = ["fill_rgbas" , "stroke_rgbas" , "background_stroke_rgbas" ]
17871821 for attr in attrs :
@@ -1802,6 +1836,7 @@ def get_point_mobject(self, center: Point3D | None = None) -> VectorizedPoint:
18021836 point .match_style (self )
18031837 return point
18041838
1839+ @internal
18051840 def interpolate_color (
18061841 self , mobject1 : VMobject , mobject2 : VMobject , alpha : float
18071842 ) -> None :
@@ -1826,6 +1861,7 @@ def interpolate_color(
18261861 val = val .copy ()
18271862 setattr (self , attr , val )
18281863
1864+ @internal
18291865 def pointwise_become_partial (
18301866 self ,
18311867 vmobject : VMobject ,
@@ -1888,6 +1924,7 @@ def pointwise_become_partial(
18881924 )
18891925 return self
18901926
1927+ @internal
18911928 def get_subcurve (self , a : float , b : float ) -> Self :
18921929 """Returns the subcurve of the VMobject between the interval [a, b].
18931930 The curve is a VMobject itself.
0 commit comments