mirror of
https://github.com/3b1b/manim.git
synced 2025-11-14 08:47:44 +00:00
Resolving minor bug in StreamLines (#2330)
* resolving minor bug in StreamLines * minute changes
This commit is contained in:
parent
c667136060
commit
8b9ae95703
2 changed files with 3 additions and 4 deletions
|
|
@ -257,7 +257,7 @@ def update_camera_config(config: Dict, args: Namespace):
|
|||
if args.color:
|
||||
try:
|
||||
camera_config.background_color = colour.Color(args.color)
|
||||
except Exception:
|
||||
except Exception as err:
|
||||
log.error("Please use a valid color")
|
||||
log.error(err)
|
||||
sys.exit(2)
|
||||
|
|
|
|||
|
|
@ -390,7 +390,6 @@ class StreamLines(VGroup):
|
|||
|
||||
def draw_lines(self) -> None:
|
||||
lines = []
|
||||
origin = self.coordinate_system.get_origin()
|
||||
|
||||
# Todo, it feels like coordinate system should just have
|
||||
# the ODE solver built into it, no?
|
||||
|
|
@ -426,7 +425,7 @@ class StreamLines(VGroup):
|
|||
cs = self.coordinate_system
|
||||
for line in self.submobjects:
|
||||
norms = [
|
||||
get_norm(self.func(*cs.p2c(point)))
|
||||
get_norm(self.func(cs.p2c(point)))
|
||||
for point in line.get_points()
|
||||
]
|
||||
rgbs = values_to_rgbs(norms)
|
||||
|
|
@ -471,7 +470,7 @@ class AnimatedStreamLines(VGroup):
|
|||
|
||||
self.add_updater(lambda m, dt: m.update(dt))
|
||||
|
||||
def update(self, dt: float) -> None:
|
||||
def update(self, dt: float = 0) -> None:
|
||||
stream_lines = self.stream_lines
|
||||
for line in stream_lines:
|
||||
line.time += dt
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue