run mainm - awesome - video

Run Settings
LanguageBash
Language Version
Run Command
echo Hello World! https://docs.manim.community/en/stable/examples.html docker pull manimcommunity/manim https://manim-video-generator.sevalla.app/ https://try.manim.community/ https://mybinder.org/ manim documentation https://docs.devtaoism.com/docs/html/contents/_2_basic_mobjects.html#vmobject-attributes data race video from manim import * config.background_color = RED config.frame_rate = 25 config.frame_size = [1200,500] # [WIDTH, HEIGHT] # config.transparent = True # RENDER AS IMAGE: ---------------- config.format = "png" config.save_last_frame = True # config.transparent = True # REDER AS GIF: ------------------- config.format = "gif" 股票行情 https://efinance.readthedocs.io/en/latest/install.html https://livingcharts.com/app/edit/pr1ocsyuf0SRGlDssPLs https://app.flourish.studio/visualisation/24950498/edit colab : https://colab.research.google.com/github/Isi-dev/Google-Colab_Notebooks/blob/main/Wan2_1_14B_I2V_GGUF_Free.ipynb#scrollTo=wo8w6tKerJMJ !sudo apt update !sudo apt install libcairo2-dev ffmpeg \ texlive texlive-latex-extra texlive-fonts-extra \ texlive-latex-recommended texlive-science \ tipa libpango1.0-dev !pip install manim !pip install IPython==8.21.0 !sudo apt-get install -y texlive-lang-chinese from manim import *
!pip install efinance import efinance as ef stock_code = '300414' ef.stock.get_quote_history(stock_code) # Export the specific day data to an Excel file specific_day_data.to_excel('specific_day_stock_data.xlsx', index=False) import efinance as ef stock_code = '300414' ef.stock.get_quote_history(stock_code) print("Specific day stock data exported to 'specific_day_stock_data.xlsx'")
def construct(self): nl = NumberLine(include_numbers=True) selector = Triangle(fill_opacity=1,color=RED).scale(0.2).rotate(PI/3) dn = DecimalNumber(0) update_grp = VGroup(selector, dn) def update_vgrp(vgrp): s,d = vgrp s.next_to(nl.n2p(dn.get_value()),UP,buff=0) d.next_to(selector,UP,buff=0.1) update_grp.add_updater(update_vgrp) self.add(nl,update_grp) # <-- add grp complete, not each element # Not use self.add(nl, selecttor, dn) self.wait(0.5) self.play( ChangeDecimalToValue(dn, 4), run_time=2 ) self.wait(0.5) self.play( ChangeDecimalToValue(dn, -1), run_time=2 ) self.wait(0.5) self.play( ChangeDecimalToValue(dn, -4), run_time=2 ) self.wait(0.5) self.play( ChangeDecimalToValue(dn, 7), run_time=3 ) self.wait(0.5)
%%manim -qm CircleToSquare class CircleToSquare(Scene): def construct(self): code = '''from manim import Scene, Square class CodeLines(BasicCodeMobject): def modify_code(self, code): lines = code[2:] colors = it.cycle([RED, TEAL, PURPLE, BLUE]) for line in lines: line.set_color(next(colors)) ''' code_mob = Code( code_string=code, tab_width=4, background="window", language="swift", paragraph_config=dict(font="Monospace") ) self.play(FadeIn(code_mob)) self.wait(1) print(code_mob[2:][0]) for i, sub_mob in enumerate(code_mob[2:][0].submobjects): # 访问子对象的文本内容 print(f"Subobject {i}: '{len(sub_mob)}'") if len(sub_mob) > 36: original_color = sub_mob.get_color() self.play(sub_mob.animate.set_color(YELLOW)) self.play(Wait(0.3)) self.play(sub_mob.animate.set_color(GREEN)) self.play(Wait(0.3)) self.play(sub_mob.animate.set_color(original_color))
indications = [ # Indications that need only the Mobject to be highlighted ApplyWave, Circumscribe, FocusOn, Indicate, Wiggle, # Indications that need another argument ShowPassingFlash, # This needs a background Mobject, such as Underline or a VMobject with surround Flash, # This needs a coord ] names = [Tex(i.__name__).scale(3) for i in indications] #for i in indications install manim on. mac pip3 install manim
%%manim -qm CodeFromString class CodeFromString(Scene): def construct(self): code = '''from manim import Scene, Square class CodeLines(BasicCodeMobject): def modify_code(self, code): lines = code[2:] colors = it.cycle([RED, TEAL, PURPLE, BLUE]) for line in lines: line.set_color(next(colors)) ''' rendered_code = Code( code_string=code, tab_width=4, background="window", language="swift", paragraph_config=dict(font="Monospace") ) self.play(FadeIn(rendered_code[0])) self.play(FadeIn(rendered_code[1])) textt = MarkupText('<gradient from="green" to="yellow">大中国hello amazing</gradient>') # self.play(FadeIn(rendered_code)) # self.play(Create(SurroundingRectangle(rendered_code[2:][0][6],color=RED))) for line in rendered_code[2:][0]: self.play(FadeIn(line)) self.play(Create(textt)) self.wait(2)
Editor Settings
Theme
Key bindings
Full width
Lines