mirror of
https://github.com/3b1b/manim.git
synced 2025-09-19 04:41:56 +00:00
Minor cleanup to Prism
This commit is contained in:
parent
8a08b62f7c
commit
333db992ed
1 changed files with 5 additions and 2 deletions
|
@ -399,11 +399,14 @@ class Prismify(VGroup3D):
|
|||
# At the moment, this assume stright edges
|
||||
vect = depth * direction
|
||||
pieces = [vmobject.copy()]
|
||||
points = vmobject.get_points()[::vmobject.n_points_per_curve]
|
||||
points = vmobject.get_anchors()
|
||||
for p1, p2 in adjacent_pairs(points):
|
||||
wall = VMobject()
|
||||
wall.match_style(vmobject)
|
||||
wall.set_points_as_corners([p1, p2, p2 + vect, p1 + vect])
|
||||
pieces.append(wall)
|
||||
pieces.append(vmobject.copy().shift(vect).reverse_points())
|
||||
top = vmobject.copy()
|
||||
top.shift(vect)
|
||||
top.reverse_points()
|
||||
pieces.append(top)
|
||||
super().__init__(*pieces, **kwargs)
|
||||
|
|
Loading…
Add table
Reference in a new issue