Open all dividers' legs to the same extent. Tighten the screw to keep this distance. Do not readjust the dividers from now on.
Place one divider horizontally on the top side of the drawing surface and fix both its legs. Place -- but don't fix -- two adjacent dividers on the original one. The new dividers must be placed diagonally, but you don't have to care about their exact direction yet.
Add two more dividers (adjacent to the diagonal dividers), placed vertically. Continue with another two dividers, placed diagonally. Finish the arbitrary shape with the last divider, placed horizontally.
Move all dividers -- apart from the fixed one on top -- to bring the needles of adjacent legs directly next to each other. This can be a trial-and-error process, as bringing two adjacent needles together may mean the following dividers have to lose touch. However, lacking any tools (protractor, ruler), this is the only way to form the angles.
When all needles of adjacent legs touch each other, fix them on the surface. Use a pencil to draw a line between the legs of each divider and complete your octagon.