Advertisement
JoelSjogren

Untitled

Oct 2nd, 2021
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. R.<u,v,x,y,z> = PolynomialRing(QQ, order='lex')
  2.  
  3. p = (x-u)^2 + (y-v)^2 + z^2 - 1/10
  4. dpdt = -v*diff(p, u) + u*diff(p, v)
  5.  
  6. time = u^2 + v^2 - 1
  7.  
  8. I = ideal(p, dpdt, time)
  9. G = I.groebner_basis()
  10. eqn = G[-1]
  11.  
  12. print(eqn)
  13. # x^4 + 2*x^2*y^2 + 2*x^2*z^2 - 11/5*x^2 + y^4 + 2*y^2*z^2 - 11/5*y^2 + z^4 + 9/5*z^2 + 81/100
  14.  
  15.  
  16. # plotting
  17.  
  18. var('x y')
  19. eqn = x^4 + 2*x^2*y^2 + 2*x^2*z^2 - 11/5*x^2 + y^4 + 2*y^2*z^2 - 11/5*y^2 + z^4 + 9/5*z^2 + 81/100
  20. implicit_plot3d(eqn, (-2, 2), (-2, 2), (-2, 2))
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement