Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Implicit Plot 3D - ThreeJS

I'm trying to plot several algebraic surfaces, most of which have singularities and other especial properties. Using implicit_plot3d and viewer='threejs' works fine for instance

var('x,y,z')
p=x^3+y^3+z^3+1-0.25*(x+y+z+1)^3
r=5
color='aquamarine'
s = implicit_plot3d(p==0, (x,-r,r), (y,-r,r), (z,-r,r), plot_points=50, region=lambda x,y,z: x**2+y**2+z**2<=r*r, color=color)
s.show(frame=False, viewer='threejs')

But when increasing plot_points=100, SageCell does note return any output (demo) (in a Sage Notebook, everything works fantastic). I guess the query may be too hard for SageCell...

Is there a way to optimize the code / query for SageCell to plot algebraic surfaces with acceptable quality?