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 testarabic(Scene): | |
def construct(self): | |
i=0 | |
texts = VGroup() | |
for font in Text.font_list(): | |
print(font) | |
texts += VGroup( | |
Text(font, font_size=18).next_to([0,3.5-0.8*i,0],LEFT,buff=0.5), | |
Text("جيب", font=font).next_to([0,3.5-0.8*i,0],RIGHT,buff=0) |
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 sys | |
class clitest(Scene): | |
def construct(self): | |
args = VGroup( | |
Text(arg) | |
for arg in self.argv | |
).arrange(DOWN) | |
self.add(args) |
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
# after DIscord user Maxime | |
# https://discord.com/channels/581738731934056449/976376734935048223/1383208229760143532 | |
class GlowDot(VMobject): | |
def __init__(self, point=ORIGIN, r_min=0.05, r_max=0.15, color=YELLOW, n=20, opacity_mult=1.0, **kwargs): | |
super().__init__(fill_color=color, fill_opacity=1, stroke_width=0, **kwargs) | |
for a in np.linspace(0, 1, n): | |
self.add( | |
Dot(point, radius=interpolate(r_min, r_max, a)) | |
) | |
self.set_fill(color, opacity=opacity_mult / n) |
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/1379443317175091252/1379443317175091252 | |
class Test(Scene): | |
def construct(self): | |
numbers = [100]*10 | |
numbersVG = VGroup(Text(str(n)) for n in numbers) | |
numbersVG.arrange(RIGHT).shift(1.3 * DOWN) | |
self.add(numbersVG) |
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) |
NewerOlder