Gravity
One attractive rule, many histories. Sideways motion can bend into orbit; inward bias collapses toward a sink; several wells divide and twist streams. The sphere is a stylised gravitational laboratory—softened, finite-range and capturing—so visitors can feel how initial condition
The idea
One attractive rule, many histories. Sideways motion can bend into orbit; inward bias collapses toward a sink; several wells divide and twist streams. The sphere is a stylised gravitational laboratory—softened, finite-range and capturing—so visitors can feel how initial conditions and numerical choices jointly write trajectories.
Science and concept
Newtonian gravitation associates every mass with an attractive influence on every other mass. In modern vector form, the acceleration of body (i) in an ideal point-mass system can be written
Compact form: a_i = G Σ_j≠ i m_j ( r_j- r_i)/(| r_j- r_i|^3).
The inverse-square magnitude is only part of the story. A force law does not uniquely determine a trajectory: initial conditions matter. A particle starting almost at rest near a massive body accelerates inward. A particle with sufficient transverse velocity continuously falls toward the body while moving sideways, producing an orbit. A faster particle may make a broad fly-by or escape the effective region of influence.
This is the first major lesson of the sphere. Orbit and infall do not require separate “orbit behaviour” and “collapse behaviour.” They can be different outcomes of the same attraction rule applied to different positions and momenta.
The second lesson is superposition. With several mass sources, their acceleration contributions combine. A particle between two attractors does not choose one in advance; its path curves according to the changing vector sum. Small differences in starting state can then produce visibly different streams and capture outcomes.
In a genuine gravitational N-body problem, the massive bodies also move in response to one another, and each body contributes to every other body’s acceleration. Except in special cases, the resulting nonlinear system requires numerical integration. Direct force evaluation scales quadratically with the number of bodies because all relevant pairs must be considered.
AL.Floys preserves the qualitative idea of inverse-distance attraction but changes the problem substantially. For a dust particle at distance (r) from one fixed attractor of stored mass (M), the implemented acceleration magnitude is approximately
Compact form: a(r)=(gM)/(r^2+s),
applied along the direction toward the attractor, where g is the public gravitational-strength scale and s is the engine’s additive softening denominator parameter. The attractor contributes nothing when the particle lies beyond the finite reach value.
At large distance inside the cutoff, this resembles inverse-square attraction. At very small distance, the added denominator prevents the singular acceleration of an ideal Newtonian point mass.
This is a form of gravitational softening, but the implementation should not be described as a standard Plummer kernel. A common softened form instead uses a denominator such as ((r^2+\epsilon^2)^{3/2}) in the vector force. AL.Floys uses its own simpler denominator. The scientific point is the general trade-off: close forces are regularised for numerical stability and visual tractability, but the small-scale law is thereby changed.
Walter Dehnen’s analysis of N-body softening makes that trade-off explicit. Softening can reduce large force fluctuations and numerical noise, but it introduces bias because gravity is artificially weakened or reshaped below the softening scale. More softening is not simply “more accurate.” It exchanges one source of error for another.
The history of computational gravity contains this issue from an early stage. Aarseth and Hoyle’s 1963 galaxy-cluster calculations numerically integrated systems of 25–100 bodies and slightly modified Newtonian forces to obtain convergence near collisions. Regularisation is therefore not an embarrassment unique to visual simulations. It is a recurring necessity in computational models, although the intended fidelity and method vary greatly.
Dust self-attraction in AL.Floys is more aggressively approximate than attraction to the fixed sinks. The engine does not sum all dust–dust pairs. It builds a spatial hash, queries only a local radius derived from reach, scales dust attraction by 0.08, and evaluates at most forty qualifying neighbours for each particle. This keeps real-time work roughly local and bounded, but it means that the public world is not a direct global N-body integration.
The massive attractors are also fixed. Their velocity is zero and the update loop does not accelerate them in response to dust or to one another. A two-attractor Binary chaos preset therefore does not simulate a binary system orbiting its common centre of mass. It places two stationary gravity wells whose overlapping fields bend dust into complicated trajectories.
Velocity damping further separates the engine from an isolated conservative system. Each update multiplies dust velocity by a retention factor derived from the friction parameter. A hard speed cap truncates faster motion. Ideal isolated Newtonian orbits conserve total mechanical energy and angular momentum; this system continually removes kinetic motion and clips extremes.
That is why inward spirals are so prominent. A particle can begin with enough tangential motion to orbit but lose some of that motion each step. Its path then contracts toward the attractor. The image resembles accretion, but the cause is not gas viscosity, collisions, pressure or magnetohydrodynamics. It is explicit velocity damping in a particle model.
Capture introduces another designed rule. The engine computes a capture threshold from the public captureRadius, scaled by the square root of the attractor’s current mass relative to the baseline mass parameter. When dust crosses that threshold, the particle is deleted, 35% of its unit mass is added to the attractor, and the rendered attractor radius grows with the square root of stored mass.
This mechanism creates visually legible absorption and feedback: consumption strengthens the source and changes later capture geometry. It is not an event horizon calculation. No spacetime metric is solved, and the threshold is not derived from the Schwarzschild radius.
The black-hole metaphor becomes even stronger in rendering. The renderer draws a dark central disk, purple glow and a flattened rotating ring-like highlight. These features help visitors locate the sink and read motion around it. They are not lensing, a photon ring, relativistic Doppler beaming or a physical accretion disk.
NASA’s scientifically informed black-hole visualisations show why the distinction matters. A real black-hole appearance depends on general-relativistic light bending, an event horizon, a black-hole shadow and distorted emission from hot orbiting material. None of those optical or relativistic mechanisms is present here.
The boundary conditions are hybrid. Dust wraps toroidally across the screen, including for its local dust-neighbour calculations. The massive attractors remain clamped inside the canvas. This is a convenient interactive world, not an unbounded astronomical domain.
The sphere’s deepest educational value may therefore be methodological. A visitor begins with a famous physical law but encounters a practical computational question: what remains of a concept after the model softens, truncates, samples, damps and renders it? The answer is not “nothing.” Orbit, infall, superposition and capture remain intelligible. But the interpretation must track every approximation.
Current implementation defect affecting scientific interpretation
blackHoleMass is declared as a live control. The simulation’s setParams() rebuilds the world when population, attractor count, initialisation mode, orbital bias or collapse bias changes—but not when blackHoleMass alone changes. Existing attractor objects therefore retain their stored mass after the slider moves.
The changed parameter still influences the reference mass used to scale capture radius, and it applies to attractors created later through reset or Spawn. The result is semantically confusing: the control appears to change existing source mass but does not actually do so.
Before this control is highlighted in public pedagogy, one of three behaviours should be implemented and documented:
- update every existing attractor’s mass and rendered radius live;
- rebuild/reset the world when mass changes; or
- mark the control as reset-bound and communicate that requirement in the UI.
Until then, Black hole mass should not be the featured visitor experiment.
History
Isaac Newton’s Philosophiæ Naturalis Principia Mathematica (1687) unified terrestrial falling and celestial motion through a universal mathematical account of gravitation. The conceptual achievement was not merely that bodies attract. The same law could explain trajectories from falling objects to planetary orbits when combined with initial motion.
The many-body problem quickly became central to celestial mechanics because a simple pair law generates difficult collective trajectories when several bodies interact. Exact analytic solutions are exceptional; approximation and numerical integration are fundamental to the subject.
Electronic computation transformed what could be explored. In 1963, Sverre Aarseth and Fred Hoyle reported numerical integrations of galaxy-cluster models containing 25 to 100 bodies. Their abstract already notes a slight modification of Newtonian forces near collisions to obtain convergence. This is directly relevant to ecospheres.ai: numerical gravity has always involved decisions about close encounters, timesteps, error and cost.
Modern gravitational simulation now spans direct-summation codes, tree methods, particle–mesh methods, adaptive timesteps, specialised hardware and carefully studied softening kernels. Dehnen’s 2001 work formalised the bias–variance trade-off in softened force estimation and showed that kernel choice and adaptive scale matter.
Relativistic black-hole modelling belongs to a different lineage involving Einstein’s field equations, relativistic ray tracing, plasma dynamics and radiative transfer. The visual vocabulary of the current sphere borrows from that domain, but its dynamics remain stylised Newtonian-like particle attraction.
The clean historical sequence for the visitor is:
universal attraction and orbit → numerical many-body approximation → softened real-time interactive world
What this simulates
| Aspect | Current implementation |
|---|---|
| Entities / field | Many unit-mass dust particles and one or more massive fixed attractors; no continuous gravitational field is stored. |
| State | Dust: position, velocity, unit mass, colour/species and alive state. Attractors: fixed position, zero velocity, mutable stored mass and rendered radius. |
| Attractor force | Softened inverse-distance-like attraction with denominator distance² + softening, applied only within finite reach. |
| Dust self-attraction | Local spatial-hash neighbourhood, radius capped around 140 px, scale factor 0.08, at most forty sampled neighbours per particle. |
| Motion update | Acceleration → velocity update → multiplicative damping → hard speed cap → position advance. |
| Boundary conditions | Dust wraps toroidally; attractors are clamped inside the visible canvas. |
| Initial conditions | Random, disk, vortex, binary or gentle distributions determine position and velocity bias. |
| Capture | Dust crossing a mass-scaled threshold is deleted; 35% of its mass is added to the attractor; rendered radius grows. |
| Randomness | Seeded initial placement, initial velocity and pointer spawning. Ordinary force integration is deterministic given state and timestep. |
| Rendering interpretation | Velocity streaks, particle trails, a dark sink, purple glow and rotating flattened ring. The sink graphics are metaphorical. |
| Public simple controls | Population, Black holes, Init mode, Black hole mass and Trail persistence. |
| Public tools | Force, Spawn and Erase. |
| Known semantic issue | Black hole mass is labelled live but does not update mass already stored in existing attractors. |
The most truthful one-line description is: a dissipative particle world organised by fixed softened gravity wells.
What to look for
Orbit versus infall — momentum changes the outcome
Particles with substantial tangential velocity curve around the attractor. Those with stronger inward bias collapse. The contrast shows that the force law alone does not specify the trajectory.
Spiral decay — damping removes orbital support
Paths that initially resemble orbits gradually tighten. The inward migration is evidence of dissipative velocity loss, not a generic property of ideal vacuum gravity.
Capture feedback — absorption changes the later source
Particles disappear at the sink while its stored mass and displayed radius grow. The attractor is not merely a static hole in the picture; capture alters later acceleration and threshold geometry.
Competing wells — vector contributions divide streams
With several fixed attractors, dust paths split, bend and switch apparent allegiance. This makes superposition and sensitivity to position visible.
Filamentation — nearby trajectories separate into streams
A cloud stretches into strands around a well. Slight differences in initial state accumulate into different paths, especially around overlapping fields.
Collapse regimes — initialisation controls morphology
A vortex, disk or random start produces visibly different histories even with similar force parameters. The initial state is a causal part of the model, not cosmetic setup.
Softened centre — the singularity has been removed
Close approaches do not produce an infinite acceleration. The model’s numerically regularised centre is a direct example of an approximation changing small-scale physics.
How to explore
First 30 seconds
- Load Gentle orbits and follow individual streaks rather than the glowing centre.
- Open Parameters and note that Init mode describes how position and velocity are assigned, not a force law.
- Switch Init mode from Disk to Vortex, then use Restart to obtain a fresh field under the chosen initial condition.
- Compare broad curved paths with stronger inward spirals.
- Return to Gentle orbits, open Steer, choose Spawn, select the attractor target, and place one fixed well off-centre. Watch existing trajectories bend toward the newly introduced source.
Do not use Black hole mass as the central live comparison until its existing-attractor update semantics are corrected.
Three experiments
| Experiment | Question | Do | Watch for | Why it matters |
|---|---|---|---|---|
| Same attraction, different start | Can one force regime produce orbit and collapse? | Hold broader settings fixed → choose Disk → Restart → observe → choose Vortex → Restart. | Predominantly tangential paths versus inward-biased spirals. | Separates initial conditions from force law. |
| Superposed sources | What changes when more fixed gravity wells exist? | Start with one attractor → increase Black holes to two or more and rebuild/restart. | Stream splitting, saddle-like regions and competing captures. | Makes vector superposition visible. |
| Add a source to a living field | Can a local source reorganise established trajectories? | Gentle orbits → through Spawn, add an off-centre attractor. | Immediate bending, new streams and redistribution of capture. | Demonstrates source-dependent acceleration without changing all initial conditions. |
An advanced fourth experiment is to vary Softening while holding g, reach and initial mode fixed. Increasing it should make close central acceleration gentler. This is the cleanest route to the numerical-modelling lesson.
Parameters that teach
| Parameter | What it really controls | Increase it | Decrease it | What to watch |
|---|---|---|---|---|
| Init mode | Starting spatial distribution and velocity bias; structural. | Not scalar. | Not scalar. | Orbit, disorder, competing wells or collapse from the same broad dynamics. |
| Black holes | Number of fixed massive attraction centres; structural. | More overlapping source fields. | A simpler central field. | Stream division and competing capture. |
| Black hole mass | Intended source mass for new/rebuilt attractors and capture-radius reference. | Stronger attraction after proper rebuild/update. | Weaker attraction after proper rebuild/update. | Current live-semantics defect; do not infer immediate source change. |
| Gravitational const (advanced) | Global acceleration scale g. |
Faster curvature and collapse. | Gentler trajectories. | Dynamical timescale. |
| Softening (advanced) | Additive suppression of very close acceleration. | Gentler central force and larger deviation from ideal inverse-square behaviour. | Sharper close encounters. | Central fly-bys and capture approach. |
| Reach (advanced) | Finite cutoff for attractor influence; also contributes to dust-neighbour radius. | More global source influence. | More localised wells. | Where trajectories begin to bend. |
| Friction (advanced) | Velocity retention factor; values nearer one preserve motion. | Longer-lived orbital motion. | Faster spiral decay. | Rate of inward migration. |
| Capture radius (advanced) | Artificial absorption threshold before mass scaling. | Earlier, faster capture. | Deeper close approaches. | Consumption rate and sink growth. |
| Max speed (advanced) | Hard velocity ceiling. | Permits faster close motion. | Clips trajectories sooner. | Central stream shape and numerical saturation. |
| Trail persistence (visual) | Duration of drawn trajectory history. | Longer spirals and streams. | Cleaner instantaneous particle state. | It changes legibility, not gravity. |
For the simple public surface, Init mode is currently the strongest scientifically trustworthy control. After the mass issue is fixed, Attractor mass can become a second strong lever.
Presets as experiments
Gentle orbits
The best first preset. Lower force, stronger velocity retention and disk-style initialisation keep individual paths legible. Use it to teach orbit as continuous falling with transverse motion.
Vortex collapse
The reference high-drama regime. Tangential and inward bias combine with damping to produce a spiral toward the sink. Compare it with Gentle orbits to distinguish trajectory regimes.
Slow accretion
A longer-lived inward spiral with gentler capture. It is useful for seeing how damping gradually changes an apparently orbital path.
Catastrophic collapse
A limit case with strong attraction, sharper central force, lower retention and a larger capture threshold. It demonstrates how parameter regime can make almost the entire field drain rapidly.
Binary chaos
Two fixed attractors produce complicated streams. It is useful for superposition and sensitive trajectories but must never be described as two black holes orbiting one another. The sources are stationary.
Recommended learning order: Gentle orbits → Vortex collapse → Slow accretion → Binary chaos → Catastrophic collapse.
Interactions
- Force changes dust velocity locally. It cannot move the fixed attractors. Use it to add or remove local inward/tangential momentum and test trajectory sensitivity.
- Spawn can add dust or a new fixed attractor, depending on the selected target. New dust receives a local tangential velocity distribution; a spawned attractor remains stationary.
- Erase can remove dust or an attractor. Removing a source immediately changes the acceleration landscape.
- Gravity has no Brush tool because dust colour/species does not select a distinct gravitational relationship matrix in this engine.
Spawning and erasing sources are especially powerful because they modify the field generator itself rather than merely perturbing particles already inside it.
What this does not mean
The dark purple objects are not simulations of relativistic black holes. There is no general relativity, curved spacetime, physical event horizon, gravitational lensing, photon sphere, frame dragging, relativistic precession, plasma, radiation or magnetohydrodynamic accretion disk. Capture is a distance threshold; the glow and ring are rendering.
The engine is also not a general direct N-body solver. Attractors are fixed, dust self-gravity is local and sample-limited, source force is cut off beyond reach, dust wraps at the boundary, and velocity is damped and capped.
A shrinking spiral should not be presented as realistic collisionless orbital decay. It is driven principally by the explicit retention factor. A two-source preset is not a binary orbit.
These limitations support rather than weaken the naming decision: Gravity remains true at the level of the generative principle; Black Holes or N-Body Gravity would claim too much.
Why it belongs
Gravity contributes law plus initial condition. The same attractive principle yields orbit, infall, streaming and capture depending on starting state and competing sources. It also introduces a crucial scientific habit for the entire atlas: a simulation is never only a concept rendered. It is a concept filtered through approximation, numerical stability, computational budget, boundary conditions and visual encoding.
Sources
Foundational and primary sources
- Isaac Newton, Philosophiæ Naturalis Principia Mathematica (1687), especially the mathematical treatment linking universal attraction with celestial motion.
- Sverre J. Aarseth and Fred Hoyle, “Dynamical Evolution of Clusters of Galaxies, I,” Monthly Notices of the Royal Astronomical Society 126(3), 223–255 (1963). DOI: 10.1093/mnras/126.3.223.
- Walter Dehnen, “Towards optimal softening in three-dimensional N-body codes — I. Minimizing the force error,” MNRAS 324(2), 273–291 (2001). DOI: 10.1046/j.1365-8711.2001.04237.x.
Modern explanatory sources
- Sylos Labini, “N-body simulations (gravitational),” Scholarpedia. Useful overview of direct-force scaling, softening and computational methods. Article.
- NASA Scientific Visualization Studio, “Black Hole with Accretion Disk Visualization” (2024). Useful authoritative comparison for event horizons, relativistic light bending, lensing and accretion-disk appearance. NASA SVS 14619.