Jump to content

A question on n-body physics


Silicon014

Recommended Posts

I have a question which I'm not exactly clear on. Is there no way, shape, or form of n-body gravity that can be utilized by the Unity engine, or is it simply a problem with implementation due to the infinitesimal forces some bodies exert? For example, to combat the implementation problem (if there were n-body gravitational forces), could there be a cut-off at a small fixed number of newtons of gravitational force felt by an object (the cutoff would be at the point when the force felt was so small that an inaccuracy due to floating point errors became incredibly pronounced) in attempt to combat the problems?

I'm simply trying to figure this out. So, is n-body physics a limitation of the Unity engine or simply difficult to implement? If it is indeed the latter, what problems arise in implementing it?

The reason I want to know is that I believe (as do almost everybody else) that a more accurate representation of physics is necessary in a game of KSP's caliber. The ability to utilize Lagrange points and other aspects of n-body physics would be an incredible boost to possibilities in the game (Think about an L4 station between the Mun and Kerbin). Thanks for investing your time as always

Link to comment
Share on other sites

I understand that timewarp uses 'on-rails', which means that all physics is halted. Now, I'm not wanting to make this overly complicated (Continue using point masses instead of density maps, for my computer's sake!), but perhaps it would be possible to calculate a max of 2 or 3 gravitational pulls at once while in warp.

Link to comment
Share on other sites

I understand that timewarp uses 'on-rails', which means that all physics is halted. Now, I'm not wanting to make this overly complicated (Continue using point masses instead of density maps, for my computer's sake!), but perhaps it would be possible to calculate a max of 2 or 3 gravitational pulls at once while in warp.

Nope. The reason timewarp and patched conics work is because we have an equation that can calculate the exact position of a spacecraft at any point in time. Adding even 1 more gravitational pull would make that impossible.

Link to comment
Share on other sites

Is it not possible to calculate the path of an object using said equation, then as a second step (instead of all at once) alter the path separately by applying another formula to the result from earlier? Then in physics, you could calculate it simply? If you were to do this, it would simulate n-body relatively well, would it not?

Link to comment
Share on other sites

Thats not what I'm implying ROFL. What I am implying is that the original path is calculated first, then the values are manipulated by a second formula to 'simulate' n-body. A seemingly simple calculation, I would think...?

Link to comment
Share on other sites

Thats not what I'm implying ROFL. What I am implying is that the original path is calculated first, then the values are manipulated by a second formula to 'simulate' n-body

I was actually replying to the post behind you (You ninja'd me :)). But that method could work, depending on the equation.

Link to comment
Share on other sites

As planets are "on rails", they may be able to fudge L-points for solar system bodies, but not, I imagine, our spacecraft. Unless, they fudge it with some sort of SOI in the right spots? (Something that changes orbits in the region, rather than being a gravity well like regular SOIs.

Link to comment
Share on other sites

I have had an idea that you could reach a closer approximation with no in game calculations. You would make a single gravitational potential map once to identify L-points, this step is more important in complicated areas like jool. Stretch the SoIs of moons to be ovals so that the SoI border is always where gravitational potential is equal for both the moon and planet, do the same for planets relative to the sun. Finally place very small(5000m diameter) SOIs with minimal gravity(0.01g) where L points should be, I understand this would be unrealistic but would make them usable in game.

Link to comment
Share on other sites

From the way I understand it (which is fairly well), the D-Wave Two over at NASA could manage it with some ease, which is exactly WHY NASA decided a quantum computer was such an important thing to have. The D-Wave Two doesn't use gate logic, like traditional computers do, so it has the advantage of being able to parallel process to the Nth absurd degree. This gives it the freedom of calculating the forces acting on bodies simultaneously, smashing records made by previous super-computers. (I seem to recall it was something like 2-3 seconds to solve equations that took computers like K 30+ minutes to solve, but I might be off)

See, the problem is that simulating a N body system is fairly easy, even for a desktop computer (I think Universe Sandbox does this, but IDK for sure). However, SOLVING a system, that is: picking some random point in the future and figuring all the positions/forces at that moment is a HUGE processing sink, making time warp and patched conics impossible. Look at some of the issues we ALREADY have with the conics system!

BTW... Does Quantum Computing jargon sound a bit like spell invocation to anyone else ;D

EDIT: http://www.livescience.com/32080-google-nasa-quantum-computer-d-wave.html corrects some of the statements made above and is chock full of interesting tid-bits, beside!

Edited by Corbald
Link to comment
Share on other sites

Wait, didn't Orbiter have n-body physics and still manage time warp and trajectory calculation?

It has some form of n-body physics, yes.

We'll never get n-body physics for KSP because:

- It would be way to CPU intensive

- The math required is ridiculously complex.

- Implementing (and deriving) n-body equations would take away a lot of time from more pressing issues

- Modifying the maneuver node system to account for n-body physics would be mind-bogglingly complex

- All of this would result in crappy n-body orbits (unintuitive, but realistic orbits; play Orbiter if you want to be totally annoyed about orbits that always change, space stations that require maintenance burns, and generally crappy orbits)

- Mod makers may have a very hard time dealing with the physics (i.e. no more MechJeb autopilot)

Probably the only actual benefit would be Lagrange points and a fancy "Realistic N-body physics simulation!" slapped on marketing material.

In the name of fun, I'll take the current orbital physics any day!

Link to comment
Share on other sites

Gah, Corbald (and Krizzen, man am I a slow poster) you said what I was going to but more eloquently and quickly! D:

Although I think the Wikipedia article on quantum computers is a bit more helpful for those who don't know the difference between classical computers and quantum ones: https://en.wikipedia.org/wiki/Quantum_computer

In short: quantum computers use the fundamental properties of subatomic particles for data storage and manipulation whereas classical computers use transistors. Transistors can benefit from certain quantum effects, especially as they are scaled smaller and smaller, but the basic building blocks remain the same. Quantum computers have an entirely different mathematical and logical basis for their computations, which allow them to do certain things regular computers can't.

Also, Lagrangian points do not necessarily require n-body physics. There are a number of potential ways to emulate them withe the current system.

I added n-body physics to projectiles in a game I'm making, which was really easy to do in retrospect. The problems arise from trying to predict where the projectiles will go, so the AI can aim properly or give humans some reliable guidance. Its one thing to shoot some expendable rocket to blow up another planet, its quite different to try and launch living Kerbals across the system to land safely. (ok maybe not for some...)

Edited by maackey
Link to comment
Share on other sites

*But "semiconductor devices" use "fundamental properties of subatomic particles for data storage and manipulation"

Really, when you get down to it... it is just a different application of the same quantum theory.

Link to comment
Share on other sites

Corbald, the difference is not Quantum Mechanics ("Fundamental Properties of"), it is the implementation OF said theorems.

I was just trying to explain my joke.

The more I think about it, the harder it is to explain actually. All I was saying was that modern computing is deeply connected to quantum mechanics and utilizes it more than the "simple transistor to transistor logic" level.

Edited by Fel
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...