Jump to content

Why not n-body physics?


Recommended Posts

Why is everyone so hung up on Lagrange points? Seriously, every time someone posts one of these that's like the main reason cited. What definite advantages do Langrange points have over a conics sim orbit with the correct period?

If you want to play with Lagrange points you need a full n-body simulation to simulate them and get the proper interactions. Principia can do that, KSP will never for some very, very obvious reasons.

Link to comment
Share on other sites

26 minutes ago, regex said:

Why is everyone so hung up on Lagrange points? Seriously, every time someone posts one of these that's like the main reason cited. What definite advantages do Langrange points have over a conics sim orbit with the correct period?

If you want to play with Lagrange points you need a full n-body simulation to simulate them and get the proper interactions. Principia can do that, KSP will never for some very, very obvious reasons.

Assembling a space station in a Lissajous orbit, pretty much. No need for n-body simulation.

Edited by sevenperforce
Link to comment
Share on other sites

59 minutes ago, regex said:

f you want to play with Lagrange points you need a full n-body simulation

Not if you have onrails spheres that your ship can dock to if it is moving slowly in one.  

Like asteroids without collisions.  

Link to comment
Share on other sites

If this is what you mean, having more then one body's gravity pull on your ship should not be computationally expensive.  I am assuming that each frame, it calculates a normal vector from your ship's center to the center of the planet, multiplies it by a scalar representing the amount of force, and uses this vector as the "gravity" force for all parts in the ship. It should not be computationally expensive to calculate such a vector for all planets in the system, and then add them together.

Link to comment
Share on other sites

1 hour ago, sevenperforce said:

No need for n-body simulation.

Until people start asking for cycler orbits and such.

35 minutes ago, DAL59 said:

Not if you have onrails spheres that your ship can dock to if it is moving slowly in one.  

Like asteroids without collisions.  

That wouldn't allow a Lissajous orbit though because it's still a 2-body system with SOIs. In fact, it's not actually a Lagrange point because it's a 2-body system. What does it actually accomplish that an orbit with the correct period with the object in the correct place doesn't?

22 minutes ago, c4ooo said:

It should not be computationally expensive to calculate such a vector for all planets in the system, and then add them together.

Now integrate that forward in time to show a correct orbital prediction.

Why ask the developers to half-ass this, trying to mangle a patched-conic approximation with caveats that do nothing for actually providing the realism you crave or just end up requiring even more caveats, when you can already have a proper n-body simulation with enough precision to replicate the recent eclipse when integrated in-game from 1951?

Edited by regex
Link to comment
Share on other sites

21 minutes ago, regex said:

That wouldn't allow a Lissajous orbit though because it's still a 2-body system with SOIs. In fact, it's not actually a Lagrange point because it's a 2-body system. What does it actually accomplish that an orbit with the correct period with the object in the correct place doesn't?

Although you can manually do an L4/L5/L3 lagrange point, an L1 point would be nice fort a refueling base.  

23 minutes ago, regex said:

it's not actually a Lagrange point because it's a 2-body system

Exactly.  A 2-body system is needed to increase computer performance.  

Link to comment
Share on other sites

If you extend SOI radius far enough, you can get orbit around, say, Mun with the same orbital period as Mun has around Kerbin. Any ship on that orbit will maintain its position relative to the Mun and Kerbin.

For Mun you need to increase SOI radius just a little bit, maybe by a factor 1.2 or so, for Minmus twofold increase of SOI radius makes such orbit possible, the same for Ike.

That is, if you really miss Lagrange points.

Link to comment
Share on other sites

23 hours ago, Spricigo said:

My skepticism is about what it brings to the game. As I see it patched conics is a fairly good approximation that's even used in some real life applications.

Lagrange points.  They would be useful.  But I'm not sure it's worth it for just that.

EDIT: I totally didn't see the second page of this thread :confused:

Edited by Alshain
Link to comment
Share on other sites

6 hours ago, DAL59 said:

an L1 point would be nice fort a refueling base.

Why? What advantages does it have over other sorts of bases and stations?

6 hours ago, DAL59 said:

Exactly.  A 2-body system is needed to increase computer performance. 

