mirror of
https://github.com/3b1b/manim.git
synced 2025-11-14 05:07:47 +00:00
commit
839fb4ff58
235 changed files with 6107 additions and 2292 deletions
File diff suppressed because it is too large
Load diff
2
LICENSE
2
LICENSE
|
|
@ -1,4 +1,4 @@
|
|||
All files of this project under the directory "projects" are copyright 3Blue1Brown LLC and used by permission for this project only.
|
||||
All files of this project under the directory "from_3b1b" are copyright 3Blue1Brown LLC and used by permission for this project only.
|
||||
|
||||
Any other file of this project is available under the MIT license as follow:
|
||||
|
||||
|
|
|
|||
|
|
@ -150,6 +150,6 @@ Is always welcome. In particular, there is a dire need for tests and documentati
|
|||
|
||||
|
||||
## License
|
||||
All files in the directories `active_projects` and `old_projects`, which by and large generate the visuals for 3b1b videos, are copyright 3Blue1Brown.
|
||||
All files in the directory `from_3b1b`, which by and large generate the visuals for 3b1b videos, are copyright 3Blue1Brown.
|
||||
|
||||
The general purpose animation code found in the remainder of the repository, on the other hand, is under the MIT license.
|
||||
|
|
|
|||
1152
from_3b1b/active/bayes/footnote.py
Normal file
1152
from_3b1b/active/bayes/footnote.py
Normal file
File diff suppressed because it is too large
Load diff
4830
from_3b1b/active/bayes/part1.py
Normal file
4830
from_3b1b/active/bayes/part1.py
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -3,8 +3,8 @@ from active_projects.diffyq.part1.shared_constructs import *
|
|||
from active_projects.diffyq.part1.pendulum import Pendulum
|
||||
from active_projects.diffyq.part1.pendulum import ThetaVsTAxes
|
||||
from active_projects.diffyq.part1.phase_space import IntroduceVectorField
|
||||
from old_projects.div_curl import PhaseSpaceOfPopulationModel
|
||||
from old_projects.div_curl import ShowTwoPopulations
|
||||
from from_3b1b.old.div_curl import PhaseSpaceOfPopulationModel
|
||||
from from_3b1b.old.div_curl import ShowTwoPopulations
|
||||
|
||||
|
||||
# Scenes
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
from manimlib.imports import *
|
||||
|
||||
from old_projects.crypto import sha256_tex_mob, bit_string_to_mobject, BitcoinLogo
|
||||
from from_3b1b.old.crypto import sha256_tex_mob, bit_string_to_mobject, BitcoinLogo
|
||||
|
||||
def get_google_logo():
|
||||
result = SVGMobject(
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
from manimlib.imports import *
|
||||
|
||||
from old_projects.uncertainty import Flash
|
||||
from old_projects.WindingNumber import *
|
||||
from from_3b1b.old.uncertainty import Flash
|
||||
from from_3b1b.old.WindingNumber import *
|
||||
|
||||
|
||||
# Warning, this file uses ContinualChangingDecimal,
|
||||
|
|
@ -746,7 +746,7 @@ class StartingCalc101(PiCreatureScene):
|
|||
def get_aha_image(self):
|
||||
creature = self.pi_creature.copy()
|
||||
creature.change_mode("hooray")
|
||||
from old_projects.eoc.chapter3 import NudgeSideLengthOfCube
|
||||
from from_3b1b.old.eoc.chapter3 import NudgeSideLengthOfCube
|
||||
scene = NudgeSideLengthOfCube(
|
||||
end_at_animation_number=7,
|
||||
skip_animations=True
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
from manimlib.imports import *
|
||||
from old_projects.lost_lecture import GeometryProofLand
|
||||
from old_projects.quaternions import SpecialThreeDScene
|
||||
from old_projects.uncertainty import Flash
|
||||
from from_3b1b.old.lost_lecture import GeometryProofLand
|
||||
from from_3b1b.old.quaternions import SpecialThreeDScene
|
||||
from from_3b1b.old.uncertainty import Flash
|
||||
|
||||
|
||||
class Introduction(TeacherStudentsScene):
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
from manimlib.imports import *
|
||||
from old_projects.brachistochrone.curves import *
|
||||
from from_3b1b.old.brachistochrone.curves import *
|
||||
|
||||
class RollAlongVector(Animation):
|
||||
CONFIG = {
|
||||
|
|
@ -3,7 +3,7 @@ import itertools as it
|
|||
|
||||
from manimlib.imports import *
|
||||
|
||||
from old_projects.brachistochrone.curves import Cycloid
|
||||
from from_3b1b.old.brachistochrone.curves import Cycloid
|
||||
|
||||
class MultilayeredGlass(PhotonScene, ZoomedScene):
|
||||
CONFIG = {
|
||||
|
|
@ -3,7 +3,7 @@ import itertools as it
|
|||
|
||||
from manimlib.imports import *
|
||||
|
||||
from old_projects.brachistochrone.curves import \
|
||||
from from_3b1b.old.brachistochrone.curves import \
|
||||
Cycloid, PathSlidingScene, RANDY_SCALE_FACTOR, TryManyPaths
|
||||
|
||||
|
||||
|
|
@ -2,7 +2,7 @@ import numpy as np
|
|||
import itertools as it
|
||||
|
||||
from manimlib.imports import *
|
||||
from old_projects.brachistochrone.curves import Cycloid
|
||||
from from_3b1b.old.brachistochrone.curves import Cycloid
|
||||
|
||||
class PhysicalIntuition(Scene):
|
||||
def construct(self):
|
||||
|
|
@ -2,8 +2,8 @@ import numpy as np
|
|||
import itertools as it
|
||||
|
||||
from manimlib.imports import *
|
||||
from old_projects.brachistochrone.light import PhotonScene
|
||||
from old_projects.brachistochrone.curves import *
|
||||
from from_3b1b.old.brachistochrone.light import PhotonScene
|
||||
from from_3b1b.old.brachistochrone.curves import *
|
||||
|
||||
|
||||
class MultilayeredScene(Scene):
|
||||
|
|
@ -3,7 +3,7 @@ import itertools as it
|
|||
import os
|
||||
|
||||
from manimlib.imports import *
|
||||
from old_projects.brachistochrone.drawing_images import sort_by_color
|
||||
from from_3b1b.old.brachistochrone.drawing_images import sort_by_color
|
||||
|
||||
class Intro(Scene):
|
||||
def construct(self):
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
from old_projects.clacks import question
|
||||
from old_projects.clacks.solution2 import block_collision_scenes
|
||||
from old_projects.clacks.solution2 import mirror_scenes
|
||||
from old_projects.clacks.solution2 import pi_creature_scenes
|
||||
from old_projects.clacks.solution2 import position_phase_space
|
||||
from old_projects.clacks.solution2 import simple_scenes
|
||||
from old_projects.clacks.solution2 import wordy_scenes
|
||||
from from_3b1b.old.clacks import question
|
||||
from from_3b1b.old.clacks.solution2 import block_collision_scenes
|
||||
from from_3b1b.old.clacks.solution2 import mirror_scenes
|
||||
from from_3b1b.old.clacks.solution2 import pi_creature_scenes
|
||||
from from_3b1b.old.clacks.solution2 import position_phase_space
|
||||
from from_3b1b.old.clacks.solution2 import simple_scenes
|
||||
from from_3b1b.old.clacks.solution2 import wordy_scenes
|
||||
|
||||
OUTPUT_DIRECTORY = "clacks/solution2"
|
||||
SCENES_IN_ORDER = [
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
from manimlib.imports import *
|
||||
from old_projects.clacks.question import BlocksAndWallExample
|
||||
from from_3b1b.old.clacks.question import BlocksAndWallExample
|
||||
|
||||
|
||||
class NameBump(BlocksAndWallExample):
|
||||
|
|
@ -325,8 +325,8 @@ class BlocksAndWallScene(Scene):
|
|||
counter_mob = Integer(self.n_clacks)
|
||||
counter_mob.next_to(
|
||||
counter_label[-1], RIGHT,
|
||||
aligned_edge=DOWN,
|
||||
)
|
||||
counter_mob.align_to(counter_label[-1][-1], DOWN)
|
||||
counter_group = VGroup(
|
||||
counter_label,
|
||||
counter_mob,
|
||||
|
|
@ -747,7 +747,7 @@ class BlocksAndWallExampleMass1e2(BlocksAndWallExample):
|
|||
"velocity": -0.6,
|
||||
}
|
||||
},
|
||||
"wait_time": 25,
|
||||
"wait_time": 35,
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
from manimlib.imports import *
|
||||
from old_projects.clacks.question import *
|
||||
from old_projects.div_curl import ShowTwoPopulations
|
||||
from from_3b1b.old.clacks.question import *
|
||||
from from_3b1b.old.div_curl import ShowTwoPopulations
|
||||
|
||||
|
||||
OUTPUT_DIRECTORY = "clacks/solution1"
|
||||
|
|
@ -1204,6 +1204,8 @@ class CircleDiagramFromSlidingBlocks(Scene):
|
|||
"fill_color": GREEN,
|
||||
"fill_opacity": 0.3,
|
||||
},
|
||||
"show_dot": True,
|
||||
"show_vector": False,
|
||||
}
|
||||
|
||||
def construct(self):
|
||||
|
|
@ -1211,6 +1213,9 @@ class CircleDiagramFromSlidingBlocks(Scene):
|
|||
show_flash_animations=False,
|
||||
write_to_movie=False,
|
||||
wait_time=0,
|
||||
file_writer_config={
|
||||
"output_directory": ".",
|
||||
}
|
||||
)
|
||||
blocks = sliding_blocks_scene.blocks
|
||||
times = [pair[1] for pair in blocks.clack_data]
|
||||
|
|
@ -1229,7 +1234,17 @@ class CircleDiagramFromSlidingBlocks(Scene):
|
|||
dot = Dot(color=RED, radius=0.06)
|
||||
dot.move_to(lines[0].get_start())
|
||||
|
||||
self.add(end_zone, axes, circle, dot)
|
||||
vector = Vector(lines[0].get_start())
|
||||
vector.set_color(RED)
|
||||
vector.add_updater(lambda v: v.put_start_and_end_on(
|
||||
ORIGIN, dot.get_center()
|
||||
))
|
||||
vector.set_stroke(BLACK, 2, background=True)
|
||||
|
||||
dot.set_opacity(int(self.show_dot))
|
||||
vector.set_opacity(int(self.show_vector))
|
||||
|
||||
self.add(end_zone, axes, circle, dot, vector)
|
||||
|
||||
last_time = 0
|
||||
for time, line in zip(times, lines):
|
||||
|
|
@ -1238,7 +1253,7 @@ class CircleDiagramFromSlidingBlocks(Scene):
|
|||
self.wait(time - last_time)
|
||||
last_time = time
|
||||
dot.move_to(line.get_end())
|
||||
self.add(line, dot)
|
||||
self.add(line, dot, vector)
|
||||
self.wait()
|
||||
|
||||
def get_circle(self):
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
from manimlib.imports import *
|
||||
from old_projects.clacks.question import BlocksAndWallExample
|
||||
from from_3b1b.old.clacks.question import BlocksAndWallExample
|
||||
|
||||
|
||||
class PreviousTwoVideos(BlocksAndWallExample):
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
from manimlib.imports import *
|
||||
from old_projects.clacks.question import Block
|
||||
from old_projects.clacks.question import Wall
|
||||
from old_projects.clacks.question import ClackFlashes
|
||||
from from_3b1b.old.clacks.question import Block
|
||||
from from_3b1b.old.clacks.question import Wall
|
||||
from from_3b1b.old.clacks.question import ClackFlashes
|
||||
|
||||
|
||||
class PositionPhaseSpaceScene(Scene):
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
from manimlib.imports import *
|
||||
from old_projects.lost_lecture import ShowWord
|
||||
from old_projects.clacks.solution2.mirror_scenes import ReflectWorldThroughMirrorNew
|
||||
from old_projects.clacks.question import Thumbnail
|
||||
from from_3b1b.old.lost_lecture import ShowWord
|
||||
from from_3b1b.old.clacks.solution2.mirror_scenes import ReflectWorldThroughMirrorNew
|
||||
from from_3b1b.old.clacks.question import Thumbnail
|
||||
|
||||
|
||||
class WrapperScene(Scene):
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
from manimlib.imports import *
|
||||
from old_projects.clacks.solution2.position_phase_space import ShowMomentumConservation
|
||||
from from_3b1b.old.clacks.solution2.position_phase_space import ShowMomentumConservation
|
||||
|
||||
|
||||
class ConnectionToOptics(Scene):
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
from manimlib.imports import *
|
||||
|
||||
from old_projects.lost_lecture import Orbiting
|
||||
from old_projects.lost_lecture import ShowWord
|
||||
from from_3b1b.old.lost_lecture import Orbiting
|
||||
from from_3b1b.old.lost_lecture import ShowWord
|
||||
|
||||
|
||||
class LogoGeneration(LogoGenerationTemplate):
|
||||
|
|
@ -4217,7 +4217,7 @@ class BroughtToYouBy(PiCreatureScene):
|
|||
|
||||
spiral = Line(0.5 * RIGHT, 0.5 * RIGHT + 70 * UP)
|
||||
spiral.insert_n_curves(1000)
|
||||
from old_projects.zeta import zeta
|
||||
from from_3b1b.old.zeta import zeta
|
||||
spiral.apply_complex_function(zeta)
|
||||
step = 0.1
|
||||
spiral = VGroup(*[
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
from manimlib.imports import *
|
||||
from old_projects.eoc.chapter2 import Car, MoveCar
|
||||
from from_3b1b.old.eoc.chapter2 import Car, MoveCar
|
||||
|
||||
class CircleScene(PiCreatureScene):
|
||||
CONFIG = {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
from manimlib.imports import *
|
||||
from old_projects.eoc.chapter2 import DISTANCE_COLOR, TIME_COLOR, \
|
||||
from from_3b1b.old.eoc.chapter2 import DISTANCE_COLOR, TIME_COLOR, \
|
||||
VELOCITY_COLOR, Car, MoveCar
|
||||
|
||||
OUTPUT_COLOR = DISTANCE_COLOR
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
from manimlib.imports import *
|
||||
from old_projects.eoc.chapter4 import ThreeLinesChainRule
|
||||
from from_3b1b.old.eoc.chapter4 import ThreeLinesChainRule
|
||||
|
||||
class ExpFootnoteOpeningQuote(OpeningQuote):
|
||||
CONFIG = {
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import scipy
|
||||
from manimlib.imports import *
|
||||
from old_projects.eoc.chapter1 import Thumbnail as Chapter1Thumbnail
|
||||
from old_projects.eoc.chapter2 import Car, MoveCar, ShowSpeedometer, \
|
||||
from from_3b1b.old.eoc.chapter1 import Thumbnail as Chapter1Thumbnail
|
||||
from from_3b1b.old.eoc.chapter2 import Car, MoveCar, ShowSpeedometer, \
|
||||
IncrementNumber, GraphCarTrajectory, SecantLineToTangentLine, \
|
||||
VELOCITY_COLOR, TIME_COLOR, DISTANCE_COLOR
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue