mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
Retiring bells and waves files to old_projects folder
This commit is contained in:
parent
86b9e629e0
commit
3b92ce71d9
6 changed files with 1056 additions and 46 deletions
|
@ -4,7 +4,6 @@ import numpy as np
|
||||||
DEFAULT_HEIGHT = 1080
|
DEFAULT_HEIGHT = 1080
|
||||||
DEFAULT_WIDTH = 1920
|
DEFAULT_WIDTH = 1920
|
||||||
|
|
||||||
|
|
||||||
LOW_QUALITY_FRAME_DURATION = 1./15
|
LOW_QUALITY_FRAME_DURATION = 1./15
|
||||||
MEDIUM_QUALITY_FRAME_DURATION = 1./30
|
MEDIUM_QUALITY_FRAME_DURATION = 1./30
|
||||||
PRODUCTION_QUALITY_FRAME_DURATION = 1./60
|
PRODUCTION_QUALITY_FRAME_DURATION = 1./60
|
||||||
|
|
|
@ -88,7 +88,7 @@ class TexMobject(SVGMobject):
|
||||||
should_replace = reduce(op.and_, [
|
should_replace = reduce(op.and_, [
|
||||||
t1 in tex,
|
t1 in tex,
|
||||||
t2 not in tex,
|
t2 not in tex,
|
||||||
len(tex) > len(t1) and tex[len(t1)] in "()[]\\"
|
len(tex) > len(t1) and tex[len(t1)] in "()[]|\\"
|
||||||
])
|
])
|
||||||
if should_replace:
|
if should_replace:
|
||||||
tex = tex.replace(t1, "\\big")
|
tex = tex.replace(t1, "\\big")
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -15,6 +15,7 @@
|
||||||
\usepackage{ragged2e}
|
\usepackage{ragged2e}
|
||||||
\usepackage{physics}
|
\usepackage{physics}
|
||||||
|
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
|
|
||||||
YourTextHere
|
YourTextHere
|
||||||
|
|
|
@ -203,14 +203,20 @@ class ComplexPlane(NumberPlane):
|
||||||
]
|
]
|
||||||
for number in numbers:
|
for number in numbers:
|
||||||
point = self.number_to_point(number)
|
point = self.number_to_point(number)
|
||||||
if number == 0:
|
num_str = str(number).replace("j", "i")
|
||||||
|
if num_str.startswith("0"):
|
||||||
num_str = "0"
|
num_str = "0"
|
||||||
|
elif num_str in ["1i", "-1i"]:
|
||||||
|
num_str = num_str.replace("1", "")
|
||||||
|
num_mob = TexMobject(num_str)
|
||||||
|
num_mob.add_background_rectangle()
|
||||||
|
num_mob.scale(self.number_scale_factor)
|
||||||
|
if complex(number).imag != 0:
|
||||||
|
vect = DOWN+RIGHT
|
||||||
else:
|
else:
|
||||||
num_str = str(number).replace("j", "i")
|
vect = DOWN+RIGHT
|
||||||
num = TexMobject(num_str)
|
num_mob.next_to(point, vect, SMALL_BUFF)
|
||||||
num.scale(self.number_scale_factor)
|
result.add(num_mob)
|
||||||
num.shift(point-num.get_corner(UP+LEFT)+nudge)
|
|
||||||
result.add(num)
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def add_coordinates(self, *numbers):
|
def add_coordinates(self, *numbers):
|
||||||
|
|
Loading…
Add table
Reference in a new issue