Last active
November 19, 2024 19:34
-
-
Save uwezi/0701426f4cd3b7dc7b9fce8890650a70 to your computer and use it in GitHub Desktop.
[Brace 3D] Braces in 3D. #manim #brace3d #brace #threedscene #3D
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class brace3D(ThreeDScene): | |
def construct(self): | |
axes = ThreeDAxes( | |
x_range=[-5,5,1], | |
y_range=[-5,5,1], | |
z_range=[-5,5,1] | |
) | |
self.set_camera_orientation(phi=75 * DEGREES, theta=-45 * DEGREES) | |
self.add(axes) | |
line = Line( | |
axes.c2p(3,1,1), | |
axes.c2p(3,1,4), | |
) | |
line2=line.copy().rotate(-90*DEGREES, RIGHT, about_point=axes.get_origin()) | |
brac = BraceBetweenPoints(line2.get_start(),line2.get_end()) | |
brac2 = brac.rotate(+90*DEGREES, RIGHT, about_point=axes.get_origin()).set_color(RED) | |
self.add(line,line2, brac, brac2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment