If there is a formula for seat/bar/foot rest placement I have not seen it. I always start with the seat height the rider wants. That is pretty easy to figure out from how they ride and how big they are. I mock up the bike at the target ride height (sometimes this has been pretty much just the bare frame and front end) and set up a seat at the height wanted. Then it is just a matter of having the owner sit on the bike while trying out peg and bar set ups. Usually on the first go round there is no simple way to mount pegs on the bike so I just use concrete blocks, bricks, boards etc to make an easy to adjust foot rest. Placing your foot on the front top edge of a concrete block actually mimics a peg pretty well, is easy to move around or shim up and down, and stays in place fairly well. Once I think it is reasonably close I get them to sit on the bike for at least 15-20 minutes with their feet on the "pegs" and both hands on the grips. That may seem like some sort of torture (pretty much is) but totally worth it in the end. Usually there are changes and it takes at least couple of "sittings" to get things just right. 20 minutes is a short ride, but sitting on a stationary bike that long reveals a lot about what is comfortable. Of course it does not take into account the effect of the wind at speed or the operation of the foot controls, but bars are easy to adjust for air drag (I usually err to the low side of perfect bar height when stationary) and foot controls are sort of a learned operation between different bikes anyway. Trust me, if you are comfortable sitting on your bike for 20 minutes standing still, it will be a joy to actually ride.