#!/usr/bin/env python # coding: utf-8 # # three.js tests # In[1]: version() # Test illustrating some opacity issues discussed in [#22408](https://trac.sagemath.org/ticket/22408): # In[2]: var('x y z a b') E1 = x^2 + y^2 + z^2 - a^2 == 0 E2 = x^2 + y^2 - b^2*z^2 == 0 P1 = implicit_plot3d(E1.lhs().subs([a==2]),(x, -2, 2), (y, -2, 2), (z, -2, 2), color="blue", opacity=0.5) P2 = implicit_plot3d(E2.lhs().subs([b==1]),(x, -2, 2), (y, -2, 2), (z, -2, 2), color="yellow", opacity=0.5) P1 + P2 # In[3]: polytopes.dodecahedron().plot(opacity=.5) # Test of the option `single_side` introduced in [#28702](https://trac.sagemath.org/ticket/28702): # In[4]: polytopes.dodecahedron().plot(opacity=.5, single_side=True) # In[ ]: