mirror of
https://github.com/ManimCommunity/manim.git
synced 2026-06-22 10:01:47 +00:00
* #added some examples to the camera scene * #added 3 ZoomedScene examples * #removed accidentally added files * #added updater examples * #added text examples * #renamed example * #added 3d example with other light source * #added imagemobject examples * # added one line of code * # small fix * # added 3d examples * # added one advanced project * fixed error * small changes * 3d render * another idea with the file 3d_fix.rst * # one more change * some more formula examples * fix indent * remove reference to examples/3d_fix * change default resolution for videos in doc to 480p30 * Apply suggestions leotrs Co-authored-by: Leo Torres <leo@leotrs.com> * Added credits and 3d scene changes * # removed unnecessary lines * # implemented lots of changes suggested be leotrs * # updated credits * # updated scene names * Update docs/source/examples/shapes.rst Co-authored-by: Leo Torres <leo@leotrs.com> * updated credits * updated examples entery * Update camera_settings.rst * changed two lines * Update shapes.rst * Update plots.rst Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at> Co-authored-by: Leo Torres <leo@leotrs.com>
58 lines
1.7 KiB
ReStructuredText
58 lines
1.7 KiB
ReStructuredText
Formulas
|
|
=================================
|
|
|
|
.. manim:: Formula1
|
|
:save_last_frame:
|
|
|
|
class Formula1(Scene):
|
|
def construct(self):
|
|
t = MathTex(r"\int_a^b f'(x) dx = f(b)- f(a)")
|
|
self.add(t)
|
|
self.wait(1)
|
|
|
|
|
|
.. manim:: MoveFrameBox
|
|
|
|
class MoveFrameBox(Scene):
|
|
def construct(self):
|
|
text=TexMobject(
|
|
"\\frac{d}{dx}f(x)g(x)=","f(x)\\frac{d}{dx}g(x)","+",
|
|
"g(x)\\frac{d}{dx}f(x)"
|
|
)
|
|
self.play(Write(text))
|
|
framebox1 = SurroundingRectangle(text[1], buff = .1)
|
|
framebox2 = SurroundingRectangle(text[3], buff = .1)
|
|
self.play(
|
|
ShowCreation(framebox1),
|
|
)
|
|
self.wait()
|
|
self.play(
|
|
ReplacementTransform(framebox1,framebox2),
|
|
)
|
|
self.wait()
|
|
|
|
.. manim:: MoveBraces
|
|
|
|
class MoveBraces(Scene):
|
|
def construct(self):
|
|
text=TexMobject(
|
|
"\\frac{d}{dx}f(x)g(x)=", #0
|
|
"f(x)\\frac{d}{dx}g(x)", #1
|
|
"+", #2
|
|
"g(x)\\frac{d}{dx}f(x)" #3
|
|
)
|
|
self.play(Write(text))
|
|
brace1 = Brace(text[1], UP, buff=SMALL_BUFF)
|
|
brace2 = Brace(text[3], UP, buff=SMALL_BUFF)
|
|
t1 = brace1.get_text("$g'f$")
|
|
t2 = brace2.get_text("$f'g$")
|
|
self.play(
|
|
GrowFromCenter(brace1),
|
|
FadeIn(t1),
|
|
)
|
|
self.wait()
|
|
self.play(
|
|
ReplacementTransform(brace1,brace2),
|
|
ReplacementTransform(t1,t2)
|
|
)
|
|
self.wait()
|