Continued on algorithm description.

Lacking explanation of why the \theta angle should be smaller than a
quarter pi. Left sheet at office, fix tomorrow.