-
Notifications
You must be signed in to change notification settings - Fork 0
How CurveSimulator works
Uli Scheuss edited this page Dec 26, 2024
·
20 revisions
CurveSimulator operates through the following main steps:
-
Parameter Acquisition
- Read parameters from the configuration file.
-
System Initialization
- Initialize celestial bodies.
- If not provided in the config file, calculate each body's state vector from its Kepler orbit parameters.
-
Iterative Simulation
Starting with initial state vectors (positions and velocities) for all bodies:
- Calculate eclipses and resulting total luminosity of the star system.
- Project body positions after a short time interval (as defined in the config file), assuming linear motion.
- Compute inter-body gravitational forces and update velocities accordingly.
- Proceed to the next iteration with updated positions and velocities.
-
Video Generation
- Select a subsample of calculated positions and luminosities for animation.
- Generate individual frames using matplotlib (1 frame per sampling_rate iterations).
- Compile frames into a video using ffmpeg.
Note: The physics simulation runs much faster than the animation process, hence the use of subsampling for video creation.
CurveSimulator Wiki