Original Post
I'm working on a program for Computer Science II at my High School, I've gotten permission to get help from my teacher. Basically, you are given to write a program that will draw a polygon , a regular one where the sides are of equal length, given an x amount of sides. A draw method is provided, where you input two arrays, the x and y coordinates. Basically, you give the method a set of points, and it will draw, connect, and fill the closed polygon. I'm looking for pseudo-code, or just a description of how to do this. I've ran into problems and haven't been able to try it out, but thinking that depending on the relative location of x and y I can either add or take away to their values to move it to the left, right, up or down. To figure out by how much, I would take the number of sides, divide it by two, and then divide the radius by it, the radius provided. However, this will run into problems with odd numbered polygons.