mirror of
https://github.com/3b1b/manim.git
synced 2025-09-19 04:41:56 +00:00
Minor edits to fractal files
This commit is contained in:
parent
2c082e917d
commit
152bb6ba95
2 changed files with 17 additions and 5 deletions
|
@ -60,7 +60,6 @@ class DiamondFractalCreation(FractalCreation):
|
||||||
"fractal_kwargs" : {"height" : 6}
|
"fractal_kwargs" : {"height" : 6}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class PiCreatureFractalCreation(FractalCreation):
|
class PiCreatureFractalCreation(FractalCreation):
|
||||||
CONFIG = {
|
CONFIG = {
|
||||||
"fractal_class" : PiCreatureFractal,
|
"fractal_class" : PiCreatureFractal,
|
||||||
|
@ -108,7 +107,6 @@ class KochSnowFlakeFractalCreation(FractalCreation):
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class WonkyHexagonFractalCreation(FractalCreation):
|
class WonkyHexagonFractalCreation(FractalCreation):
|
||||||
CONFIG = {
|
CONFIG = {
|
||||||
"fractal_class" : WonkyHexagonFractal,
|
"fractal_class" : WonkyHexagonFractal,
|
||||||
|
@ -116,7 +114,15 @@ class WonkyHexagonFractalCreation(FractalCreation):
|
||||||
"fractal_kwargs" : {"height" : 6},
|
"fractal_kwargs" : {"height" : 6},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class SierpinskiFractalCreation(FractalCreation):
|
||||||
|
CONFIG = {
|
||||||
|
"fractal_class" : Sierpinski,
|
||||||
|
"max_order" : 6,
|
||||||
|
"fractal_kwargs" : {"height" : 6},
|
||||||
|
"transform_kwargs" : {
|
||||||
|
"path_arc" : 0,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
class CircularFractalCreation(FractalCreation):
|
class CircularFractalCreation(FractalCreation):
|
||||||
CONFIG = {
|
CONFIG = {
|
||||||
|
|
|
@ -22,7 +22,7 @@ from camera import Camera
|
||||||
from mobject.svg_mobject import *
|
from mobject.svg_mobject import *
|
||||||
from mobject.tex_mobject import *
|
from mobject.tex_mobject import *
|
||||||
|
|
||||||
from fractal_charm import FractalCreation
|
from old_projects.fractal_charm import FractalCreation
|
||||||
|
|
||||||
from topics.graph_scene import GraphScene
|
from topics.graph_scene import GraphScene
|
||||||
from topics.common_scenes import PatreonThanks
|
from topics.common_scenes import PatreonThanks
|
||||||
|
@ -198,6 +198,9 @@ class IntroduceVonKochCurve(Scene):
|
||||||
self.play(Write(name, run_time = 2))
|
self.play(Write(name, run_time = 2))
|
||||||
curve = self.isolate_one_curve(snowflake)
|
curve = self.isolate_one_curve(snowflake)
|
||||||
self.dither()
|
self.dither()
|
||||||
|
|
||||||
|
self.zoom_in_on(curve)
|
||||||
|
self.zoom_in_on(curve)
|
||||||
self.zoom_in_on(curve)
|
self.zoom_in_on(curve)
|
||||||
|
|
||||||
def get_snowflake(self):
|
def get_snowflake(self):
|
||||||
|
@ -234,7 +237,10 @@ class IntroduceVonKochCurve(Scene):
|
||||||
return snowflake[0]
|
return snowflake[0]
|
||||||
|
|
||||||
def zoom_in_on(self, curve):
|
def zoom_in_on(self, curve):
|
||||||
larger_curve = KochCurve(order = self.order+1)
|
larger_curve = KochCurve(
|
||||||
|
order = self.order+1,
|
||||||
|
stroke_width = self.stroke_width
|
||||||
|
)
|
||||||
larger_curve.replace(curve)
|
larger_curve.replace(curve)
|
||||||
larger_curve.scale(3, about_point = curve.get_corner(DOWN+LEFT))
|
larger_curve.scale(3, about_point = curve.get_corner(DOWN+LEFT))
|
||||||
larger_curve.gradient_highlight(
|
larger_curve.gradient_highlight(
|
||||||
|
|
Loading…
Add table
Reference in a new issue