Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
447 changes: 320 additions & 127 deletions manim/mobject/three_d/three_dimensions.py

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file modified tests/test_graphical_units/control_data/threed/Arrow3D.npz
Binary file not shown.
Binary file modified tests/test_graphical_units/control_data/threed/Cone.npz
Binary file not shown.
Binary file modified tests/test_graphical_units/control_data/threed/Cylinder.npz
Binary file not shown.
Binary file modified tests/test_graphical_units/control_data/threed/Dot3D.npz
Binary file not shown.
Binary file not shown.
Binary file modified tests/test_graphical_units/control_data/threed/Line3D.npz
Binary file not shown.
Binary file modified tests/test_graphical_units/control_data/threed/Sphere.npz
Binary file not shown.
Binary file not shown.
Binary file modified tests/test_graphical_units/control_data/threed/Torus.npz
Binary file not shown.
Binary file modified tests/test_graphical_units/control_data/threed/Y_Direction.npz
Binary file not shown.
18 changes: 18 additions & 0 deletions tests/test_graphical_units/test_threed.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,24 @@ def param_surface(u, v):
scene.add(axes, surface_plane)


@frames_comparison(base_scene=ThreeDScene)
def test_Implicit_Surface(scene):
resolution_fa = 16
scene.set_camera_orientation(phi=75 * DEGREES, theta=-120 * DEGREES)
axes = ThreeDAxes(x_range=(-5, 5, 1), y_range=(-5, 5, 1), z_range=(-5, 5, 1))

implicit_surface = ImplicitSurface(
lambda x, y, z: np.cos(x) * np.sin(y)
+ np.cos(y) * np.sin(z)
+ np.cos(z) * np.sin(x),
x_range=(-np.pi, np.pi),
y_range=(-np.pi, np.pi),
z_range=(-np.pi, np.pi),
checkerboard_colors=False,
)
scene.add(axes, implicit_surface)


def test_get_start_and_end_Arrow3d():
start, end = ORIGIN, np.array([2, 1, 0], dtype=np.float64)
arrow = Arrow3D(start, end)
Expand Down
Loading