Vertices of a Hexagon

Started by
3 comments, last by PumpkinPieman 20 years ago
Does anyone know where these vertices are in relation to the center point (assuming of course that all sides are equal and are of a value of 1)? I''m not too great at geometry, so I have no clue how to find these out. If you do find them out rational numbers would be most appreciated. Thanks. Pumpkin Pieman - [Blogger]

Go to war again, blood is freedom''s stain, But don''t you pray for my soul anymore.
Advertisement
That''s not a hexagon. A hexagon has six corners.

The generation is rather simple for any n-sided polygon if you want all sides the same length. Let be a := 2 * pi / n. Then the corners simply have the coordinates (cos(i * a), sin(i * a)), 0 <= i < n.
Whoops, my mistake I guessed I was so focused on the music that I drew the diagram wrong. lol

[EDIT] There I fixed it, lol.

[edited by - PumpkinPieman on April 3, 2004 4:14:43 AM]
Thanks that worked great! I got one last question: when I generated the numbers for the third number out of 6 sides, it came really close to zero (which it''s supposed to) but not 0. Should it do this? It came to (-1, 1.22461^-16) and it should be directly across from (1, 0).

Thanks
That kind of imprecision is to be expected and about normal. A magnitude of about 1e-16 should, however, really evaluate as zero for any drawing routine.

This topic is closed to new replies.

Advertisement