They Bounce! (mostly)
Well, in the process of testing the program to figure out why the parasites were sticking I found a problem. As it turns out, I had tried to be cute and given the program too many normals to choose from which made the parasites keep updating to the same velocity which made them look like they were sticking on the wall. So I fixed that, but I found out that when the parasites are bounced straight off of the ceiling, floor, back, or front, they will also stick. Because when the prime axes are calculated they come out to (0, 0, 0) which makes everything zero when the vector is updated. So I'm waiting to talk to Tarynn on this because it's a problem with either the math or how I'm understanding and programming the math and I'm not sure how to fix it in a mathematically legal way. I'm not exactly sure that some of the vectors are reflecting properly, but since they reflect correctly off of the walls which are working (the right and left) I'm going to focus on fixing one problem at a time.
The good news is that I can run the simulation and watch parasites bounce off of walls ad infinitum as long as none of them try to run straight into walls. On the last simulation I ran only two out of ten parasites stuck. But I'm going to need to add a lot more to this because, quite frankly, it looks silly. Parasites don't just bounce back and forth between two walls, they change direction. However, it looks like I will have at least something to show for this summer, lol.
Philippians 4:6-7, 2 Timothy 1:7.
0 Comments:
Post a Comment
<< Home