But a two-body system can't do Lagrange points, you need a full n-body sim that deals away with the concept of SOI to accurately model them. Popping a few small gravity wells into the patched conics sim and calling them "Lagrange points" is going to be very confusing to those who are expecting certain orbital behaviors from them.

Link to comment
Share on other sites

1 hour ago, regex said:

Why? What advantages does it have over other sorts of bases and stations?

But a two-body system can't do Lagrange points, you need a full n-body sim that deals away with the concept of SOI to accurately model them. Popping a few small gravity wells into the patched conics sim and calling them "Lagrange points" is going to be very confusing to those who are expecting certain orbital behaviors from them.

Yeah, the only real advantage of Lagrange points in the real world is that it takes less energy to get to L2 than to TLI, and so you can get more up there with a smaller rocket. Also, in real life, the Moon has many unstable orbits around it, and so the Lagrange points are useful for keeping something near the Moon but not risking orbital decay. However, in KSP, this is not a problem. The Mun has no mascons and thus all non intersecting orbits are stable, and the relative Delta v is reduced so much that fuel depots aren't necessary for Kerbin system travel beyond LKO. You could put one in LKO, but that'd be about all that's truly necessary. Of course, you can put one in Mun orbit as well.

I think you can get away with the three-body problem, but even then it's not worth it.

Link to comment
Share on other sites

The difficulties with N-body physics isn't going to be for the active ship, it's going to be easy enough to sum up the gravity vectors for all the bodies at the start of each gravitational frame, and apply that to each part, and there aren't any gravity gradients strong enough to vary measurably over the size of a ship.

The issue come when trying to draw an orbital path for the current ship and all the other ships in the game. With patched conics the orbit can be predicted and drawn with a relatively simple equation. With n body physics it has to be constantly simulated. Every single frame, for every non-landed ship, for every interval in the future the engine would have to calculate the position.

I haven't tried Principia but I suspect it would struggle with the 200 ships and pieces of debris I currently have.

On the other hand if there were perturbations in orbits meaning that you had to pay attention to station keeping the very first thing i would do is find a mod that would remove it or handle that stuff for me. I'm the director of a space program/an astronaut exploring new worlds, I have back room staff to deal with that kind of tedium. 

Lagrange points are cool but not really worth the hassle.

Edited by tomf
Link to comment
Share on other sites

8 hours ago, tomf said:

The issue come when trying to draw an orbital path for the current ship and all the other ships in the game.

The orbital paths are not necessary.  You could have normal patched conics and on rails lagrange points that are small spheres you can "dock" to.  Maybe rightclicking on the root part and selecting "Attach to lagrange" if you're moving less than 2 m/s?    

Link to comment
Share on other sites

13 hours ago, DAL59 said:

The orbital paths are not necessary.  You could have normal patched conics and on rails lagrange points that are small spheres you can "dock" to.  Maybe rightclicking on the root part and selecting "Attach to lagrange" if you're moving less than 2 m/s?    

That isn't even remotely n-body physics which this thread is about.

Link to comment
Share on other sites

With the risk of sounding ignorant... would n-body physics still have maneuver nodes? The placement of those would be tricky, especially two or three orbits in the future. And what about SOI events, that are useful currently (in, say KAC), and wouldn’t exist in a world where there’s no SOI.

And how would one plot an Eeloo intercept? Not a big deal in patched conics, but I can see how plotting locatings hundreds of days in the future (with sufficient accuracy) can be a problem, especially if you want to see the results now and not having to wait three or four seconds per update.

Or is that all trivial with advanced calculus methods?

Link to comment
Share on other sites

23 minutes ago, sevenperforce said:

Including just outside the Mun's SOI. Which means it has the same function as L1 and L2.

Since the munar gravity isn't simulated, you can only do that for L3, L4, and L5.  If you tried to do L1 or L2, the slower period orbit would quickly lag far behind the Mun.  

Link to comment
Share on other sites

10 minutes ago, Kerbart said:

With the risk of sounding ignorant... would n-body physics still have maneuver nodes? The placement of those would be tricky, especially two or three orbits in the future. And what about SOI events, that are useful currently (in, say KAC), and wouldn’t exist in a world where there’s no SOI.

