i was under the impression trigonometry is involved. i think i recall a wikipedia article on transformation matrices, but i don't have time to have a look. it involved object--world--view--perspective or something like that step-by-step.
surely there's a D3D function that'll do it for you with a really tiny plugin?