Question 31579
This is a long story.  May I suggest you use Google to 
search on "apothem", "octagon".  There you will find 
several sites that address your question.
Cheers,
Stan H.