Equations for Graviton Particle?

  • agustrusher
    11th Nov 2017 Member 0 Permalink

    I wasn't sure if I should post here, because I know nothing about programming, or in the help section, because this isn't a technical problem. I just decided posting here was more relevant.

     

    Essentially, I'm wondering if there is a general equation used to dictate the GRVT particle's behavior in TPT, determined by variables such as tmp, distance between particles, etc.  If that can be directly pulled from the programming, without any coding lingo, that would be great. I know calculus and some physics, but I couldn't for the life of me understand code.

     

    Now, if this isn't possible because of reasons beyond my comprehension, I'm sorry for bothering you guys.  I was asking in the first place because I'm trying to optimize some GRVT interactions in a save I'm working on, and I was thinking I could to some extent rely on number work rather than trial and error.

     

    Thanks for reading.

     

  • jacob1
    11th Nov 2017 Developer 0 Permalink
    Basically, this "isn't possible because of reasons beyond my comprehension"

    GRVT uses the same gravity map that everything else does (including BHOL / WHOL and the gravity tools). It just sets it like this: https://github.com/ThePowderToy/The-Powder-Toy/blob/master/src/simulation/elements/GRVT.cpp#L57

    Gravity is then calculated globally using a library called fftw3f. It is very far beyond my understanding, I actually know nothing about it besides it does use calculus! Something called Fourier Transformations. Anyway, it magically looks at the gravity sources and produces a map of what the gravity is across the entire simulation.

    Then when GRVT is updating, it uses gravity to calculate its new velocity, like most particles. That's why it sticks together.


    It does use .tmp to control how much gravity is created though, which you can see in the linked code.
    Edited 3 times by jacob1. Last: 13th Nov 2017
  • agustrusher
    13th Nov 2017 Member 0 Permalink

    Thank you for your response!

    I admit the code in that link is beyond me right now. Maybe if I work at it it will make sense.

    But the reference to Fourier transformations certainly is a good starting place for the calculus work, thank you for that.

    Lastly, to you, a developer, I'd like to say that I really love your game - have loved it since I was in 6th grade. It's wonderful, and I appreciate all the work you and your Co developers put into it. I've never properly said this, but now I have, and I hope you pass it on.

    Thank you.