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

In summary, the conversation is about the speaker struggling to offset the center of a circle in a coordinate system. They found a solution using similar triangles and trigonometry to find the distance to the center point.
  • #1
STENDEC
21
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
  • #2
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:
  • #3
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:

[itex]\alpha =[/itex] angle in degrees
[itex]s =[/itex] 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:
[itex]\beta = (180 - \alpha) \div 2[/itex]

degrees to radians:
[itex]\phi = \beta\times\frac\pi{180}[/itex]

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

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

[itex]\alpha =[/itex] angle in degrees
[itex]s =[/itex] 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:
[itex]\beta = (180 - \alpha) \div 2[/itex]

degrees to radians:
[itex]\phi = \beta\times\frac\pi{180}[/itex]

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

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

Glad you figured it out.
 
  • #5


I would suggest using mathematical principles and equations to find the center of the n-gon. One approach could be to use the law of cosines to calculate the length of the unknown side of the isosceles triangle formed by the center of the n-gon and two known vertices. From there, you can use the law of sines to find the angle at the center and determine its coordinates using trigonometric functions. Another approach could be to use the centroid formula, which involves finding the average of the x and y coordinates of all the vertices. There are also various geometric constructions and algorithms that can be used to find the center of an n-gon. It may also be helpful to consult with a mathematician or seek out resources specifically for finding the center of n-gons.
 

1. How do you find the center of an n-gon using angle and side-length measurements?

The center of an n-gon can be found by drawing at least two lines from different vertices to the center. These lines should form equal angles with the sides of the n-gon. The intersection of these lines is the center of the n-gon.

2. Can you find the center of an n-gon with only angle measurements?

No, the center of an n-gon can only be found with both angle and side-length measurements. The angle measurements alone do not provide enough information to determine the center.

3. Do all n-gons have a center?

Yes, all n-gons have a center, which is the point of intersection of the lines drawn from different vertices to the center. However, for a regular n-gon (where all angles and sides are equal), the center coincides with the center of the circumscribed circle.

4. How many lines do you need to draw to determine the center of an n-gon?

You need to draw at least two lines from different vertices to determine the center of an n-gon. However, drawing more lines can help confirm the accuracy of the center point.

5. Can the center of an n-gon be located outside of the shape?

No, the center of an n-gon will always be located inside the shape. This is because the lines drawn from different vertices to the center will always intersect within the boundaries of the n-gon.

Similar threads

Replies
2
Views
1K
Replies
1
Views
772
Replies
5
Views
2K
  • General Math
Replies
1
Views
993
  • Precalculus Mathematics Homework Help
Replies
8
Views
2K
  • General Math
Replies
3
Views
2K
Replies
7
Views
7K
  • Precalculus Mathematics Homework Help
Replies
2
Views
2K
Replies
7
Views
1K
Replies
7
Views
783
Back
Top