mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Small fixes to three_dimensions.py
This commit is contained in:
parent
0452012d54
commit
031adda503
1 changed files with 1 additions and 11 deletions
|
@ -166,7 +166,6 @@ class Cylinder(Surface):
|
|||
self.scale(self.radius)
|
||||
self.set_depth(self.height, stretch=True)
|
||||
self.apply_matrix(z_to_vector(self.axis))
|
||||
return self
|
||||
|
||||
def uv_func(self, u: float, v: float) -> np.ndarray:
|
||||
return np.array([np.cos(u), np.sin(u), v])
|
||||
|
@ -186,6 +185,7 @@ class Line3D(Cylinder):
|
|||
height=get_norm(axis),
|
||||
radius=width / 2,
|
||||
axis=axis,
|
||||
resolution=resolution,
|
||||
**kwargs
|
||||
)
|
||||
self.shift((start + end) / 2)
|
||||
|
@ -376,16 +376,6 @@ class Dodecahedron(VGroup3D):
|
|||
|
||||
super().__init__(*pentagons, **style)
|
||||
|
||||
# # Rotate those two pentagons by all the axis permuations to fill
|
||||
# # out the dodecahedron
|
||||
# Id = np.identity(3)
|
||||
# for i in range(3):
|
||||
# perm = [j % 3 for j in range(i, i + 3)]
|
||||
# for b in [1, -1]:
|
||||
# matrix = b * np.array([Id[0][perm], Id[1][perm], Id[2][perm]])
|
||||
# self.add(pentagon1.copy().apply_matrix(matrix, about_point=ORIGIN))
|
||||
# self.add(pentagon2.copy().apply_matrix(matrix, about_point=ORIGIN))
|
||||
|
||||
|
||||
class Prismify(VGroup3D):
|
||||
def __init__(self, vmobject, depth=1.0, direction=IN, **kwargs):
|
||||
|
|
Loading…
Add table
Reference in a new issue