mirror of
https://github.com/3b1b/manim.git
synced 2025-08-19 13:01:00 +00:00
Use only anchors to compute area vector
This commit is contained in:
parent
33682b7199
commit
ff090c016f
1 changed files with 4 additions and 4 deletions
|
@ -758,9 +758,10 @@ class VMobject(Mobject):
|
|||
if not self.has_points():
|
||||
return np.zeros(3)
|
||||
|
||||
nppc = self.n_points_per_curve
|
||||
points = self.get_points()
|
||||
p0 = points[:-1]
|
||||
p1 = points[1:]
|
||||
p0 = points[0::nppc]
|
||||
p1 = points[nppc - 1::nppc]
|
||||
|
||||
# Each term goes through all edges [(x1, y1, z1), (x2, y2, z2)]
|
||||
return 0.5 * np.array([
|
||||
|
@ -1023,10 +1024,9 @@ class VMobject(Mobject):
|
|||
super().set_points(points)
|
||||
return self
|
||||
|
||||
@triggers_refreshed_triangulation
|
||||
def append_points(self, points: Vect3Array):
|
||||
super().append_points(points)
|
||||
self.refresh_unit_normal()
|
||||
self.refresh_triangulation()
|
||||
return self
|
||||
|
||||
@triggers_refreshed_triangulation
|
||||
|
|
Loading…
Add table
Reference in a new issue