JoelSjogren

Untitled

Oct 2nd, 2021 (edited)
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 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^4 + v^2 - 1
  7.  
  8. I = ideal(p, dpdt, time)
  9. G = I.groebner_basis()
  10. eqn = G[-1]
  11.  
  12. print(eqn)
  13.  
  14. # plotting
  15.  
  16. var('x0 y0')
  17. eqn = eval(str(eqn).replace('^', '**').replace('x', 'x0').replace('y', 'y0'))
  18. implicit_plot3d(eqn, (-2, 2), (-2, 2), (-2, 2), color='green').show()
  19.  
Add Comment
Please, Sign In to add comment