next up previous
Next: Further Research and Up: Discussion Previous: Discussion

Problems Encountered

With the collision detection module, the main problem encountered was dealing with floating point arithmetic errors. Initially, the float type was used to save on memory requirements, but after encountering problems, doubles were used instead. In addition, error tolerance has been built into all aspects of the collision detection module. For example, when testing for equality between two values, a range is compared instead. This range is based on the values involved and a defined constant ETA which represents the error tolerance. Infrequently, though, the collision detection module fails to find the point of contact when using bisection. However I suspect this is due to a fault elsewhere, rather than being a bug in the collision detection module. In testing and debugging, this sort of problem turned out to be incorrect input into the collision detection module: a non-convex polygon, addition of objects that intersected with other objects and violated the collision detection module's assumption (that there be no intersection in the initial state of the database it is passed).

The collision detection module is not as general as I would like it to be --- there are several restrictions, the first being it deals only with polygonal objects made up of convex polygons. Care must also be taken to ensure that the object movements aren't too large compared with the smallest polygons being dealt with; otherwise collisions may be missed. Also objects that differ vastly in terms of scale may also cause problems because of floating point arithmetic errors.

For the most part, the program works and it is only infrequently (once) that it fails since I solved the other errors that caused problems. This still needs looking at though.

There can be a bit of difficulty in getting a nice amount of plant growth, because, depending upon the values of the constants that control the plant growth. the plant has difficulty growing around 90 degree corners. This can be overcome with a bit of experimentation with the constants. Getting any substantial leaf growth can also be a problem as the algorithm for leaf placement isn't very sophisticated in order to not slow things down too much.



next up previous
Next: Further Research and Up: Discussion Previous: Discussion



William Fang
Mon Dec 4 14:14:02 EST 1995