> > |
I started testing the physics engine of the prototype today. Since we're dealing with a standardized triangle, I'm feeding the engine various ball positions and velocities to see if it detects a collision. The standardized triangle is located at ((0, 0, 0), (1, 0, 1), (1, 0, 0)). Among the values tested:
Testing surface collision:
- Ball=(.2, 5, .2), Velocity=(0, -10, 0), Radius=1, returned alpha=0.40202
- Ball=(.2, 10.9, .2), Velocity=(0, -10, 0), Radius=1, returned alpha=0.99202
- Ball=(2, 2, 2), Velocity=(-2, -2, -2), Radius=1, returned alpha=0.64646
Testing edge collision:
- Ball=(.5, 0, -1), Velocity=(0, 0, 10), Radius=1, returned alpha=0
- Ball=(.5, 0, -10), Velocity=(0, 0, 10), Radius=1, returned alpha=0.9
Testing vertex collision:
- Ball=(0, 1, 0), Velocity=(0, 1, 0), Radius=1, returned alpha=0
- Ball=(0, 1.999, 0), Velocity=(0, 1, 0), Radius=1, returned alpha=0.999
Testing non-collisions:
- Ball=(0, 2, 0), Velocity=(0, 1, 0), Radius=1, returned alpha=1
- Ball=(5, 5, 5), Velocity=(0, -10, 0), Radius=1, returned alpha=1
- Ball=(2, 2, 2), Velocity=(-1, -1, -1), Radius=1, returned alpha=1
-- ChrisWilson - 06 Oct 2004 |