Down Rodeo
Cap'n Moth of the Firehouse
2007 Oct 19 • 5486
57,583 ₧
|
I might need to ask you, internet, about my C coding style. The "might" is because I am still attempting to fix this program. I *might* get it fixed. If I don't, well, you know. Problems abound.
|
|
|
|
≡
|
2011 Oct 6 at 15:19 UTC
|
|
|
|
I'm glad you primed us here, I'll stand at the ready until I am called into action, or until you give the all-clear. Inhale, and hooooold.....
|
|
|
|
≡
|
2011 Oct 6 at 17:08 UTC
|
|
|
Down Rodeo
Cap'n Moth of the Firehouse
2007 Oct 19 • 5486
57,583 ₧
|
It looks like it might be a partial rewrite, to be honest. It's supposed to solve the motion of the planets in the solar system, at the moment as far as I can tell all it does is send everything flying off in completely straight lines. To me, it makes no sense, but I shall investigate more. It's not like I don't know the maths, I've done it before, but I've never written a program this size in C. It's getting rather complex and I am a little worried.
Of course there is also the question of do I get help from the internets, it is somewhat part of my Senior Honours project. If after the weekend no progress has been made I'll start posting snippets, but for the moment I'll sulk. I've no idea where it's going wrong.
|
|
|
|
≡
|
2011 Oct 6 at 23:12 UTC
|
|
|
|
Did you try reintegrating the coefficients using the Mainzer-Carter algorithm applied to a system of nested matrices?
|
|
|
|
≡
|
2011 Oct 6 at 23:51 UTC
|
|
|
|
Moves don't seem to be checking gravity if they go straight instead of arcing?
|
|
|
|
≡
|
2011 Oct 6 at 23:52 UTC
|
|
|
Down Rodeo
Cap'n Moth of the Firehouse
2007 Oct 19 • 5486
57,583 ₧
|
phoenix_r said: Did you try reintegrating the coefficients using the Mainzer-Carter algorithm applied to a system of nested matrices?
Can't tell if serious or I just have no idea what that is.
Yes, it would imply that something is going horribly wrong, the current setup is a thing called derivative() which provides the gradient of the system as a whole, if you like. Strong chance that the mistake could be there tbh. The function that does the integrating makes repeated calls to this because that's how the RK4 algorithm works. I've thought of a way to test that bit, actually, by making sure that for a simple system the derivative calculation is correct. It's definitely going very weird somewhere.
And yeah I meant to say, for the very simple system it flies off in a direction that it has no velocity component in, if you see what I mean.
|
|
|
|
≡
|
2011 Oct 7 at 07:45 UTC
— Ed. 2011 Oct 7 at 07:46 UTC
|
|
|
|
Down Rodeo said: phoenix_r said: Did you try reintegrating the coefficients using the Mainzer-Carter algorithm applied to a system of nested matrices?
Can't tell if serious or I just have no idea what that is.
crap, meta-trolled...
|
|
|
|
≡
|
2011 Oct 7 at 17:16 UTC
|
|
|
|
I drink to forget but I always remember.
|
|
|
|
≡
|
2011 Oct 7 at 20:40 UTC
|
|
|
Down Rodeo
Cap'n Moth of the Firehouse
2007 Oct 19 • 5486
57,583 ₧
|
I found the problem. I was not scaling the first k from RK4 by h which meant that it was taking giant steps, and was very inaccurate. I seem to remember there was some other problem... regardless I am now experiencing a severe cold which is bloody annoying. :(
No wait! It was far, far worse than that. I have gone down the route of having two vectors, one for position and one for velocity, and in my "set" method I accidentally set the velocity to the position, which is why it didn't make any kind of sense. MY BAD.
|
|
|
|
≡
|
2011 Oct 11 at 17:19 UTC
— Ed. 2011 Oct 11 at 17:21 UTC
|
|
|
Down Rodeo
Cap'n Moth of the Firehouse
2007 Oct 19 • 5486
57,583 ₧
|
Additionally, due to an overzealous copy() method, all the masses of the objects in the system were being set to zero after one iteration, so everything traveled in straight lines. Works now like a peach!
|
|
|
|
≡
|
2011 Oct 16 at 15:58 UTC
|
|
|
Rockbomb
Dog fucker (but in a good way now)
2009 Nov 14 • 2045
|
|
|
|
|
≡
|
2011 Oct 16 at 16:29 UTC
|
|
|
SRAW
Rocket Man
2007 Nov 6 • 2525
601 ₧
|
phoenix_r said: Did you try reintegrating the coefficients using the Mainzer-Carter algorithm applied to a system of nested matrices?
|
|
|
|
≡
|
2011 Oct 17 at 03:11 UTC
|
|
|
|
The important thing is that we're all OK.
Next project: get the zero-mass model of the solar system to work.
|
|
|
|
≡
|
2011 Oct 27 at 06:14 UTC
|
|
|
Down Rodeo
Cap'n Moth of the Firehouse
2007 Oct 19 • 5486
57,583 ₧
|
In a sense, it does! A zero mass solar system would fly apart, just as it did in my program. Great success I guess. If I make enough progress tomorrow to have some kind of visualisation going on I'll post a link to the code such that all you people who are clearly *very* interested can have a look.
|
|
|
|
≡
|
2011 Oct 27 at 21:40 UTC
|
|
|
|
I don't know what's going on. But I like pictures
|
|
|
|
≡
|
2011 Oct 28 at 04:58 UTC
|
|
|
Page [1]
|