Saturday, 26 November 2011

Late post

Last week the class worked with gridworld. Personally I find gridworld to be unnecessary, though I can see why one would need to have prior knowledge of it for the AP exam. The bugs were straightforward and, to avoid having to actually code the infamous ZBug correctly, I hard coded it with move() and setDirection(). The rest of the bugs were relatively straightforward. On my own time I have been working on a series of grid based generators for whatever reason. The first one made a series of randomly generating rooms, the second was randomly done but with a tendency towards certain areas to give the impression of a randomized gradient off of a point or line. I made a few other generators of this sort though I'm not entirely sure what I'm going to do with them. In general I'm fine with where the class is going, we pretty much just surpassed my prior knowledge with the introduction to inheritance through gridworld.

Sunday, 13 November 2011

Tests and such

We took a test last week. The biggest problem I had on the test was a question containing an unknown part <*1>. It wasn't clear to me that this represented an unknown variable, as this was not clarified in the question. I feel that I could have figured it out had I known this. Otherwise the test was fairly straightforward. I spent a lot of time on nested for loops though I got most of them right so I feel fine about that. I really liked the free response question as it wasn't a straightforward question and it actually tested that you knew how to use the code effectively rather than just the syntax.

Sunday, 6 November 2011

Finishing labs, quiz...

Not a lot happened in class, this was a double A day week and most of the time was spent finishing labs and such.
Daniel has been working on a 3D engine of sorts, using equations and ray tracing to make shapes in pseudo 3D. It seemed like an interesting project, and I wanted to try my hand at it myself, so this weekend I did. I'm not entirely sure how his works and this was partially intentional as I wanted to compare our separate approaches. My program currently does not work, which is not surprising considering the little time I have put into it. It compares parametric equations of a sphere and a 3D line to find if they intercept with the line intersecting certain points. In order to find if they intercept it checks parts of an equation in sqrts to find they come out negative, indicating a nonreal point of intersection and thus no intersection to graph. The code is actually very short, only a few hundred lines, most of which are for variable creation.