more math (untested) plus suspicions about the frustum code