diff --git a/src/Mobjects/Mobjects.py b/src/Mobjects/Mobjects.py index dcf5369..27107be 100644 --- a/src/Mobjects/Mobjects.py +++ b/src/Mobjects/Mobjects.py @@ -1,5 +1,4 @@ from manim import * - class DoubleArrow3D(Line3D): def __init__( self, @@ -8,20 +7,22 @@ def __init__( thickness: float = 0.02, height: float = 0.3, base_radius: float = 0.08, + color: ParsableManimColor = WHITE, **kwargs, ) -> None: super().__init__( - start=start, end=end, thickness=thickness, color=color, **kwargs + start=start, end=end, thickness=thickness, color=color, **kwargs, ) self.length = np.linalg.norm(self.vect) + self.set_start_and_end_attrs( - self.start - height * -self.direction, - self.end - height * self.direction, + self.start - (height+0.1) * -self.direction, + self.end - (height+0.1) * self.direction, **kwargs, ) - + self.cone = Cone( direction=self.direction, base_radius=base_radius, height=height, **kwargs ) @@ -29,8 +30,8 @@ def __init__( direction=-self.direction, base_radius=base_radius, height=height, **kwargs ) - self.cone.shift(end) - self.cone2.shift(start) + self.cone.shift(self.end + (height-0.2) * self.direction) + self.cone2.shift(self.start + (height-0.2) * -self.direction) self.add(self.cone, self.cone2) self.set_color(color) - \ No newline at end of file + diff --git a/src/notebook/processism_OOP.ipynb b/src/notebook/processism_OOP.ipynb index f0db796..8654c51 100644 --- a/src/notebook/processism_OOP.ipynb +++ b/src/notebook/processism_OOP.ipynb @@ -12,6 +12,13 @@ "from AnimationManger import * " ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, { "cell_type": "code", "execution_count": null,