UmbralRaptor changed the topic of #kspacademia to: https://gist.github.com/pdn4kd/164b9b85435d87afbec0c3a7e69d3e6d | Dogs are cats. Spiders are cat interferometers. | Космизм сегодня! | Document well, for tomorrow you may get mauled by a ネコバス. | <UmbralRaptor> … one of the other grad students just compared me to nomal O_o | <ferram4> I shall beat my problems to death with an engineer.
<soundnfury>
0_o
* soundnfury
responds in a locally linear manner wherein O(ε²) terms may be neglected
<UmbralRaptor>
Yep, using astropy for date conversions.
<egg>
UmbralRaptor: now we have principia's own libs \o/
<egg>
UmbralRaptor: hmm, age of empires is slightly older than starcraft apparently
<UmbralRaptor>
The same principle applies, yes?
<egg>
UmbralRaptor: what principle?
<egg>
UmbralRaptor: afaict the specifics differ quite a bit, I don't think there's an equivalent to the zergling thing
<UmbralRaptor>
Figure out a low tier unit to spam, and use it to autowin small maps?
* UmbralRaptor
got really frustrated with the ubiquity of starcraft and wrote of RTSs as a genre.
<UmbralRaptor>
And of course, these matches with friends are even less fun because you don't know the maps well because the computer can somehow trivially outproduce you, but not them...
<egg>
UmbralRaptor: I don't think you can spam low tier units easily? aoe II tends to devolve into "trash wars" when everyone runs out of gold, but I can't think of anything that sounds like cheap-unit-flood autowin
<egg>
UmbralRaptor: does starcraft have houses? that might be an important factor in preventing such tactics
<UmbralRaptor>
I want to say that there was a long (multiyear) period where one could build 6 zerglings before a terran or protoss player could complete their first military building.
<egg>
UmbralRaptor: that's also a thing, the aoe series has much more similar behaviour across civilizations
<UmbralRaptor>
Technically there's a unit limit, but running a few dozen is trivial. Probably over 100 is where things get iffy.
<egg>
UmbralRaptor: right, whereas aoe requires building more houses to accomodate more troops (or villagers)
<UmbralRaptor>
There are structures that are required to have more units active at one time. But IIRC, they're fairly cheap.
<UmbralRaptor>
Oh, and in the case of the Zerg, it's also a unit. That can be upgraded for use as a detector and/or transport.
<egg>
!wpn UmbralRaptor
* Qboid
gives UmbralRaptor a float lance
egg|cell|egg has joined #kspacademia
egg|phone|egg has quit [Ping timeout: 204 seconds]
egg|phone|egg has joined #kspacademia
egg|cell|egg has quit [Ping timeout: 201 seconds]
egg|phone|egg has quit [Read error: Connection reset by peer]
egg|phone|egg has joined #kspacademia
<egg|work|egg>
!u
<Qboid>
U+007F ()
Snoozee has quit [Quit: CUT THE HARDLINES!!]
Snoozee has joined #kspacademia
Snoozee is now known as Majiir
<egg|work|egg>
!wpn UmbralRaptor
* Qboid
gives UmbralRaptor an orientable constant
<egg|work|egg>
!wpn Iskierka
* Qboid
gives Iskierka an egotistical McBoatFace/geobukseon hybrid
egg|cell|egg has joined #kspacademia
egg|mobile|egg has joined #kspacademia
egg|cell|egg has quit [Read error: Connection reset by peer]
egg|phone|egg has quit [Ping timeout: 186 seconds]
APlayer has joined #kspacademia
<APlayer>
Hi people!
<APlayer>
I have a question on my recent Runge-Kutta Integrator problem.
<APlayer>
So, as I said, I am implementing this in JS. I figured I may define the function f(t, Y) as an actual function that gets t and Y and returns the Y' vector.
<APlayer>
Now, this is probably a newbie questions, but for the velocity - do I just do oldVel + acceleration * time = newVel ?
<APlayer>
Where time is delta-t, that is.
<egg|work|egg>
`nein, das waere Euler
<egg|work|egg>
die Geschwindigkeit ist einfach ein Teil des ys
ferram4 has joined #kspacademia
<APlayer>
Also lasse ich die Geschwindigkeit unverändert?
* egg|work|egg
is probably missing a comma in the above sentence
<APlayer>
Nein, ich meine nicht das.
<APlayer>
Die Funktion f(t, Y) berechnet aus Position, Geschwindigkeit und Zeit die neue Geschwindigkeit und Beschleunigung.
<egg|work|egg>
ja
<APlayer>
Wie manipuliere ich an dieser Stelle die Geschwindigkeit?
<egg|work|egg>
die Geschwindigkeit, die von f berechnet wird, is genau die, die an f gegeben wird
<APlayer>
Also lasse ich sie doch unverändert?
<egg|work|egg>
f(t, (q, v)) = (v, Kraft(t, q))
<egg|work|egg>
genau
<APlayer>
Gut, das war die Frage. Danke vielmals!
<egg|work|egg>
Kraft(t, q, v) eigentlich
<egg|work|egg>
APlayer: es ist aber keine "newVel", fuer f gibt es kein delta-t
* e_14159
switches egg|work|egg back to English.
<e_14159>
(Also, why |work|?)
<APlayer>
Force, probably.
<APlayer>
Ah, that work. Got it.
<APlayer>
Uh, maybe because you usually use it at work? ;-)
<egg|work|egg>
APlayer: f is the derivative, the delta-ts themselves are in the RK method; f lives in the ODE, doesn't know about any delta-t
<egg|work|egg>
e_14159: because I'm at work
* e_14159
is confused about holidays not being the same for every country.
<e_14159>
That's complicated :-)
<egg|work|egg>
arguably given my productivity today, maybe it's a bit of a misnomer >_>
<egg|work|egg>
* e_14159 switches egg|work|egg back to English. << was my German *that* bad? :-p
<e_14159>
Also, egg|work|egg: "das ganze y wird so berechnet als es hier erklaert wird [...]" - the comma missing was before the als, and the als should be a wie
<e_14159>
No, it was perfectly fine; I was just irritiert, dass ich plötzlich Englisch in diesem Channel lese.
<egg|work|egg>
e_14159: yeah, I spotted the comma, but I'm perpetually confused by als vs. wie
<whitequark>
uh
<egg|work|egg>
hi whitequark
<whitequark>
hi
<egg|work|egg>
!wpn whitequark
* Qboid
gives whitequark a Bravais photothyristor
<e_14159>
egg|work|egg: So are most Germans :P
<APlayer>
Egg: And one more thing. The Runge-Kutta Integrator itself does Y_n+1 = Y_n + h * sum(b_i * k_i) for i from i = 1 to s
<APlayer>
But the "Y_n + h * stuff" part adds a vector to a scalar, doesn't it?
<APlayer>
Or is that per coordinate?
<egg|work|egg>
nope, the k_i are vectors
<egg|work|egg>
thus b_i*k_i are also vectors (b_i are scalars), and so is their sum multiplied by the scalar h
<APlayer>
Ah - now I understand!
<APlayer>
Wow, huge thanks!
<whitequark>
!wpn egg|work|egg
* Qboid
gives egg|work|egg a long symbol
<egg|work|egg>
is it ⌠
<egg|work|egg>
!u ⌠
<Qboid>
U+2320 TOP HALF INTEGRAL (⌠)
<APlayer>
Also, "wie" is "how" as in "how you do that" while "als" is something you use in comparisons, "as". For example "Blau _wie_ der Himmel" but "Blauer _als_ der Himmel"
<egg|work|egg>
ah no, maybe it's ⟶
<egg|work|egg>
!u ⟶
<Qboid>
U+27F6 LONG RIGHTWARDS ARROW (⟶)
<APlayer>
Now that I think of it, "als" can probably be used on most, if not all, occasions where you use "as" except those where it could probably be replaced by "how" (...it is) or "the way" (...it is).
Thomas|AWAY is now known as Thomas
APlayer has quit [Read error: Connection reset by peer]
* egg|work|egg
wonders what whitequark's "uh" meant
<egg|work|egg>
!wpn Thomas
* Qboid
gives Thomas a mercury helicoid
egg|phone|egg has joined #kspacademia
egg|mobile|egg has quit [Read error: Connection reset by peer]
egg|cell|egg has joined #kspacademia
egg|phone|egg has quit [Read error: Connection reset by peer]
egg|cell|egg has quit [Read error: Connection reset by peer]
<egg|work|egg>
(still integer dimension, but non-Euclidean fun is fun)
<egg|work|egg>
(might be rather; I haven't actually played the thing)
<egg|work|egg>
e_14159: which holiday is it in the big Kanton in the north?
<e_14159>
egg|work|egg: No idea. Let me check.
<e_14159>
Fronleichnam, apparently.
<egg|work|egg>
e_14159: do you have the 15th of August?
<egg|work|egg>
(we don't have that here, but we do in france)
<egg|work|egg>
maybe it is a thing in the catholic cantons too?
<egg|work|egg>
e_14159: here holidays can depend on canton, or even town, it's quite odd
<e_14159>
egg|work|egg: Yes, but only in Bavaria, and only in villages with a majority of catholic inhabitants.
<egg|work|egg>
:D
<egg|work|egg>
e_14159: here we have Sächsilüüte that's a thing in zurich but not in winterthur (same canton) :D
<e_14159>
Confusing.
<e_14159>
Anyway, off for dinner.
<egg|work|egg>
so early? O_o
APlayer has joined #kspacademia
<APlayer>
Hi again!
<APlayer>
Again, regarding my question from earlier today. This should be easier, a simple vector maths problem. So, I need to calculate the gravity & engine acceleration from position and velocity. The vectors are given in regular 2D space (yes, I simplified that to 2D in the bend).
<APlayer>
How would I go about this? Is it sufficient to calculate each of those per coordinate?
<APlayer>
For example, for gravity, I do gx = GM / x^2 and gy = GM / y^2
<UmbralRaptor>
APlayer: uh, not eggsactly. GM/r^2 multiplied by some angles to get the x and y forces.
<APlayer>
Aww dang.
<UmbralRaptor>
Because the distance is still the same for the craft, no matter your coordinate system.
<APlayer>
And what do you mean by "some angles"?
<APlayer>
Halt, found it
<UmbralRaptor>
ok
<APlayer>
Mag * cos(angle) for x and Mag * sin(angle) for y?
APlayer has quit [Read error: Connection reset by peer]
APlayer has joined #kspacademia
<Iskierka>
assuming x and y and angle are defined that way, yes
<Iskierka>
that way being that angle 0 is pure +x
<APlayer>
Okay, thanks a lot!
egg|cell|egg has joined #kspacademia
egg|phone|egg has quit [Read error: Connection reset by peer]
<APlayer>
Okay, sounds easier than it is. I still need to get the angles, then.
egg|cell|egg has quit [Read error: Connection reset by peer]
* UmbralRaptor
finds spherical (or at least polar) coordinates centered on the planet easiest to think in.
egg|phone|egg has joined #kspacademia
<APlayer>
The given problem apparently gets much easier if using cartesian coordinates.
<Iskierka>
UmbralRaptor, easiest to think in when you don't have accelerations to expand out, at least
egg|phone|egg has quit [Read error: -0x1: UNKNOWN ERROR CODE (0001)]
<APlayer>
May I use acos(x / mag) to geth the angle?
<Iskierka>
where do you have an x term to do so?
<APlayer>
X is the vector x component.
<Iskierka>
yes, but the point here is that would be the x component of the magnitude, which above we get using the angle
<Iskierka>
you need another source of x and a different magnitude
<APlayer>
Uh, the problem is not quite that. I have a velocity, and I need to calculate an engine acceleration if the ship burns prograde.
<Iskierka>
although once you have that you can (often) skip the trig and angles altogether and just use a unit vector as direction to multiply by
<Iskierka>
in that case yes, you can use the velocity vector, normalised to unit, and multiply by acceleration
<Iskierka>
due to float errors trig is a good thing to be avoided as it's very non-reversible
<APlayer>
Another problem is that JS supports no vector maths, so I keep it to a minimum. I implemented, so far, multiplication by a scalar and addition.
<APlayer>
So I would need to implement a function to normalise vectors aswell...
<APlayer>
Oh well.
<Iskierka>
you *could* use something that just supports vectors
<APlayer>
JS is the only language I know well enough to do useful stuff :(
<Iskierka>
That means time to learn another since all curly brackets are similar enough
<APlayer>
Well, I plan to learn C++ next. It's a big project, probably for the summer vacations.
<UmbralRaptor>
Well, the snek language has some nice libraries, and Principia uses C++…
<Iskierka>
C++ is probably a big jump. would recommend java for this, similar enough, introduces things that would be needed later
<Iskierka>
python would also be good but probably need more things changed. Java would just want you to declare your variables
<APlayer>
No, wait. There /are/ libs for JS to use vectors, but I found none to go beyond 3D. And I need 4D. So yeah.
e_14159- has joined #kspacademia
<Iskierka>
Suspect JS may not support sufficient extensibility for n-vectors
<APlayer>
As for what language to use, I feel like C++ is better for me. I have some experience in low level languages as well as in high level ones, C++ is fast and actually useful. Python would be a thing for me too, I even did some stuff with it, but never went really beyond quadratic solvers. I would like a language that supports graphics natively.
<Iskierka>
which, if you were going to 4, would be the most sensible implementation
<Iskierka>
C++ is kind of scary-big though
e_14159 has quit [Ping timeout: 201 seconds]
e_14159- is now known as e_14159
<Iskierka>
and really no languages support graphics "natively"
<Iskierka>
all are using some kind of library, even if Java and C++ come with that library
<APlayer>
Well, so that you don't need to collect dozens of libs for making a decent UI.
<Iskierka>
That'll happen with C++ too
<APlayer>
Oh well. I'll give C++ a try, and if it's too difficult I'll look at Python again. But really, it's mainly the OOP stuff that is hard for me.
<APlayer>
I normalize a vector by dividing every component by the magnitude?
<UmbralRaptor>
By the magnitude of the entire thing, yes.
<APlayer>
Okay, thanks a lot!
<APlayer>
It'll be interesting to make this thing visually plot the trajectory and results. I guess that's what I will do! :D
APlayer has quit [Read error: Connection reset by peer]
BPlayer has joined #kspacademia
<egg>
UmbralRaptor: principia!
* egg
pets UmbralRaptor with Kozai
<UmbralRaptor>
AΑAΑAΑ
<BPlayer>
How many physics ticks does KSP have per second, by default?
<egg>
50, but that's hardly relevant
<BPlayer>
I just want a decent guess at how many steps I need to make with my Runge-Kutta Integrator (may I please abbreviate that as RKI in the future?)
<BPlayer>
That is, I have an estimate on how many seconds the burn takes, and I will multiply that by 50 to get the number of steps.
<egg>
RK method is fine, RKI isn't really standard
<UmbralRaptor>
I'm not sure that KSP is a good baseline for step size. >_>
<BPlayer>
And, by the way, I just had a thought. Remember, when I just asked how to simulate the low TWR burn, you answered I should not use a tarhet orbit as this makes the problem much harder?
<egg>
the whole point of using an RK method is that you can use much larger steps
<egg>
also no need to estimate, just run until the time hits your final time
<BPlayer>
Well, I like to be exact. Let me at least use 10 per second, then.
<egg>
BPlayer: that's pointless
<BPlayer>
Well, I need a delta-t, that's what I am estimating.
<egg>
the entire idea around doing that RK thing is that you can increase the timestep and still be *more accurate* than Euler
<egg>
sure, pick something, let's say a second
<BPlayer>
Okay, what number would you pick?
<egg>
and then you just run things forward until your final time
<kmath>
<typeoneerror> @canuckistani @firefox .let me know if you need any literal #firefox shots—mochi got you covered #onbrand https://t.co/khO8oYbCFN