Skip to content

Integrate n-body code into current architecture #162

Open
@Capital-Asterisk

Description

@Capital-Asterisk

The codebase had evolved significantly since @z-adams worked on an n-body solar system branch. At the time it was written, satellites in the universe were moved around by classes known as "Trajectories." The idea for the Trajectory class turned out to be inefficient; I'm not sure of the exact details, but additional steps were required for setting position data among other issue. As the code became more data-oriented, Trajectories was replaced with "Coordinate Spaces," see section in architecture.md and #124. Coordinate Spaces lay out satellite position and movement data, which can simply be modified by functions in the universe update (universe update doesn't exist after #158 broke it).

Coordinate Spaces were designed around z-adam's code and comments, so porting all the black magic to the new architecture should be relatively easy:tm:.

Parts of the code was moved into the solar-system3 branch where they are commented out; I don't quite remember which one of z-adam's branches is the latest or original.

solar-system3 NBody.h - Likely the important bit to port over
solar-system3 NBody.cpp - SIMD black magic and other stuff

CartesianSimple.h - Example of a simple coordinate space.

Metadata

Metadata

Assignees

No one assigned

    Labels

    plannedLikely a requirement for a 'final' product

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions