egg changed the topic of #principia to: Logs: https://esper.irclog.whitequark.org/principia | <scott_manley> anyone that doubts the wisdom of retrograde bop needs to get the hell out | https://xkcd.com/323/ | <egg> calculating the influence of lamont on Pluto is a bit silly…
_whitelogger has joined #principia
_whitelogger has joined #principia
_whitelogger has joined #principia
_whitelogger has joined #principia
<queqiao-> ⟨pedro4316⟩ what does principia do to calculate craft angular momentum and such
<queqiao-> ⟨pedro4316⟩ asking cause another game i play has issues with rotating objects loosing angular momentum, its just 2d, but has low hundreds of objects rotating
<queqiao-> ⟨pedro4316⟩ +and occasionally colliding
_whitelogger has joined #principia
_whitelogger has joined #principia
<queqiao-> ⟨sichelgaita⟩ We solve Euler's rotation equations (https://en.wikipedia.org/wiki/Euler%27s_equations_(rigid_body_dynamics)). The good thing is that they have a closed form solution, so they can be solved very efficiently. As indicated in the comment above, this requires to effectively replace PhysX.
<queqiao-> ⟨sichelgaita⟩ But I would imagine that in 2D the problem would be much simpler, although you'd have to pay attention to the conservation of angular momentum during collisions.
<_whitenotifier-ee4> [Principia] pleroy closed pull request #3804: A bunch of micro-optimizations in the adapter - https://github.com/mockingbirdnest/Principia/pull/3804
<queqiao-> ⟨siimav⟩ sichelgaita consider using "Dictionary<K, V>.TryGetValue(key, out var value)" instead doing the hashcode calculation and lookup twice.
<queqiao-> ⟨sichelgaita⟩ Sounds reasonable, but do you have a particular code fragment in mind, or just a general advice?
<queqiao-> ⟨siimav⟩ Just in general. I did a quick scrollthrough and noticed this.
_whitelogger has joined #principia