And how would one plot an Eeloo intercept? Not a big deal in patched conics, but I can see how plotting locatings hundreds of days in the future (with sufficient accuracy) can be a problem, especially if you want to see the results now and not having to wait three or four seconds per update.

Or is that all trivial with advanced calculus methods?

At the risk of repeating many comments, it's already been done & available for you to try. Link to Principia is in the second post in the thread, copy your KSP install & drop it in to test it.

Link to comment
Share on other sites

17 minutes ago, DAL59 said:

Since the munar gravity isn't simulated, you can only do that for L3, L4, and L5.  If you tried to do L1 or L2, the slower period orbit would quickly lag far behind the Mun.  

You can't do it at L1 or L2, correct, but you can do that at ANY point along the Mun's orbit, including right next to the SOI. As long as you stay just slightly outside the SOI, you can have your cismunar L1/L2 clone by parking right ahead of or behind the Mun in its orbit. 

If you want to build a cismunar station, then take a Hohmann transfer out of LKO to swingby the Mun at 6,000 m or so at 0 degrees inclination with a periapsis at the point where the Mun's Kerbin orbit path touches the surface, enter the Mun's SOI, then burn retrograde at Munar periapsis until you are just a few m/s short of capture. When you exit the Mun's SOI, you'd be virtually at rest with respect to the Mun and you'll have no trouble maintaining your orbit there. Subsequent missions can follow the exact same approach and they'll always arrive at the same point. If you have a Munar refueling rig, it only needs 807.1 m/s to reach the station.

Link to comment
Share on other sites

47 minutes ago, Kerbart said:

With the risk of sounding ignorant... would n-body physics still have maneuver nodes? The placement of those would be tricky, especially two or three orbits in the future. And what about SOI events, that are useful currently (in, say KAC), and wouldn’t exist in a world where there’s no SOI.

And how would one plot an Eeloo intercept? Not a big deal in patched conics, but I can see how plotting locatings hundreds of days in the future (with sufficient accuracy) can be a problem, especially if you want to see the results now and not having to wait three or four seconds per update.

Principia allows for mission planning. You basically pick a point in time to start a burn and set some parameters just like you do with a patched conics maneuver node.

https://github.com/mockingbirdnest/Principia/wiki/Concepts#flight-planning-user-interface

If your patched conics approximation is as accurate as the n-body sim you can plan missions using a traditional transfer calculator since the entire point of the patched conics sim was to make planning simpler for actual space missions.

47 minutes ago, Kerbart said:

Or is that all trivial with advanced calculus methods?

Look, a lot of us suck at math but we're willing to give new things a try. The challenge for mathematicians is to boil down the hard calculations to easier concepts. Sometimes you just need some practice to wrap your head around them, same as when you started playing KSP.

Let's face it, KSP will never get an n-body sim in the actual game because ~:effort:~ and ~:money:~. It's simply not going to happen. I also see zero advantage to half-baked kludges like static points someone can "dock to" calling themselves "Lagrange Points" when they're nothing of the sort.

Link to comment
Share on other sites

15 minutes ago, regex said:

nothing of the sort.

True, but on rails dockable sphere are the only thing that could be achieved without an unlikely overhaul.  

1 hour ago, Kerbart said:

would n-body physics still have maneuver nodes?

Orbiter 2010 has a slightly different maneuvering system, but the crafts are still very pilotable.  You just need course corrections, like in RL.  

Link to comment
Share on other sites

46 minutes ago, DAL59 said:

True, but on rails dockable sphere are the only thing that could be achieved without an unlikely overhaul.

They're outside of the patched conics system and would require a whole new set of algorthms. How can KSP plot an intercept if the object is moving in a manner that isn't already handled?

Furthermore, I still see no advantage to having such a thing in the game. They add nothing. Without at least a 3-body sim they're essentially useless.

Link to comment
Share on other sites

9 hours ago, regex said:

They're outside of the patched conics system and would require a whole new set of algorthms. How can KSP plot an intercept if the object is moving in a manner that isn't already handled?

Furthermore, I still see no advantage to having such a thing in the game. They add nothing. Without at least a 3-body sim they're essentially useless.

No only useless. It's in fact detrimental given the non-realistic way a craft in the 'unstable' Lagrange points will not drift away like it should.

 

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...