# trunc of a 3D surface not very clean

hi my condition |x|>0.2 makes the "truncature" of the surface not very beautiful can i "cut" more properly ?

f(x,y)=y/x+x^2*y
show(html("<h4>fonction H : Derviches…</h4>"))
lacouleur="olivedrab"
leratio=(1,1,1/4)

# calculs généraux
from sage.manifolds.operators import *
E.<x,y> = EuclideanSpace()
F = E.scalar_field(f)
H=f(x,y).hessian()
show(html("<h5>paramètres généraux</h5>"))
show(T)

# calcul des points critiques
liste=[]
for critique in Cr:
x_et_y_reels=(x(critique).imag()==0 and y(critique).imag()==0)
x_et_y_avec_parametre=(len(x(critique).variables())>0 or len(y(critique).variables())>0)
if(x_et_y_reels or x_et_y_avec_parametre):
liste.append(["(","x","=",x(critique),";","y","=",y(critique),")",H(critique)])
show(html("<h5>points critiques</h5>"))
if (len(liste)!=0):
show(table(liste))
else :
show("pas de points critiques")

# graphique
h(x,y,z)=f(x,y)-z
implicit_plot3d(h, (x, -2.25,2), (y, -2.25, 2), (z, -10, 10),color=lacouleur,aspect_ratio=leratio,adaptive=True,mesh=True,region=lambda x,y,z: x<=-0.2 or x>=0.2)

edit retag close merge delete

Yeah. I would probably remove the mesh, and add plot_points=190