euphoricrhino
- 23
- 7
- TL;DR
- Presenting rendering of electric field line of swiftly moving charges according to the Liénard–Wiechert formula. Video and source code are available.
Happy holidays folks.
So I spent some time over the Thanksgiving holidays and developed a program that renders electric field lines of swiftly moving charges according to the Liénard–Wiechert formula. The program generates static images based on the given trajectory of a charge (or multiple), and the images were compiled into a video that shows the animated field lines for harmonic movement and circular movement of a charge (or two charges).
Video:
The source code is available here https://github.com/euphoricrhino/go-common/tree/main/visualizer/examples/swift-charge-field-line
Key ingredients
* binary search for efficiently finding retarded time solution for arbitrary subluminal motion
* 8th-order Runge-Kutta Dopr853 for numerical integration
* self-developed 3D graphix engine for 3D space curve rendering (modified on top of freetype rasterizer with z-buffer sorting)
These renderings helped me get a better understanding of the "spiral" pattern mentioned in Jackson textbook.
You are welcome to play with the code with your own setups.
Happy Rendering!
So I spent some time over the Thanksgiving holidays and developed a program that renders electric field lines of swiftly moving charges according to the Liénard–Wiechert formula. The program generates static images based on the given trajectory of a charge (or multiple), and the images were compiled into a video that shows the animated field lines for harmonic movement and circular movement of a charge (or two charges).
Video:
The source code is available here https://github.com/euphoricrhino/go-common/tree/main/visualizer/examples/swift-charge-field-line
Key ingredients
* binary search for efficiently finding retarded time solution for arbitrary subluminal motion
* 8th-order Runge-Kutta Dopr853 for numerical integration
* self-developed 3D graphix engine for 3D space curve rendering (modified on top of freetype rasterizer with z-buffer sorting)
These renderings helped me get a better understanding of the "spiral" pattern mentioned in Jackson textbook.
You are welcome to play with the code with your own setups.
Happy Rendering!