Graduate 3D rendering of electric field lines of a swiftly moving charge

Click For Summary
SUMMARY

The discussion centers on a program developed to render electric field lines of swiftly moving charges using the Liénard–Wiechert formula. The program generates static images and compiles them into a video showcasing animated field lines for both harmonic and circular movements of charges. Key components include binary search for retarded time solutions, the 8th-order Runge-Kutta Dopr853 method for numerical integration, and a self-developed 3D graphics engine based on a modified FreeType rasterizer. The source code is available on GitHub for further exploration and experimentation.

PREREQUISITES
  • Understanding of the Liénard–Wiechert formula
  • Familiarity with numerical integration techniques, specifically 8th-order Runge-Kutta Dopr853
  • Knowledge of 3D graphics programming and rendering techniques
  • Experience with binary search algorithms
NEXT STEPS
  • Explore the Liénard–Wiechert formula in-depth
  • Learn about numerical integration methods, focusing on Runge-Kutta techniques
  • Investigate 3D graphics programming, particularly using FreeType and z-buffer sorting
  • Experiment with binary search algorithms in the context of time solutions for motion
USEFUL FOR

Physics enthusiasts, software developers in computational physics, and educators looking to visualize electric fields will benefit from this discussion.

euphoricrhino
Messages
23
Reaction score
14
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!
 
  • Like
  • Love
Likes PAllen, Swamp Thing, OmCheeto and 4 others
Physics news on Phys.org
Those are beautiful animations. The false color really helps to visualize the 3D fields.
 
  • Like
Likes euphoricrhino
Wonderful! (And nice accompanying music as well.)
 
Thread 'Colors in a plasma globe'
I have a common plasma globe with blue streamers and orange pads at both ends. The orange light is emitted by neon and the blue light is presumably emitted by argon and xenon. Why are the streamers blue while the pads at both ends are orange? A plasma globe's electric field is strong near the central electrode, decreasing with distance, so I would not expect the orange color at both ends.

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K