This file contains hidden or 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
from manim import * | |
# https://discord.com/channels/581738731934056449/1375396076231594045/1375396076231594045 | |
class FancyBulletlist(VGroup): | |
def __init__(self, bulletobject=None, items=[], **kwargs): | |
super().__init__(**kwargs) | |
if bulletobject == None: | |
bulletobject = Dot() | |
self.items = items |
This file contains hidden or 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
from manim import * | |
import manim.mobject.geometry.tips as tips | |
# https://discord.com/channels/581738731934056449/1370706466541011055/1370728872416514141 | |
class reasonablyTipped(Scene): | |
def construct(self): | |
def add_tip( | |
line, | |
shorten=True, |
This file contains hidden or 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
from manim_gearbox import * | |
class PlanetaryGears(Scene): | |
def construct(self): | |
# https://en.wikipedia.org/wiki/Epicyclic_gearing#Gear_speed_ratios_of_conventional_epicyclic_gearing | |
omegaplanet = 0.44 | |
omegacarrier = 0.44*10/15 | |
omegaring = (15+35)/35*omegacarrier | |
module = 0.15 # diameter = module * number of teeth |
This file contains hidden or 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
# reaction to https://www.reddit.com/r/manim/comments/1iois3s/is_manim_worth_learning_for_math_visualization_or/ | |
from manim import * | |
class justforfun(Scene): | |
def construct(self): | |
ax1 = Axes( | |
x_range = [-3,3,1], | |
y_range = [-1.5,+1.5,1], | |
x_length = 10, | |
y_length = 2, |
This file contains hidden or 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
# https://discord.com/channels/581738731934056449/1338585711648968775/1338585711648968775 | |
from manim import * | |
from pandas import DataFrame | |
class SuperBarChart(VGroup): | |
def __init__(self, | |
x_length, | |
y_range, | |
y_length, | |
dataframe, |
This file contains hidden or 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
# https://discord.com/channels/581738731934056449/1332024484496150589/1332024484496150589 | |
from manim import * | |
from manim.opengl import * | |
config.renderer="opengl" | |
config.write_to_movie=True | |
class openglCylinder(OpenGLSurface): | |
def __init__(self, start=ORIGIN, end=LEFT, radius=0.05, color=WHITE, **kwargs): | |
start = np.array(start) |
This file contains hidden or 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
# https://discord.com/channels/581738731934056449/1332024484496150589/1332024484496150589 | |
from manim import * | |
from manim.opengl import * | |
config.renderer="opengl" | |
config.write_to_movie=True | |
class openglSphere(OpenGLSurface): | |
def __init__(self, radius=1, **kwargs): | |
def uvfunc(u,v): | |
return radius * np.array([np.cos(v)*np.cos(u),np.cos(v)*np.sin(u),np.sin(v)]) |
This file contains hidden or 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
from manim import * | |
# https://discord.com/channels/581738731934056449/1318716633912573953/1318882699775311962 | |
class TheodorusSpiralDebug(Scene): | |
def construct(self): | |
# Initialize variables | |
origin_dot = Dot(point=ORIGIN) | |
last_line = Line(start=ORIGIN, end=RIGHT/2) | |
last_point = RIGHT/2 | |
# Add starting dot and first line segment |
This file contains hidden or 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
from manim import * | |
class Brace3D(Brace): | |
def __init__(self, line, rotation=0, **kwargs): | |
flatline = Line(ORIGIN, line.get_length()*RIGHT) | |
super().__init__(flatline, direction=np.array([0., -1., 0.]), **kwargs) | |
dline = line.get_end()-line.get_start() | |
self.rotate(angle=rotation, about_point=flatline.get_start(),axis=RIGHT) | |
self.rotate(-np.asin(dline[2]/np.linalg.norm(dline)), about_point=flatline.get_start(), axis=UP) | |
self.rotate(np.atan2(dline[1],dline[0]), about_point=flatline.get_start(), axis=OUT) |
This file contains hidden or 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
# https://discord.com/channels/581738731934056449/585955412436713495/1312571596287774781 | |
# https://youtube.com/shorts/dzjnM2EDDpE?si=_M8UHJR_ku6y2qIx | |
from manim import * | |
config.frame_rate=60 | |
class compass2(Scene): | |
def construct(self): | |
l = 2 | |
n = np.sqrt(2) # speed multiplier on second arm | |
θ = ValueTracker(0) | |
def Zfunc(x): |
NewerOlder