Thursday, January 19, 2006

gravity and buoyancy

Well, I got gravity and buoyancy working with Paul's help. I wrote up the calculations and sent them to Tarynn to see if they are right. Here are some results of tests that she asked me to run:

(a) no gravity means everyone should just float upwards
they head up to the top first, slam into the ceiling, and start bouncing back and forth between the ceiling and the floor.

(b) no buoyancy, no velocity, and everyone should sink
they head down to the bottom first, slam into the floor, and start bouncing back and forth between the ceiling and the floor.

(c) no velocity, gravity equals buoyancy and nobody should move
setting the density of the fluid equal to that of the parasite, gravity equals buoyancy and nothing moves.


So, major progress. Still lots to do though.

Sunday, January 15, 2006

Spring semester

I admit, fall semester was not very productive. I spent most of the semester trying to figure out why simrender quit working after I reinstalled everything when I got a new harddrive (100GB! beautiful). Meanwhile I tried to add gravity and buoyancy to the vector updating, and played with a function that would (hopefully) take a 3D point and display it on a 2D plane so that it kind of looked 3D. However, it bothered me because I couldn't really trust what I was seeing.

At the end of the semester I borrowed a laptop from the Westmont CS department, put my old harddrive in and put the two side by side, comparing all the settings for compiling simrender. I verified the old one worked, and then as a test, recompiled it, and it stopped working! So I copied off a fresh version from the backup CD I had made after the summer (so glad I made that). Eventually I realized the problem: at the beginning of the semester I had gotten the bright idea to install a new version of DrScheme because it had some new features. It didn't like some of the functions that were in my code, so I tweaked it, and it would run. What I didn't realize was that simrender did not like this new format. So I went and got the old version of DrScheme and it worked great. I made note of what version to use in the readme for my code.

So now it is spring semester, and I need to write up an application for research credit before the add/drop deadline (Wednesday). Part of that is figuring out what I want to accomplish this semester. I'm hoping that I can get the little parasites bouncing around according to physics by summer. I need to make it sound better than that though. It is discouraging that my goal has gotten that non-ambitious, but I just don't have the physics background. If I can get gravity and buoyancy working, then Tarynn can come out and I'll have a few days to make her explain all the other equations to me.

I did make a breakthrough tonight though. I've been trying to think of how to figure out how simrender handles time short of e-mailing the guy who wrote it and asking. So I set up a few tests. As it turns out, one timestep corresponds to one "second" in simrender. Very handy. Whether it's actually a full second or not depends on how fast your computer can go and such. So now all I have to do is set up the physics stuff so that a timestep is a second. I hope the units come out ok.

I wish I could condense my code--there is so much of it. But then if I'm going to have to re-write it in a different language anyway, there isn't much point. But I don't know if that'll happen...