mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Fix cube
This commit is contained in:
parent
db6d25280b
commit
26b977febe
1 changed files with 4 additions and 3 deletions
|
@ -96,7 +96,7 @@ class ParametricSurface(VGroup):
|
||||||
class Sphere(ParametricSurface):
|
class Sphere(ParametricSurface):
|
||||||
CONFIG = {
|
CONFIG = {
|
||||||
"resolution": (12, 24),
|
"resolution": (12, 24),
|
||||||
"radius": 3,
|
"radius": 1,
|
||||||
"u_min": 0.001,
|
"u_min": 0.001,
|
||||||
"u_max": PI - 0.001,
|
"u_max": PI - 0.001,
|
||||||
"v_min": 0,
|
"v_min": 0,
|
||||||
|
@ -128,8 +128,9 @@ class Cube(VGroup):
|
||||||
|
|
||||||
def generate_points(self):
|
def generate_points(self):
|
||||||
for vect in IN, OUT, LEFT, RIGHT, UP, DOWN:
|
for vect in IN, OUT, LEFT, RIGHT, UP, DOWN:
|
||||||
face = ThreeDVMobject(
|
face = Square(
|
||||||
Square(side_length=self.side_length)
|
side_length=self.side_length,
|
||||||
|
shade_in_3d=True,
|
||||||
)
|
)
|
||||||
face.make_jagged()
|
face.make_jagged()
|
||||||
face.flip()
|
face.flip()
|
||||||
|
|
Loading…
Add table
Reference in a new issue