View source: R/create_system.R
| create_system | R Documentation |
Sets up the foundational data structure for an orbital simulation. Universal N-body gravity is automatically integrated into the system using the specified gravitational constant.
create_system(G = gravitational_constant)
G |
The gravitational constant. Defaults to the real-world value ('gravitational_constant', 6.6743e-11 m^3 kg^-1 s^-2). To simulate a zero-gravity environment (inertia only), set 'G = 0'. |
An empty 'orbit_system' object ready for bodies to be added.
# Creates a system with standard gravity
my_universe <- create_system()
# Creates a universe with 10x stronger gravity
heavy_universe <- create_system(G = gravitational_constant * 10)
# Creates a zero-gravity sandbox
floating_universe <- create_system(G = 0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.