Why Tertiary/Quaternary/Quinary Orbits cause Lag

Discussion in 'Planetary Annihilation General Discussion' started by phlogistinator, July 27, 2014.

  1. phlogistinator

    phlogistinator Active Member

    Messages:
    120
    Likes Received:
    89
    The epicycle is well known in ancient astronomy to explain the perihelion and aphelion precession of planets as they move across space through time. It has been well known that Mercury displays this erratic and non-deterministic behaviour as compared to all other terrestrial and Jovian planets in our solar system, but the reasons for its quirky trajectory were only unveiled at the start of this century when Albert Einstein predicted its advance through the general theory of relativity, which uses highly advanced Schwarzchild equation calculations to compute its exact trajectory. Since time immemorial, many natural philosophers, such as Ptolemy, who was the proprietor of the epicyclic theory of planetary orbits, have marvelled at its grace and lex parsimonae to explain planetary procession.

    [​IMG]
    Above: Ptolemy

    However, what is unknown is that according to theorems uncovered in number theory, most periphelion and aphelion advancements do not follow a repeatable path; meaning, that given an integral number of orbits around its parent star, the orbit may not cross into a prior-taken path. This means that every path that it takes in time is completely unique to each episode of temporal progression. The only chance whereby this is violated when the phase periods of the entire cycle of a planet is a rational number that be expressed as the ratio of two integral numbers, X and Y. A simple theorem shows that if a planet has a phase period of X, it will take Y orbits for it to return to the very same spot, given that X times Y is a rational number. However, if either X or Y is an irrational or transcendental number, or simply not a rational number, then the planet never goes back to its same position.

    [​IMG]
    Above: An example of a primary (dotted line) and secondary orbit (continuous bold line).

    Given this fact, it means that programmers cannot simply upload already pre-calculated pathways for an infinite period of time to quickly allow the PC to access information and compute the exact coordinates of every unit in Planetary Annihilation. Since the percentage of repeatable trajectories are only an infinitesimally small fraction of all possible orbits, it becomes an intractable solution whereby the program has to manually compute and re-calculate every single unit's pathway given tertiary, quaternary, quinary, or higher-level orbits before it can render the graphics for the units. This is even complicated by the fact that in some orbits, X or Y in the above paragraph can be transcendental numbers where each successive number is completely random and is not reducible to a polynomial deterministic problem, which further confounds the situation, as there is no deterministic algorithm for programmers to use to compute the paths directly.

    [​IMG]
    Above: Gauss' doctoral dissertation, which features the very set of number theorems that explains the limitations of planetary orbits.

    As a result, all tertiary or higher orbits will necessarily cause severe lag, due to limitations arising from its inherent mathematics.
    Remy561, Zahav and Corpserule like this.
  2. Geers

    Geers Post Master General

    Messages:
    6,946
    Likes Received:
    6,820
    Except I don't think PA actually uses maths for its orbits.
    stuart98 likes this.
  3. drewsuser

    drewsuser Active Member

    Messages:
    316
    Likes Received:
    139
    Realism is a confirmed no.
    stuart98 likes this.
  4. kvalheim

    kvalheim Post Master General

    Messages:
    1,726
    Likes Received:
    645
    Looks like SOMEBODY wanted to feel smart ;3
    trialq and Geers like this.
  5. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    well I would have preferred it if he HAD been right. I want N-body physics remember?
  6. phlogistinator

    phlogistinator Active Member

    Messages:
    120
    Likes Received:
    89
    Finally someone who understands me!

    For many years, I have held on to the undeniable stigma of being a possessor of a tested I.Q of 65, by trying to fit into human society, but in the end, I realized that humans have considered themselves to be superior to apes. It is true that a 65 I.Q is considered genius levels for a chimpanzee like myself, but as long as human prejudices towards apes continue, we apes will never be heralded as 'smart' on this planet ...

    For years I have gene therapy to 'humanist' myself, but in the end, I'm still an ape and nothing more.
  7. Geers

    Geers Post Master General

    Messages:
    6,946
    Likes Received:
    6,820
    The idea that you can quantify something as complex as human intelligence with a single number is utterly baffling.
  8. Zahav

    Zahav Member

    Messages:
    30
    Likes Received:
    14
    The orbits in this game are not anywhere near that complex. I don't think that they even do patched conics like in Kerbal Space Program let alone any n-body simulation. It's just circles around other bodies and most of the orbits make no physical sense.

    Games with a lot of planets/moons lag because the computer has more surface area to simulate, and likely more units too. You are waaaaay over thinking it.
    drewsuser likes this.
  9. phlogistinator

    phlogistinator Active Member

    Messages:
    120
    Likes Received:
    89
    I'm a chimpanzee :3
  10. mered4

    mered4 Post Master General

    Messages:
    4,083
    Likes Received:
    3,149
    Another rebel! Hooray
  11. totalannihilation

    totalannihilation Active Member

    Messages:
    215
    Likes Received:
    168
    Wrong!!
    I used to have this epic system long time ago (before HDD broke down), called "Moon Chain", up to 5 planets in chained orbits, and it worked perfectly fine, until suddenly a patch created a bug in which you could never land in the last planet of the chain (the quinary planet, counting the first planet as primary and the first moon as secondary planet)

    And by the way, there are no "irrational" numbers in computers, you can not have an infinite string of numbers. The "irrational" numbers in a computer are rationalized from 10 to 30 decimals, depending on the amount of bits it uses to store those numbers. So in the end, every number in a computer is rational
    aevs likes this.
  12. Dementiurge

    Dementiurge Post Master General

    Messages:
    1,094
    Likes Received:
    693
    I'm fully expecting a "I coded the game and even I don't know what this thread is talking about" response.
    stuart98 and aevs like this.
  13. aevs

    aevs Post Master General

    Messages:
    1,051
    Likes Received:
    1,150
    I don't think it's fair to assume this. At all.
    Let's look at a likely scenario:
    Unit transforms are likely given in local space relative to their planet. In such a case, a planet's transformation is computed, and its transformation matrix is then applied to the units' local transforms to show you where they are in global space (man, it's weird to say global or world space when you're talking about planets in space o_O).
    Put simply, the units are parented to the planet. Anyone who's familiar with modeling programs or game engines knows what I mean by this. You don't have to calculate the transform of a unit relative to the sun individually for each unit, you just have to multiply them all by the same transformation matrix (that of their parent planet) at a given time.

    Figuring out those matrices isn't a slow process either, no matter how many nested moons you have.
    With 2 body simulations, finding the exact position of a moon of a moon of a moon at some x point in time isn't really complicated. You have to find the transform of the first planet at that time (which can be easily calculated in O(1) time), you have to find the transform of the first moon relative to that planet at that time (which can be easily calculated in the same way), you have to find the transform of the next moon relative to that moon (which can be easily looked up again), etc. You then multiply all these transformation matrices together to get the final transform of your nested moon.
    The whole process is O(n) where n is the number of nested planets, and each step is very fast. Considering n is going to be very small, the whole thing is negligible.

    tl;dr It is deterministic, and I would be very surprised if it had any effect on lag whatsoever.
    RushSecond and totalannihilation like this.

Share This Page