MHB Finding 2D Polygon Coordinates from a point

Krotus
Messages
2
Reaction score
0
Suppose that I have the coordinates of x and y on a plane.

I am writing a piece of software where the user can select a polygon of 3, 4, 5, 6 or 8 sides. All of the polygon points are equidistant from the x, y point. In other words, if you drew a circle where the center was the x, y point, all of the points of the polygon would line on the circle.

That means, obviously, that the distance of each polygon point is equal to the imaginary circle's radius.

Given that information, what are the equations to create each type of polygon's set of points?
 
Mathematics news on Phys.org
Krotus said:
Suppose that I have the coordinates of x and y on a plane.

I am writing a piece of software where the user can select a polygon of 3, 4, 5, 6 or 8 sides. All of the polygon points are equidistant from the x, y point. In other words, if you drew a circle where the center was the x, y point, all of the points of the polygon would line on the circle.

That means, obviously, that the distance of each polygon point is equal to the imaginary circle's radius.

Given that information, what are the equations to create each type of polygon's set of points?

Hi Krotus, welcome to MHB!

Suppose the polygon will have $n$ sides.
And suppose each of the polygon points must have a distance of $r$ to point $(x,y)$.
Then the x- and y-coordinates of point $k$ of the polygon are given by:
$$\begin{cases}x + r \cos(2\pi \cdot k/n) \\ y + r\sin(2\pi \cdot k/n)\end{cases}$$
where $k$ runs from $0$ to $n-1$. Furthermore, the first point ($k=0$) will be to the right of $(x,y)$.

If you want the first point to be in a different location than to the right of $(x,y)$, we can add a fixed constant to the calls of $\cos$ and $\sin$.
 
Thanks! Very simple. I knew I had to be overthinking it.
 
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Thread 'Imaginary pythagorus'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...
Back
Top