-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Description
Description of bug / unexpected behavior
When creating ThreeDAxes and adding a surface using the OpenGL renderer, the surface is rendered on top of the axes. This does not happen when using the Cairo renderer.
Expected behavior
Surface objects should not be rendered over the axes when plotting
How to reproduce the issue
Code for reproducing the problem
from manim import *
import numpy as np
class Test(ThreeDScene):
def construct(self):
self.set_camera_orientation(phi=75 * DEGREES, theta=-20 * DEGREES)
axes = ThreeDAxes(
x_range=[0, 3, 1],
y_range=[0, 3, 1],
z_range=[-1, 1, 1]
)
def func(x, y):
return np.cos(x) * np.sin(y)
surface = axes.plot_surface(
function=func,
u_range = (0, 3),
v_range = (0, 3),
colorscale = ['#482173', '#2e6f8e', '#29af7f', '#bddf26']
)
self.add(axes, surface)Additional media files
It might be difficult to see due to the light reflecting off the surface, but the ThreeDAxes is in front of the surface for the Cairo output, but is half-covered for the OpenGL output even though that is the z-axis at the origin and the function doesn't cross the origin.
Logs
Terminal output
PASTE HERE OR PROVIDE LINK TO https://pastebin.com/ OR SIMILAR
System specifications
System Details
- OS (with version, e.g., Windows 10 v2004 or macOS 10.15 (Catalina)):
- RAM:
- Python version (
python/py/python3 --version): - Installed modules (provide output from
pip list):
PASTE HERE
LaTeX details
- LaTeX distribution (e.g. TeX Live 2020):
- Installed LaTeX packages:
FFMPEG
Output of ffmpeg -version:
PASTE HERE
Additional comments
rgreen32
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
✅ Done

