You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi everyone,
I’m currently exploring 3D scenes in ManimGL.
In my scene below, I create a triangle and place spheres at the vertices and Line3D objects along the edges. Everything between the vertices and edges seems fine, but once I add object poly (with fill_opacity = 0.6) to the scene, it appears to cover or overlap the vertices and edges.
How can I fix this issue? Any help would be greatly appreciated.
Thanks in advance!
<img width="3840" height="2160" alt="Test3D" src="https://github.com/user-attachments/assets/29be7f2f-afe9-469f-bc1c-18220aefdd98" />
from manimlib import *
class Test3D(ThreeDScene):
def construct(self):
poly = Polygon([-3, 0, 0], [3, 0, 0], [0, 0, 2])
poly.set_stroke(width=0)
poly.set_fill(BLUE_E, opacity=0.6)
verts = Group(
*[
Sphere(resolution=(51, 26), radius=0.2, color=RED_B).move_to(vert)
for vert in poly.get_vertices()
]
)
edges = Group(
*[
Line3D(v1, v2, width=0.1, color=GREY_A)
for v1, v2 in adjacent_pairs(poly.get_vertices())
]
)
ax = ThreeDAxes()
self.add(ax, verts, edges, poly)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I’m currently exploring 3D scenes in ManimGL.
In my scene below, I create a triangle and place spheres at the vertices and Line3D objects along the edges. Everything between the vertices and edges seems fine, but once I add object poly (with
fill_opacity = 0.6
) to the scene, it appears to cover or overlap the vertices and edges.How can I fix this issue? Any help would be greatly appreciated.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions