Welcome to VBForums

At this stage it is definitely more maths based, so I've moved this thread from the 'VB.Net' forum to our 'Maths' forum... we have several maths experts here (who are also programmers), and I'm sure one of them will be able to help you work this out.