Why do things the hard way? The magic formulas needed are published in, among other places, Lefkowitz, Lester. 1979. The Manual of Close-Up Photography. Amphoto. Garden City, NY. 272 pp. ISBN 0-8174-2456-3 (hardbound) and 0-8174-2130-0 (softbound).
Also see this http://www.largeformatphotography.in...ad.php?t=65951 recent discussion on the US LF forum.
If all you want to do is calculate effective aperture given aperture set, pupillary magnification, lens orientation, and magnification use Lefkowitz' formulas. If you're using Nikkors for 35 mm Nikon SLRs, Nikon has published exposure factor curves (exposure factor given magnification and lens' orientation) for their lenses, I have the set of curves they packed with PB-4 bellows.