Part 2 of calculating the electron wavefunctions for hydrogen.
Background
It’s done! (Technically it was done a month ago, I just never wrote about it).
https://www.reddit.com/r/Physics/comments/gt1set/interactive_electron_orbitals_of_hydrogen/
Source code can be found here:
https://github.com/c0nrad/hydrogen
Technical Implementation Notes
- I ended up just sampling the wave functions, and saving it to a JSON file for the web component to read
- Originally each point was a three.js sphere, but that ran way to slow, so I got to try vertex/fragement shaders for the first time! (using a THREE.cloud)
- The little control panel is actually pretty neat. Just a few lines of code
Overall super happy with it!
Future
Done with this project, but already onto the next! Stay tuned!