One thing I can think of is that you must have all the angles add up to 2 [LaTeX ERROR: Convert failed] . Then for each angle that is going to be squished, you need one to be increased.
To inscribe an equalateral polygon within a circle is easy and it is possible to know (given the size of the circle and the number of sides of the polygon) the exact length of one of the sides of the polygon but what about inscribing an equalateral polygon within an ellipse? To get the length of one of the sides in a circle the formula
R * sqrt (1-cos (360/n) *2) can be used ( among others )
where n= number of sides of polygon
R= Radius of circle
But this does not work for an ellipse
Now remember the polygon must have equal length of sides which must mean that the interior angles at the vertices must be different. I have already worked out the length of side for a twelve sided polygon inscribed within an ellipse of 360 major axis and 240 minor axis as 78.24868802 but have no method other than long winded trial and error to arrive at the result. Can anyone come up with a solution.
This might help to conceptualize the problem:
Elliptic Chords - Wolfram Demonstrations Project
I was thinking about the problem a bit and here is what I came up with. We simplify the problem a bit by considering the relative sizes of the major and minor axes. Let the long one be 1 and the smaller one be .
You can start from the point and then go anti-clockwise given the length of the line and the coordinates where it intersects the ellipse. The algorithm is recursive.
You are given the first intersection point and the length of that, which is .
Then the next intersection's coordinates is and it must satisfy the following two equations.
The first is the distance from
The second one is that the point must be on the ellipse
In general these two equations become
Unfortunately, when I tried solving these equations, the solutions were very ugly, so I think this method will be best suitable for numerical calculation.
Thank you Vlasev for your reply. I couldnt trouble you further and ask you to show numerically the working out of my question that is of an ellipse 360 major axis by 240 minor and inscribed within a twelve sided equalateral polygon. I am having a little trouble following the formula you set out. My fault not yours LOL. Thank you
Oh, no worries. The formula I have written is worked out like this: I assumed that the first point on the n-gon is the point . Then I've assumed the length of each side of the n-gon is L and that it intersects the ellipse at points and . With the first equation , I have used Pythagoras' theorem to show this relationship. With the next equation, I have used Pythagoras theorem to find where the next side should intersect the ellipse. However, since I have only 1 equation with 2 variables. To solve this problem, I need one more equation. This is not hard since we have the equation of the ellipse and the point must satisfy this equation also. This becomes a system of two equations which you can solve either by hand or using software.
Now for the general case, lets assume we have calculated the position of all points up to point n with coordinates . From now on, we need to use the Pythagorean theorem to find where the next vertex of the polygon is. That's what the first equation shows, where I have replaced with the very first equation. Then the second equation makes sure that the point is on the ellipse.
Oh, I don't know. I haven't actually performed calculations with these equations. I can try it out. Here is a drawing to complement the above discussion:
Now, I don't know where you 12-gon "starts" but I will start it at (1,0). Since it is 12 sided, there must be 3 sides in each quadrant. Since there is symmetry there must be 2 vertices in each quadrant (for a total of 8) and then 1 vertex on each axis. So two of the points should be (1,0) and (0,b). We need to find the other two points. However, you have lengths that are different from mine. First we need to normalize them.
a = 360 --> 1
b = 240 --> 240/360 = 2/3
c = 78.248 --> 78.248/360 = 0.21376
I will plug them in to check what will happen.
Hello, steven, I plugged the parameters in the equations I got and unfortunately, your number 78.248 does not work. How did you get that number. Did you draw a 360x240 pixel ellipse and then try to get it by hand? Or did you make a 24-gon? Either way, I have done a calculation with a different parameter (L is around 156.497) and got the following picture
Wow, I just noticed something spooky: 156.497 = 78.248 * 2. So you either gave me 1/2 of the side that you calculated, or a 24-gon has 1/2 the side of a 12-gon.
I think I understand how. I said the major axis was 360 and minor axis was 240 by that I meant measuring the ellipse from one end to the other I should have emphasised that at the start. If I were to draw the ellipse as you have in your drawing I would have drawn it with the x axis 180 and the y axis as 120.
I'm not sure how the OP solved his problem, if he really has done so.
So far we still have three unknown variables and just two equations. The system is still underdetermined.
The unknown variables are L, x, and y.
The equations that Vlasev pointed to are pythagoras' theorem and the cartesian ellipse equation.
If I'm not mistaken we still need one more in order to come up with a general formula for finding L.