TWiki home TWiki > Team4 > MiniGolf > TestPlan TWiki webs:
Main | TWiki
Team4 . { Changes | Index | Search | Go }
Formal Collision Test Plan

Team 4, CS121 - HMC, 3/9/04

Face Collision Testing:

The ball is approaching the face at a random, but nonparallel, angle with positive velocity. The ball should collide and reflect accordingly to the equation: incident-2*(normal•incident)*normal

The ball is approaching the face at an angle parallel to the face, where it is the ball's radius away when over the face. In this case the ball should not collide with the face and should "roll" along the face.

The ball is approaching the face at an angle parallel to the face, where the ball is greater than the ball's radius away. There is no collision whatsoever.

The ball is incident on two or more faces at the same time at the moment of collision. The reflection should average the normal of the faces and reflect accordingly.

Note
For the parallel case, being less than radius away when over the face would have resulted in an edge collision before the ball reached the face, so we need not test this case.

Edge Collision Testing:

The ball is approaching the edge at a random, but nonparallel, angle to the face with positive velocity. At the collision, the normal of all the faces connected to the edge is averaged and the ball is reflected accordingly.

The ball is approaching the edge at an angle parallel to the face, such that the path of the ball is within the ball's radius of the face at some point. This is just and edge collision but needs testing because the edge collision should happen before the face.

The ball is approaching the edge at an angle parallel to the edge, such that the path of the ball is the ball's radius of the edge. There is no collision and the ball should "roll" along the edge.

The ball is approaching the edge at an angle parallel to the edge, such that the path of the ball is greater than the ball's radius of the edge. In this case, the ball never touches the edge and there is no collision.

The ball is approaching the edge at an angle perpendicular to the face with positive velocity. This should behave like a normal edge collision.

The ball is incident on two or more disjoint edges at the same time at the moment of collision. (Disjoint meaning the ball hits two separate shapes at their edges at the moment of collision). The normals of the edges are averaged and the ball is reflected accordingly.

Note
When the ball is approaching the edge at an angle parallel to the edge, the path of the ball is within the ball's radius of the edge, it is a vertex collision so the edge should not handle it.

Vertex Collision Testing:

The ball is incident on the vertex from random angles. The forward facing normals of the edges connected to the vertex are calculated and the ball is reflected accordingly.

The ball is incident on two or more vertices from random angles. The normals of both vertices are averaged and the ball is reflected accordingly.

-- BenPellow and AndrewKim - 09 Mar 2004

Topic TestPlan . { Edit | Attach | Ref-By | Printable | Diffs | r1.2 | > | r1.1 | More }
Revision r1.2 - 09 Mar 2004 - 05:19 GMT - AndrewKim
Parents: WebHome > MiniGolf
Copyright © 1999-2003 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback.