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_WIDTH = 1920
|
||||
|
||||
|
||||
LOW_QUALITY_FRAME_DURATION = 1./15
|
||||
MEDIUM_QUALITY_FRAME_DURATION = 1./30
|
||||
PRODUCTION_QUALITY_FRAME_DURATION = 1./60
|
||||
|
|
|
@ -88,7 +88,7 @@ class TexMobject(SVGMobject):
|
|||
should_replace = reduce(op.and_, [
|
||||
t1 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:
|
||||
tex = tex.replace(t1, "\\big")
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -15,6 +15,7 @@
|
|||
\usepackage{ragged2e}
|
||||
\usepackage{physics}
|
||||
|
||||
|
||||
\begin{document}
|
||||
|
||||
YourTextHere
|
||||
|
|
|
@ -203,14 +203,20 @@ class ComplexPlane(NumberPlane):
|
|||
]
|
||||
for number in numbers:
|
||||
point = self.number_to_point(number)
|
||||
if number == 0:
|
||||
num_str = str(number).replace("j", "i")
|
||||
if num_str.startswith("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:
|
||||
num_str = str(number).replace("j", "i")
|
||||
num = TexMobject(num_str)
|
||||
num.scale(self.number_scale_factor)
|
||||
num.shift(point-num.get_corner(UP+LEFT)+nudge)
|
||||
result.add(num)
|
||||
vect = DOWN+RIGHT
|
||||
num_mob.next_to(point, vect, SMALL_BUFF)
|
||||
result.add(num_mob)
|
||||
return result
|
||||
|
||||
def add_coordinates(self, *numbers):
|
||||
|
|
Loading…
Add table
Reference in a new issue