As we know, changing the fork length will change bike geometry a bit. For example, increasing fork travel by 10 cm will make the headangle slacker and raise the bottom bracket. I consider to increase fork travel on my bike by 20 mm, and to fix the increase in bb height with some headangle changing headset (like Cane Creek angleset). While I don't mind my bike to be slacker (actualy it's one of the goals of this modification), I do want my BB stay on the same height. Is there any formula we can develop to understand how would a change in fork length influences the headangle, and how the headangle influences the BB height?
I'm not that technical and I did dismally at maths.
So I'd lean the bike against a light coloured wall, stand back and take a photo of it from a distance (to reduce parallax and distortion) Try and squat down so the lens is about in the middle of the bike.
Measure your current fork length, and print your picture TWICE onto paper. (example 480mm)
Accurately measure the printed bike's fork length on the paper (example 53mm) and divide by the real length, (example 53/480 = 0.1104 This is your scaling factor.)
Now find the length of the new fork - this is harder if you don't have it, and published specs might not measure like you want. (example 566mm made-up)
Multiply that new fork length by the ratio (566 * .11) to get 62.3mm
Draw directly on your picture a fork that is now 62.3mm long, or 9.3mm longer than the pictured fork.
Cut out the front wheel from your second copy, and pin or place it accurately on the first picture, but at the end of the new fork line. Tape it down.
Finally, rule a new straight "ground" line that just touches the rear tyre and the new front tyre.
You can measure the new BB height from your composite picture, and then divide by the scaling factor. (say the page measured 15mm between BB and new-ground, so 15/0.11 = 136mm)
Note this will be Unladen, or "unsagged" fork length. Ideally both forks will have the same sag settings, but its still just an approximation
Also, my sample measurements are completely made up, and yours will vary.
This isn't a formula for you so maybe not the answer you're looking for, but it gets tricky because a fork isn't just a straight line; because it has offset it's kind of like a triangle itself for the purpose of doing the exact math here.
The thing most people who care about this question would do in practice is model the frame's fixed points in a 2d CAD program, model the forks in question (remembering that to do so you're making a right triangle where the axle to crown dimension is the hypotenuse, the offset dimension is one leg, and the other leg is an unknown length that can be solved for or figured out automatically in CAD), then plug each fork in to the frame model such that the unknown leg is in line with the head tube, and then pivot the whole thing around the point of the rear axle until the front axle snaps to being in plane with the rear. Then you can see the resultant head angles and BB heights easily. You can also easily see what angle changes at the headset would give you. There are many free 2d CAD programs that can do all this.