Register to reply 
Finding the center of an ngon (circle) based on angle and sidelength 
Share this thread: 
#1
Jan713, 08:38 AM

P: 14

I hope this is selfevident to someone, i'm struggling.
I have a program that draws circles (ngons really) of various sizes, but by translatingrotatingtranslatingrotating..., 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 yaxis. 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. 


#2
Jan713, 09:32 AM

P: 3,091

you could use similar triangles and some trig to get the radius along the yaxis.
Notice you can extend a perpendicular bisector from the first ngon side which intersects the yaxis so that 1/2 the ngon side is the short edge the perpendicular creates the right angle and the yaxis is the hypotenuse. This triangle is similar to the one formed by the ngon edge and the xaxis. So I get something like: radius along yaxis = (1/2 ngon side) / sin theta 


#3
Jan713, 10:09 AM

P: 14

[itex]\alpha =[/itex] angle in degrees [itex]s =[/itex] segment length To get the inner angle between the sides, we subtract from a halfcircle. 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
Jan713, 11:25 AM

P: 3,091

Finding the center of an ngon (circle) based on angle and sidelength



Register to reply 
Related Discussions  
Center of circle from two points and a tangent angle  Calculus  1  
Spherical Pythagorean theorem  finding length of longer side  Differential Geometry  3  
Finding a side length in similar triangles?  Precalculus Mathematics Homework  1  
Finding circle center from two points and an arc length  General Math  7  
Length of a pendulum based on speed and max angle  Introductory Physics Homework  10 