Hello, I did some research on this not too long ago and found this:
http://www.deferredprocrastination.co.uk/blog/tag/lattice-hinges/
I'm affraid I did not try this math, but it looks like the guy...