I am working on a visual python program that is meant to model the orbit of an electron around the core of a Hydrogen atom. In order to avoid the singularity at r = 0 in the equation for coulomb force, I am modelling this scenario in semi-parabolic coordinates. My question then is how can I change from cartesian coordinates to semi-parabolic coordinates within python?
Take the 2-minute tour
×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.
I'd start with a pair of functions that converts from one coordinate system to another:
I hope you have the formulas and won't have trouble implementing the functions. Then you convert the coordinates where it's convenient. I suppose that you should read input values, convert to parabolic, do your calculations, convert back to Cartesian and output. |
|||||||||||||||||
|