<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-14096479</id><updated>2011-04-21T15:02:01.872-07:00</updated><title type='text'>Paranoid Swarming</title><subtitle type='html'>This is an online logbook of my BBSI project at VCU.  As part of the Virtual Parasite Project, I'm modeling the interactions of virtual T. cruzi parasites (paranoids) with each other, their environment, and the host cells they invade.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://vppswarm.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://vppswarm.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Cailin</name><uri>http://www.blogger.com/profile/10747965760787583472</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-14096479.post-113769540341283004</id><published>2006-01-19T10:26:00.000-08:00</published><updated>2006-01-19T10:30:03.433-08:00</updated><title type='text'>gravity and buoyancy</title><content type='html'>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:&lt;br /&gt;&lt;br /&gt;(a) no gravity means everyone should just float upwards&lt;br /&gt;they head up to the top first, slam into the ceiling, and start bouncing back and forth between the ceiling and the floor.&lt;br /&gt;&lt;br /&gt;(b) no buoyancy, no velocity, and everyone should sink&lt;br /&gt;they head down to the bottom first, slam into the floor, and start bouncing back and forth between the ceiling and the floor.&lt;br /&gt;&lt;br /&gt;(c) no velocity, gravity  equals buoyancy and nobody should move&lt;br /&gt;setting the density of the fluid equal to that of the parasite, gravity equals buoyancy and nothing moves.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So, major progress.  Still lots to do though.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14096479-113769540341283004?l=vppswarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vppswarm.blogspot.com/feeds/113769540341283004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14096479&amp;postID=113769540341283004&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/113769540341283004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/113769540341283004'/><link rel='alternate' type='text/html' href='http://vppswarm.blogspot.com/2006/01/gravity-and-buoyancy.html' title='gravity and buoyancy'/><author><name>Cailin</name><uri>http://www.blogger.com/profile/10747965760787583472</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14096479.post-113739691980340207</id><published>2006-01-15T23:15:00.000-08:00</published><updated>2006-01-15T23:35:19.840-08:00</updated><title type='text'>Spring semester</title><content type='html'>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. &lt;br /&gt;&lt;br /&gt;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. &lt;br /&gt;&lt;br /&gt;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. &lt;br /&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;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...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14096479-113739691980340207?l=vppswarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vppswarm.blogspot.com/feeds/113739691980340207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14096479&amp;postID=113739691980340207&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/113739691980340207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/113739691980340207'/><link rel='alternate' type='text/html' href='http://vppswarm.blogspot.com/2006/01/spring-semester.html' title='Spring semester'/><author><name>Cailin</name><uri>http://www.blogger.com/profile/10747965760787583472</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14096479.post-112338699761439648</id><published>2005-08-06T23:57:00.000-07:00</published><updated>2005-08-06T20:56:37.623-07:00</updated><title type='text'>End of summer</title><content type='html'>Once again, they are bouncing... I think. The way that Tarynn came up with to troubleshoot my calculations suggested a shortcut in the calculations. A really short shortcut actually--it took like ten minutes to program in. And now what John said a few weeks ago finally makes sense--the only part of the vector that needs to be changed is the part that is normal to the plane that it is hitting. So instead of setting up a local coordinate system and using trig to flip the vector around, we can take the vector and change the sign on the coordinate that corresponds to the wall it is hitting. It seems strange that it would be that easy so I want to test it a lot more. I learned a LOT more about vectors than I would have if I had just started out with swapping the sign though. So I think greater confidence when dealing with vectors is worth the extra work.&lt;br /&gt;&lt;br /&gt;I ran some tests with the new way of calculating: first with the parasites starting in the middle and then bouncing straight back and forth against the walls (left-right, top-bottom, and front-back) and then I also tried one where the parasites bounce back and forth catty-corner. It passed with flying colors. I also tried one where the parasite hits the middle of each side (right, back, left, front, etc). That one also worked. So eventually I made a file with around a hundred parasites all milling around and it looks pretty good.&lt;br /&gt;&lt;br /&gt;It did look like it was doing a few strange things though. Occasionally it looked like the parasites were skating along the wall a small distance before taking off again. Occasionally it also looked like they were bouncing against the same wall twice. It was a little difficult to see, and it could just be the 3D perspective. I may need to run the binary file through Ford's program and actually look at the numbers. I can't think of anything in the program that would cause this, but we'll see.&lt;br /&gt;&lt;br /&gt;I'm keeping a copy of the latest versions of the prototype--both the new way of calculating and the other way too (I spent too much time on it to delete it. and it may come in handy later). Both are commented like crazy so I should be able to figure out what is going on if I come back to it later. I also wrote up a readme and I'm putting together a CD for Tarynn with just about everything on it. When I get home I need to burn my own copy of the CD too.&lt;br /&gt;&lt;br /&gt;The summer ends how it began--with lots of paperwork and presentations. Check my website in a day or two for links to my research presentation and my research proposal for the academic year.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14096479-112338699761439648?l=vppswarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vppswarm.blogspot.com/feeds/112338699761439648/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14096479&amp;postID=112338699761439648&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112338699761439648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112338699761439648'/><link rel='alternate' type='text/html' href='http://vppswarm.blogspot.com/2005/08/end-of-summer.html' title='End of summer'/><author><name>Cailin</name><uri>http://www.blogger.com/profile/10747965760787583472</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14096479.post-112301352779193447</id><published>2005-08-02T16:13:00.000-07:00</published><updated>2005-08-02T22:17:20.196-07:00</updated><title type='text'>They Bounce!  (mostly)</title><content type='html'>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.&lt;br /&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://bible.gospelcom.net/passage/?search=Philippians%204:6-7;&amp;version=49;"&gt;Philippians 4:6-7&lt;/a&gt;, &lt;a href="http://bible.gospelcom.net/passage/?search=2%20Timothy%201:7;&amp;version=49;"&gt;2 Timothy 1:7&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14096479-112301352779193447?l=vppswarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vppswarm.blogspot.com/feeds/112301352779193447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14096479&amp;postID=112301352779193447&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112301352779193447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112301352779193447'/><link rel='alternate' type='text/html' href='http://vppswarm.blogspot.com/2005/08/they-bounce-mostly.html' title='They Bounce!  (mostly)'/><author><name>Cailin</name><uri>http://www.blogger.com/profile/10747965760787583472</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14096479.post-112265398132349896</id><published>2005-07-29T12:20:00.000-07:00</published><updated>2005-07-29T09:26:28.883-07:00</updated><title type='text'>IT WORKS!!!!!!!</title><content type='html'>Ford came over today and we looked at my code. He thought the problem might be that I was setting the length of each number to 4 bytes, so he wrote a quick program in C++ that would read in my binary file and display the numbers in ASCII. So he tests it a bit and then pulls up a list of numbers and asks "are these the radii of the cells?"&lt;br /&gt;&lt;br /&gt;Oops. Turns out there is not just one number for the radii at the beginning. There is supposed to be one radius for each cell. And then the list of coordinates starts.&lt;br /&gt;&lt;br /&gt;I am happy for several reasons:&lt;br /&gt;It was an easy problem to fix.&lt;br /&gt;I was right--it was reading in the wrong numbers for the wrong things. Kind of like a frame shift, but not as bad of one as I was thinking it might be.&lt;br /&gt;I now have a program that will display my binary file in ASCII with markers for when the radii start, when the x y z coordinates start and when each timestep begins.&lt;br /&gt;&lt;br /&gt;Once I added that list of radii it worked great, and then I put in a conversion so that my x y z coordinates show up correctly on the SimRender coordinates. So the hostcells now show up on the "floor" and parasites bounce around properly. Here's what it looks like now:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2698/1265/1600/simrender2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2698/1265/320/simrender2.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Yellow are host cells, red with green vectors are parasites.  The green brackets are just selecting that cell.&lt;br /&gt;&lt;br /&gt;There is only one problem. For some reason, the right hand wall is sticky. All the parasites hit it, or even end up outside it some how, and stick. Because of the way the world is set up, that wall is actually controlled by y-minimum in my code. So for some reason when a parasite's y-coordinate is less than or equal to 5 (y&lt;= 5), the velocity turns to zero. This does not happen on any of the other walls. I checked the code and I can't find anything different about y-min...&lt;br /&gt;&lt;br /&gt;very odd.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14096479-112265398132349896?l=vppswarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vppswarm.blogspot.com/feeds/112265398132349896/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14096479&amp;postID=112265398132349896&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112265398132349896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112265398132349896'/><link rel='alternate' type='text/html' href='http://vppswarm.blogspot.com/2005/07/it-works.html' title='IT WORKS!!!!!!!'/><author><name>Cailin</name><uri>http://www.blogger.com/profile/10747965760787583472</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14096479.post-112258417596095760</id><published>2005-07-28T16:56:00.000-07:00</published><updated>2005-07-28T13:56:15.966-07:00</updated><title type='text'>Frame Shift?</title><content type='html'>What I wouldn't give for an extremely detail oriented person right now...&lt;br /&gt;&lt;br /&gt;It should be simple. Give SimRender this list of numbers, and it will display the parasites moving according to those numbers. I tried to follow what Ford gave as the format exactly. But SimRender is not reading the file properly. It's almost like... a frame shift. If I were to give an example of what I think is happening: Say I give it&lt;br /&gt;&lt;br /&gt;10 20.432 30 40 50 60&lt;br /&gt;&lt;br /&gt;And then it reads that as:&lt;br /&gt;&lt;br /&gt;102 0.4 32 30 405 0 60&lt;br /&gt;&lt;br /&gt;But it isn't a pattern that I can look at and say, oh, this is what is wrong. Maybe it is different because it's converted to binary first and there are extra bits or bytes or words or THINGIES that tell it whether it is signed or not.&lt;br /&gt;&lt;br /&gt;I need to know EXACTLY what SimRender is, taking NOTHING for granted. Things that are default in C++ have to be manually set in Scheme.&lt;br /&gt;&lt;br /&gt;As it is I'm going to have to make up some kind of formula to switch x y z coordinates to the coordinate system that SimRender uses (he swapped the y and z axis, and the origin is in the back lower right corner instead of the back lower left corner).&lt;br /&gt;&lt;br /&gt;[vent] I hate not having all my ducks in a row like this. In order to make this work I need to know where all the pieces are and how they fit. And I don't. SO frustrating. And there are only about 10 days till I have to give my presentation. And there is more to do beyond just getting it to display. ARRRGH. [/vent]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14096479-112258417596095760?l=vppswarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vppswarm.blogspot.com/feeds/112258417596095760/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14096479&amp;postID=112258417596095760&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112258417596095760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112258417596095760'/><link rel='alternate' type='text/html' href='http://vppswarm.blogspot.com/2005/07/frame-shift.html' title='Frame Shift?'/><author><name>Cailin</name><uri>http://www.blogger.com/profile/10747965760787583472</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14096479.post-112250475926890219</id><published>2005-07-27T18:53:00.000-07:00</published><updated>2005-07-27T15:52:39.590-07:00</updated><title type='text'>SO close...</title><content type='html'>I'm torn between doing cartwheels and crying in frustration.&lt;br /&gt;&lt;br /&gt;My Scheme program outputs what I think are the right numbers in the right order in the right format to the right file. AND SimRender finally will open it!!!!! YAY!!! That's the cartwheels part.&lt;br /&gt;&lt;br /&gt;However, SimRender is not supposed to take what I gave it and display this:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/2698/1265/1600/simrender.jpg"&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://photos1.blogger.com/blogger/2698/1265/320/simrender.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The spheres are supposed to all be pretty tiny. Instead they are all different sizes from huge to small, a lot of them are outside the world (you can barely see the wire frame box in upper left part of the screen shot), and I'm not sure they are moving correctly. Sighs.... AND I don't know what's wrong. That's the cry in frustration part.&lt;br /&gt;&lt;br /&gt;Thanks to Kyle for help with getting SimRender working, Michael for help with linux, and Dr. Iba for help with Scheme and binary.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14096479-112250475926890219?l=vppswarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vppswarm.blogspot.com/feeds/112250475926890219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14096479&amp;postID=112250475926890219&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112250475926890219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112250475926890219'/><link rel='alternate' type='text/html' href='http://vppswarm.blogspot.com/2005/07/so-close.html' title='SO close...'/><author><name>Cailin</name><uri>http://www.blogger.com/profile/10747965760787583472</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14096479.post-112241095095434754</id><published>2005-07-26T16:50:00.000-07:00</published><updated>2005-07-26T13:49:10.960-07:00</updated><title type='text'>got the right tools now...</title><content type='html'>With Dr. Iba's help I added some functions to my repetouir today. Now I should be able to write output to a file, and change floating points and integers into binary.&lt;br /&gt;&lt;br /&gt;First though I need to write a function that will return the right set of numbers. I can map the update-cell function onto the swarm a given number of times pretty easily, but getting the right numbers to all come out after each recursion is a little more tricky. I can use (print ...), but I'm not sure that will work with the whole output thing. Here I go again, trying to make something work that I know almost nothing about, lol.&lt;br /&gt;&lt;br /&gt;I seriously need to have this working by the end of the week though. And I still have to go get SimRender, and get it compiled and working so I can give it the output file to chew on.  I hope that SimRender doesn't freak out when parasites try to pass through each other.  Because they are going to.  I don't have anything in the program to make them avoid each other.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14096479-112241095095434754?l=vppswarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vppswarm.blogspot.com/feeds/112241095095434754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14096479&amp;postID=112241095095434754&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112241095095434754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112241095095434754'/><link rel='alternate' type='text/html' href='http://vppswarm.blogspot.com/2005/07/got-right-tools-now.html' title='got the right tools now...'/><author><name>Cailin</name><uri>http://www.blogger.com/profile/10747965760787583472</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14096479.post-112232565269278666</id><published>2005-07-25T17:08:00.000-07:00</published><updated>2005-07-25T14:36:54.143-07:00</updated><title type='text'>hurdles</title><content type='html'>Tarynn is back :-)&lt;br /&gt;&lt;br /&gt;The calculations work the way they are supposed to (woot!). But I'm still a ways away from getting it to display on SimRender though. What remains aren't so much walls as hurdles. Be prepared for a fairly large e-mail Dr. Iba....&lt;br /&gt;&lt;br /&gt;--I need to write a piece of code that prints out a list of numbers into a file. Shouldn't be hard, just haven't done it before.&lt;br /&gt;--That file must be in binary. I'm assuming Scheme can do this... I hope.&lt;br /&gt;--I'm pretty sure that in order to print in binary I'll need to be running a language bigger than "Advanced Student". "Pretty Big" looks good because it has all the stuff of Advanced Student and MrEd (which includes MzScheme, which includes the standard language). I'm running into problems when I try to switch to Pretty Big though. It's throwing an error that I don't understand, and quite frankly, DrScheme's documentation stinks. There maybe be more problems beyond that, but I won't know until I fix the first problem. I did find out how to fix the format of the vectors so that it accepted them. Annoying that the student languages are so different from regular Scheme.&lt;br /&gt;&lt;br /&gt;And now a bit of fun: &lt;a href="http://www.phdcomics.com/comics/archive.php?comicid=207"&gt;PhD (Piled Higher and Deeper)&lt;/a&gt;&lt;br /&gt;Well worth reading the entire archive.&lt;br /&gt;And yes, I have.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14096479-112232565269278666?l=vppswarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vppswarm.blogspot.com/feeds/112232565269278666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14096479&amp;postID=112232565269278666&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112232565269278666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112232565269278666'/><link rel='alternate' type='text/html' href='http://vppswarm.blogspot.com/2005/07/hurdles.html' title='hurdles'/><author><name>Cailin</name><uri>http://www.blogger.com/profile/10747965760787583472</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14096479.post-112206515158859906</id><published>2005-07-22T16:47:00.000-07:00</published><updated>2005-07-22T13:45:51.593-07:00</updated><title type='text'>sticky corners and edges</title><content type='html'>I wonder who is hitting more walls: me, or the paranoids. The code pretty much works, except I found out that it isn't the walls that are sticky--it's the edges and corners. I've tried tweaking the code, to no avail. I'm going to need to rework a fairly large piece of it. The problem is that I don't exactly know how I want it to do what I need it to do.&lt;br /&gt;&lt;br /&gt;If the paranoid is on one wall, then I check the coordinates to find which wall and set the normal vector accordingly. But if it is on an edge, then it is essentially on two walls at once. And if it is on a corner, then it is on three walls at once. What needs to happen is for the vector update function to run for each wall, using the resulting vector from the previous wall as the vector for the next wall. For example, say the paranoid is sitting on walls x, y, and z. Its coordinates would be (x, y, z). The function would need to look at the x and update the vector (V) to V'. Then, the function would need to look at y and update V' to V''. Then the function would need to look at z and update V'' to V'''. If the critter was only on walls x and z, (x, n, z) then the function would need to look at x and update it from V to V', then look at n and see that it is ok, then look at z and update it from V' to V''.&lt;br /&gt;&lt;br /&gt;I'm going to need some kind of recursive thing. You know what is really funny? I'm spending so much time on something that the parasites don't even do. sigh. It's certainly good practice though, and it needs to be done so that the program can work until what they really do can be programmed in.&lt;br /&gt;&lt;br /&gt;I also need to figure out how I can get the set of functions to repeat through a list a given number of times.&lt;br /&gt;&lt;br /&gt;This all could take quite a while. Two work-weeks left. And a presentation on this that needs writing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14096479-112206515158859906?l=vppswarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vppswarm.blogspot.com/feeds/112206515158859906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14096479&amp;postID=112206515158859906&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112206515158859906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112206515158859906'/><link rel='alternate' type='text/html' href='http://vppswarm.blogspot.com/2005/07/sticky-corners-and-edges.html' title='sticky corners and edges'/><author><name>Cailin</name><uri>http://www.blogger.com/profile/10747965760787583472</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14096479.post-112197880827366766</id><published>2005-07-21T16:47:00.000-07:00</published><updated>2005-07-21T13:46:48.280-07:00</updated><title type='text'>working, but with sticky walls</title><content type='html'>Whew. I got all of the functions for bouncing a vector written, cleaned up, working, and mostly connected. Now I need to do two things:&lt;br /&gt;&lt;br /&gt;--last semester the program was set up to run a certain number of times. I need to go back and look at how I did this.&lt;br /&gt;&lt;br /&gt;--when a critter hits a wall, it updates its vector, but then the next timestep, because it's still on the wall, it updates it again, over and over, which means the parasite stays stuck on the wall. It's probably a matter of changing some &lt; to &lt;= or visa versa. I need a reliable way of checking if the vector needs updating or not.&lt;br /&gt;&lt;br /&gt;Coding was pretty easy today--I didn't run into many problems at all. God does answer prayer :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14096479-112197880827366766?l=vppswarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vppswarm.blogspot.com/feeds/112197880827366766/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14096479&amp;postID=112197880827366766&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112197880827366766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112197880827366766'/><link rel='alternate' type='text/html' href='http://vppswarm.blogspot.com/2005/07/working-but-with-sticky-walls.html' title='working, but with sticky walls'/><author><name>Cailin</name><uri>http://www.blogger.com/profile/10747965760787583472</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14096479.post-112189155545441685</id><published>2005-07-20T16:33:00.000-07:00</published><updated>2005-07-20T13:32:35.460-07:00</updated><title type='text'>update</title><content type='html'>This reminds me of one of my friends who said she would not want to marry a computer programmer because when they talk about their day it always goes something like this: it didn't work, it didn't work, it didn't work, it didn't work... and then it did.&lt;br /&gt;&lt;br /&gt;I finally started evaluating the expressions piece by piece (which I should have done to start with) and I found the problem. I changed that little piece, and now it works.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14096479-112189155545441685?l=vppswarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vppswarm.blogspot.com/feeds/112189155545441685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14096479&amp;postID=112189155545441685&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112189155545441685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112189155545441685'/><link rel='alternate' type='text/html' href='http://vppswarm.blogspot.com/2005/07/update.html' title='update'/><author><name>Cailin</name><uri>http://www.blogger.com/profile/10747965760787583472</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14096479.post-112189035686582225</id><published>2005-07-20T16:13:00.000-07:00</published><updated>2005-07-20T13:14:12.296-07:00</updated><title type='text'>programming</title><content type='html'>ahhh, the joys of programming... or rather banging one's head on the desk because said program refuses to work for no apparent reason. stupid infinite loops....&lt;br /&gt;&lt;br /&gt;I talked with Ford today. I'm going to need to figure out how to get my scheme program to output this specific list of number in binary in order for the simrender program to display it:&lt;br /&gt;&lt;br /&gt;X size of the World container (float)&lt;br /&gt;Y size of the World container (float)&lt;br /&gt;Z size of the World container (float)&lt;br /&gt;Number of hostcells (int)&lt;br /&gt;Number of parasites (int)&lt;br /&gt;Number of timesteps (int)&lt;br /&gt;&lt;br /&gt;radii for each cell (hostcells followed by parasites) (float)&lt;br /&gt;&lt;br /&gt;loop for each timestep&lt;br /&gt;loop for each cell&lt;br /&gt;X location of the current cell (float)&lt;br /&gt;Y location of the current cell (float)&lt;br /&gt;Z location of the current cell (float)&lt;br /&gt;go to next cell&lt;br /&gt;go to next timestep&lt;br /&gt;&lt;br /&gt;I'm hoping there is some part of scheme that can output binary, and I'm hoping that scheme is smart enough that the floats and ints won't be a problem. And then there's the fun part: getting it to output just a bunch of numbers. Not a list of numbers, not a list of structures, just plain numbers.&lt;br /&gt;&lt;br /&gt;we'll see... Meanwhile I'm still trying to get the program to even work. I've got a sweet idea for a very clean loop for when a parasite tries to exit the world, but unfortunately I have to hardwire six different cond statements (plus an else) for it to check individually because it has to do something different for each one and I can't generalize it. So this neat little idea turned into a monster screenfull of code.&lt;br /&gt;&lt;br /&gt;Part of me feels guilty for being so stubborn about making Scheme work in this very C++ project, but I like Scheme, and I know Scheme, and even though it probably looks like using Scheme is nothing but jury rigging, that's only because I'm trying to make it work with C++. It's a very nice language.&lt;br /&gt;&lt;br /&gt;You know, C++ is linear--it processes one function after another in order till it comes to the end, but Scheme is circular--if everything isn't interconnected, it doesn't work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14096479-112189035686582225?l=vppswarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vppswarm.blogspot.com/feeds/112189035686582225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14096479&amp;postID=112189035686582225&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112189035686582225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112189035686582225'/><link rel='alternate' type='text/html' href='http://vppswarm.blogspot.com/2005/07/programming.html' title='programming'/><author><name>Cailin</name><uri>http://www.blogger.com/profile/10747965760787583472</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14096479.post-112146177666466398</id><published>2005-07-15T17:10:00.000-07:00</published><updated>2005-07-15T14:17:34.793-07:00</updated><title type='text'>progress</title><content type='html'>I solved the vector problem a day or two ago. As it turns out, I had the W vector pointing down instead of up, which messed up everything. I tried solving it again for a V vector that is angled up instead of down, but for some reason the example I was working on wouldn't work, even though in theory it was fine. So today I started writing some general utility functions for finding the dot product, cross product, magnitude, etc. As well as defining a structure that I'll use for a type of 3D posn. Then I ran into an interesting problem: in Scheme, you can't just give it two equations and tell it to solve for the variable. But I need to do a fair amount of that. I think I have an idea of how to do it, it just isn't as straight forward as it is on paper. *takes deep breath*&lt;br /&gt;&lt;br /&gt;I spent most of the afternoon at the wet lab--three of us went over to see the real T. cruzi parasite. It's really cool looking, but it doesn't just swim nicely, it sits there turning somersaults (confused because there aren't host cells near by) or swims slowly and sporadically (contorting itself quickly yet getting almost no where). Does this critter have any kind of attention span unless host cells are near by? And sometimes tons of them cluster together in this huge flower-like ball. So many questions don't have answers yet, it makes things interesting. I'm glad I didn't see the parasite to start with or I might have given up hope of being able to model it. Life isn't neat like computers are. I'll be glad to stick to spheres for a while...&lt;br /&gt;&lt;br /&gt;Oh, and guess what I found on Google news today? &lt;a href="http://news.xinhuanet.com/english/2005-07/15/content_3221481.htm"&gt;Three deadly parasites share common genes: scientists&lt;/a&gt;.  The genomes of three Trypanosomes, including T. cruzi, were &lt;a href="http://www.sciencemag.org/cgi/content/full/309/5733/473"&gt;published in Science Magazine&lt;/a&gt; today.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14096479-112146177666466398?l=vppswarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vppswarm.blogspot.com/feeds/112146177666466398/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14096479&amp;postID=112146177666466398&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112146177666466398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112146177666466398'/><link rel='alternate' type='text/html' href='http://vppswarm.blogspot.com/2005/07/progress.html' title='progress'/><author><name>Cailin</name><uri>http://www.blogger.com/profile/10747965760787583472</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14096479.post-112120304450731910</id><published>2005-07-12T17:18:00.000-07:00</published><updated>2005-07-12T14:17:24.523-07:00</updated><title type='text'>stuckness...</title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/2698/1265/1600/parasite%20bounce.jpg"&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://photos1.blogger.com/blogger/2698/1265/320/parasite%20bounce.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;All right. I hope the diagram is readable. I have several problems.&lt;br /&gt;So, we have a vector, V, in the normal coordinate system (which has unit vectors i=(1,0,0) j=(0,1,0) and k-(0,0,1)). We want to bounce it off a wall and end up with vector V'. To make it easier, we define the coordinate system N', N, W with the origin at the point of intersection so that V is now in the plane M' which is shown above. The new coordinate system has unit vectors i'=(2/sqrt(5), 0, 1/sqrt(5)) j'=(0, 1, 0) and k'=(1/sqrt(5), 1, -2/sqrt(5)).&lt;br /&gt;&lt;br /&gt;However, and here's the first question: doesn't the vector V have to be converted to the new system (making it V*) before any calculations can be done? I tried doing this two ways: ("*" is unfortunately also dot)&lt;br /&gt;&lt;br /&gt;first, from the original packet:&lt;br /&gt;V* = (V * i' , V * j', V * k')&lt;br /&gt;&lt;br /&gt;next, as in the book:&lt;br /&gt;V* = ( (i * i')Vx + (j * i')Vy + (k * i')Vz , (i * j')Vx + (j * j')Vy + (k * j')Vz , (i * k')Vx + (j * k')Vy + (k * k')Vz )&lt;br /&gt;&lt;br /&gt;I tried the calculations for alpha and beta with both results. Only the first value for V* gave alpha and beta that passed the Pythagorean theorem test. So, second question: Why do I only use the way in the book for converting the V' &lt;strong&gt;back&lt;/strong&gt; to the original coordinate system?&lt;br /&gt;&lt;br /&gt;However, and this is kind of a side track, if alpha can be found by dotting -j' with V*, why can't beta be found by dotting -k' with V* ? I tried it, and it doesn't pass the Pythagorean test. Is it because V* is wrong, or is it just illegal somehow?&lt;br /&gt;&lt;br /&gt;In any case, using the first way of finding V* and the ways of calculating alpha and beta that were in the last packet, I found V'=(0, 1, -sqrt(5)), and then used the way we worked out before based on the book to find V' in the original system and got V'=(1, 2, 4). The original vector in the original system was V=(1, -1, -2).&lt;br /&gt;The length of V' isn't the same as V, the angle between them is not 2(theta) and V' isn't pointing the correct direction. So I know the answer isn't right, but I haven't been able to find what I'm doing wrong.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14096479-112120304450731910?l=vppswarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vppswarm.blogspot.com/feeds/112120304450731910/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14096479&amp;postID=112120304450731910&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112120304450731910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112120304450731910'/><link rel='alternate' type='text/html' href='http://vppswarm.blogspot.com/2005/07/stuckness.html' title='stuckness...'/><author><name>Cailin</name><uri>http://www.blogger.com/profile/10747965760787583472</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14096479.post-112111772206661429</id><published>2005-07-11T17:36:00.000-07:00</published><updated>2005-07-11T14:35:22.070-07:00</updated><title type='text'>vectors going better</title><content type='html'>Just in case you were worried I'd never update this...&lt;br /&gt;&lt;br /&gt;I worked on finding the post-bounce vector today from the packet Tarynn gave me, which basically meant plugging test values into the general equations. It seemed like there were a lot less calculations than there were before--though it usually feels that way once things get properly organized. Not that it didn't take me three hours to work it all out though. There were several parts I just had to sit and stare at for a while until I figured out what was going on. Finally got an answer--V was (1, -1, 2) so V' came out to (1, 2, 4)--however, I've been thinking about it and I don't think it's right. I'm planning on testing/troubleshooting tomorrow.&lt;br /&gt;&lt;br /&gt;If I don't catch you before I leave, Tarynn, I'll be back and online hopefully by 7pm your time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14096479-112111772206661429?l=vppswarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vppswarm.blogspot.com/feeds/112111772206661429/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14096479&amp;postID=112111772206661429&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112111772206661429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112111772206661429'/><link rel='alternate' type='text/html' href='http://vppswarm.blogspot.com/2005/07/vectors-going-better.html' title='vectors going better'/><author><name>Cailin</name><uri>http://www.blogger.com/profile/10747965760787583472</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14096479.post-112025083648281437</id><published>2005-07-01T16:48:00.000-07:00</published><updated>2005-07-01T13:47:16.486-07:00</updated><title type='text'>Vectors</title><content type='html'>Ok, mentally nailed down how to find the intersection of a plane and a line.&lt;br /&gt;&lt;br /&gt;I think I mostly understand dot product, but I don't understand how the one angle you get from the dot product relates to the three angles you get (one each for x, y, and z) from direction cosines. AND I still don't understand what it means for the angles of the "post bounce" vector to be reflections of the angles of the "pre bounce" vector. For example, if the angle between the incoming vector and the local z-axis is 30 degrees, then is the angle between the outgoing vector and the local z-axis 60 degrees? 330 degrees? -30 degrees? ...and then what do I do with it?&lt;br /&gt;&lt;br /&gt;I don't understand the cross product at all (I don't know anything about matrices).&lt;br /&gt;&lt;br /&gt;Here's some demo code for how the location will be updated based on the vector:&lt;br /&gt;&lt;br /&gt;(define TIME-UPDATE .5 seconds)&lt;br /&gt;(define TIME-REFRESH .1 seconds)&lt;br /&gt;&lt;br /&gt;critter's vector: (vx, vy, vz)&lt;br /&gt;critter's location: (x, y, z)&lt;br /&gt;&lt;br /&gt;every TIME-REFRESH the location is updated:&lt;br /&gt;(make-location&lt;br /&gt;(+ x (* TIME-REFRESH (/ vx TIME-UPDATE)))&lt;br /&gt;(+ y (* TIME-REFRESH (/ vy TIME-UPDATE)))&lt;br /&gt;(+ z (* TIME-REFRESH (/ vz TIME-UPDATE))))&lt;br /&gt;&lt;br /&gt;then every TIME-UPDATE the vector is recalculated as well.&lt;br /&gt;If the critter bumps into the wall during a refresh, it moves only as far as the wall and immediately updates its vector, then continues moving in the new direction on the next refresh. At the next time-update the vector is re-updated normally.&lt;br /&gt;Both the TIME-UPDATE and TIME-REFRESH can be set as low as the computers can handle.&lt;br /&gt;&lt;br /&gt;The thing is, a critter's movement can only be so continuous, because no matter what equation its movement is based on, it can't move only half a pixel. Of course, if this were displayed on a huge monitor (critters that used to be a millimeter in diameter now being displayed as a centimeter in diameter for example), being able to move very small distances would matter a lot more. I guess it is more important to calculate the position accurately and then let your equipment display it however it can.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14096479-112025083648281437?l=vppswarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vppswarm.blogspot.com/feeds/112025083648281437/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14096479&amp;postID=112025083648281437&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112025083648281437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112025083648281437'/><link rel='alternate' type='text/html' href='http://vppswarm.blogspot.com/2005/07/vectors.html' title='Vectors'/><author><name>Cailin</name><uri>http://www.blogger.com/profile/10747965760787583472</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14096479.post-112019406576118156</id><published>2005-06-30T23:59:00.000-07:00</published><updated>2005-06-30T22:06:33.300-07:00</updated><title type='text'>Introduction</title><content type='html'>Ok, first of all, if you were expecting a nice formal scientific logbook, you came to the wrong place. Formality in this case would not be useful. If I did something or had an idea, it'll go here. If I'm frustrated about something, that can go here too. If I &lt;em&gt;finally&lt;/em&gt; understood something, I'll probably explain it to myself here so I won't forget. I like to be pretty up front on blogs.&lt;br /&gt;&lt;br /&gt;If you are curious about what I'm doing, click on the "My VCU Web Page" link on the side, and then click on the link under "Summer 2005 Research Proposal."&lt;br /&gt;If you want to know more about the Virtual Parasite Project and what a T. cruzi is and why anyone should care about modeling a swarm of them, click on the "Virtual Parasite Project Link."&lt;br /&gt;If you want to know what I mean by Swarming, click on the "Craig Raynolds' Boids" link.&lt;br /&gt;If you like applets, visit Craig's &lt;a href="http://www.red3d.com/cwr/steer/"&gt;Steering Behaviors&lt;/a&gt; page and scroll part way down until you see a list of java applets--the crowd behavior ones are especially cool. :-)&lt;br /&gt;If you are my mentor, don't kill me for what I say here.&lt;br /&gt;That said...&lt;br /&gt;&lt;br /&gt;After about four weeks researching, planning, and presenting things, I finally started working out the nitty-gritty of the actual project. I feel like it's going to be my mission for the next month to make sure my mentor, Tarynn, gets nothing done--I was in and out of her office all afternoon with questions. And I ended up sincerely wishing that she had been my math teacher in high school. As it is, it's a good thing she's patient--I haven't had a solid background in math or any physics, so without those mental hooks to hang things on, it's taking me a long time to understand things. She finally had to take vectors all the way down to "ok, here is a tree, here is me. I take off running at three feet per second away from the tree..." before I finally got her point: you couldn't add a vector to a point because the units were wrong; I was able to do it before because I ignored the "per timestep" part of the vector since it was basically like dividing by one. So I'll need to add an extra piece for this program to make it match the actual physics (units and everything) instead of just making it so that it comes out ok in the end.&lt;br /&gt;&lt;br /&gt;She's been asked to present the project at a conference in Germany at end of September so she sent off an e-mail to the team saying "hey we need to get this all working so I have something to talk about." So I walked into her office and told her flat out--I can't do it. period. no chance. and certainly not in C++. It'll take me that long to get my brain around C++, never mind getting anything coded. So she said "so prototype it in Scheme and translate it into C++ later". Woot! Getting to code in Scheme is like getting to read Greek after staring at Mandarin for days--Greek takes a lot of thought, certainly, but at least I know where to start.&lt;br /&gt;&lt;br /&gt;So now I can focus on what needs to happen in the program instead of a new language too. That will still take me a long time though. I've got a sketch of how the world can be structured (subject to change, maybe I'll post a pic of my diagram later), but I am currently trying to figure out how to make a parasite bounce off the sides of the world. Tarynn said it was an elastic collision, but I'm still working on understanding vectors enough to calculate the "after bounce" vector from the "before bounce" vector based on direction cosines.&lt;br /&gt;&lt;br /&gt;I'm changing the posting time on this post so that "today" is still today instead of yesterday (it took me a long time to finish this post)...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/14096479-112019406576118156?l=vppswarm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vppswarm.blogspot.com/feeds/112019406576118156/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14096479&amp;postID=112019406576118156&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112019406576118156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14096479/posts/default/112019406576118156'/><link rel='alternate' type='text/html' href='http://vppswarm.blogspot.com/2005/06/introduction.html' title='Introduction'/><author><name>Cailin</name><uri>http://www.blogger.com/profile/10747965760787583472</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
