I am a glorious C failure.

I am a glorious C failure.

Down Rodeo
Cap'n Moth of the Firehouse

Find the Hole II Participation Medal
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 08:19 PDT
phoenix_r

2009 May 13 • 905
17 ₧
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.....
BOO
 
 
 
2011 Oct 6 at 10:08 PDT
Down Rodeo
Cap'n Moth of the Firehouse

Find the Hole II Participation Medal
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 16:12 PDT
phoenix_r

2009 May 13 • 905
17 ₧
Did you try reintegrating the coefficients using the Mainzer-Carter algorithm applied to a system of nested matrices?
BOO
 
 
 
2011 Oct 6 at 16:51 PDT
phoenix_r

2009 May 13 • 905
17 ₧
Moves don't seem to be checking gravity if they go straight instead of arcing?
BOO
 
 
 
2011 Oct 6 at 16:52 PDT
Down Rodeo
Cap'n Moth of the Firehouse

Find the Hole II Participation Medal
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 00:45 PDT — Ed. 2011 Oct 7 at 00:46 PDT
phoenix_r

2009 May 13 • 905
17 ₧
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...
BOO
 
 
 
2011 Oct 7 at 10:16 PDT
the_cloud_system
polly pushy pants

2008 Aug 1 • 3080
-6 ₧
I drink to forget but I always remember.
 
 
 
2011 Oct 7 at 13:40 PDT
Down Rodeo
Cap'n Moth of the Firehouse

Find the Hole II Participation Medal
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 10:19 PDT — Ed. 2011 Oct 11 at 10:21 PDT
Down Rodeo
Cap'n Moth of the Firehouse

Find the Hole II Participation Medal
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 08:58 PDT
Rockbomb
Dog fucker (but in a good way now)

2009 Nov 13 • 2045
 
 
 
2011 Oct 16 at 09:29 PDT
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?

Free Steam Games
 
 
 
2011 Oct 16 at 20:11 PDT
SuperJer
Websiteman

2005 Mar 20 • 6629
The important thing is that we're all OK.

Next project: get the zero-mass model of the solar system to work.
 
 
 
2011 Oct 26 at 23:14 PDT
Down Rodeo
Cap'n Moth of the Firehouse

Find the Hole II Participation Medal
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 14:40 PDT
sprinkles

Chrome Whore
2009 Sep 6 • 2547
10 ₧
I don't know what's going on. But I like pictures
 
 
 
2011 Oct 27 at 21:58 PDT
Page [1]