Finding the center of an n-gon (circle) based on angle and side-length

AI Thread Summary
The discussion focuses on finding the center of an n-gon based on its angle and side length. The user initially struggles with positioning the center at (0,0) while the circle touches the origin. They explore geometric methods, including using isosceles triangles and similar triangles, to derive the center's coordinates. The solution involves calculating the inner angle of the triangle formed by the n-gon sides and using trigonometric functions to determine the distance to the center point. Ultimately, the user successfully derives the formula for the center's distance as s/2 * tan(φ), where φ is the angle in radians.
STENDEC
Messages
21
Reaction score
0
I hope this is self-evident to someone, I'm struggling.

I have a program that draws circles (n-gons really) of various sizes, but by translating-rotating-translating-rotating-..., not by x=sin/y=cos. That works as intended, but my wish is to offset the circle so that its center is (0,0) in the coordinate system. For that i need its center. Currently the circle itself originates from- and hence touches the (0,0) coordinates, so its center is somewhere above, in the y-axis.

dsrd0.jpg


Position of ? is sought after. A wider angle would result in ? rising for instance.

I found lots of tutorials on how to do it on paper using dividers and i also considered that it's a isosceles triangle, but it seems all textbook examples assume that one of the symmetric sides is already known.
 
Mathematics news on Phys.org
you could use similar triangles and some trig to get the radius along the y-axis.

Notice you can extend a perpendicular bisector from the first n-gon side which intersects the y-axis

so that 1/2 the n-gon side is the short edge the perpendicular creates the right angle and the y-axis is the hypotenuse.

This triangle is similar to the one formed by the n-gon edge and the x-axis.

So I get something like:

radius along y-axis = (1/2 n-gon side) / sin theta
 
Last edited:
jedishrfu said:
you could use similar triangles and some trig to get the radius along the y-axis.
Yes, you're right. After some more reading and pondering i came to this solution:

\alpha = angle in degrees
s = segment length

To get the inner angle between the sides, we subtract from a half-circle. We then divide by two, to get the inner angle of the isosceles triangle:
\beta = (180 - \alpha) \div 2

degrees to radians:
\phi = \beta\times\frac\pi{180}

Distance to center point can then be gotten from s\div 2 * tan(\phi).

Edit: Just saw you extended your reply, oh well :)
 
STENDEC said:
Yes, you're right. After some more reading and pondering i came to this solution:

\alpha = angle in degrees
s = segment length

To get the inner angle between the sides, we subtract from a half-circle. We then divide by two, to get the inner angle of the isosceles triangle:
\beta = (180 - \alpha) \div 2

degrees to radians:
\phi = \beta\times\frac\pi{180}

Distance to center point can then be gotten from s\div 2 * tan(\phi).

Edit: Just saw you extended your reply, oh well :)

Glad you figured it out.
 
Thread 'Video on imaginary numbers and some queries'
Hi, I was watching the following video. I found some points confusing. Could you please help me to understand the gaps? Thanks, in advance! Question 1: Around 4:22, the video says the following. So for those mathematicians, negative numbers didn't exist. You could subtract, that is find the difference between two positive quantities, but you couldn't have a negative answer or negative coefficients. Mathematicians were so averse to negative numbers that there was no single quadratic...
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...
Thread 'Unit Circle Double Angle Derivations'
Here I made a terrible mistake of assuming this to be an equilateral triangle and set 2sinx=1 => x=pi/6. Although this did derive the double angle formulas it also led into a terrible mess trying to find all the combinations of sides. I must have been tired and just assumed 6x=180 and 2sinx=1. By that time, I was so mindset that I nearly scolded a person for even saying 90-x. I wonder if this is a case of biased observation that seeks to dis credit me like Jesus of Nazareth since in reality...
Back
Top