I wrote a table to calculate this. You can see it https://skydrive.live.com/redir?resid=23B7BEDE6527529E!529&authkey=!AGboDW72AySsnK8 if you want. (This should result in an online version, but you can also download it.)
The basic technique works as follows:
- Design X and Y coordinates for unused endpoints.
- Configure them with simple scaling to get the X and Y coordinates for the desired endpoints.
- Work with angles
This includes quite a few calculations. You can trace it in this table, but here are all the steps:
Firstly, I convert your angles to use the coordinates of the coordinate geometry - as far as I can tell, you measure clockwise from 3 o’clock, but in the coordinate geometry it is more normal for a positive angle to be counterclockwise. Thus, your starting and ending angles become respectively 191 and 67 degrees. (I did this because I think math is less confusing this way.))
The spreadsheet then processes the radius at the start and end points. Here are the formulas that I use for the start and end points:
=D2*D3/SQRT(POWER(D3*COS(RADIANS(D4)),2) + POWER(D2*SIN(RADIANS(D4)),2)) =D2*D3/SQRT(POWER(D3*COS(RADIANS(D5)),2) + POWER(D2*SIN(RADIANS(D5)),2))
D2 and D3 are the radius of X and Y. D4 is the starting angle, and D5 is the ending angle (corrected for the corners). I got this formula from the Wikipedia article in Ellipses in the section “Polar form relative to the center”. This equation takes an angle and tells you that the radius of the ellipse will be at that angle.
Next, I use this to calculate the X and Y coordinates for the start and end points. Here are the formulas for starting X and Y:
=$B$8*COS(RADIANS(D4)) + D2 =D3-$B8*SIN(RADIANS(D4))
As mentioned earlier, D2 and D3 are the radius of X and Y, and D4 is the starting angle. (The formulas for the end of X and Y look the same only with D5. The reason for adding the radius X is that without these numbers from -Xradius to + Xradius. Adding this means they range from 0 to width. Something similar, but I turned it over to get the coordinates of the screen, because computer graphics systems often have it upside down (where the Y increase goes down the page). Yes, it didn’t quite follow that I turned it over, but adjusted the angle ..sorry!
Next, we calculate the smoothed X and Y. Here are the formulas for the starting point:
=B9/B2*B13 =B10/B3*B14
B9 and B10 are the preliminary stretch marks X and Y calculated in the previous step. B2 and B3 are the original width and height, while B13 and B14 are the smoothed width and height. (The end formulas look pretty similar, of course.) So, this is just a simple scaling operation.
Finally, calculate the angle from them. Here's the formula for the starting angle (and the ending angle is almost identical)
=MOD(DEGREES(ATAN2(B16 - $D$13, $D$14-B17)), 360)
The ATAN2 function takes the X and Y coordinates and indicates the angle of the line from the origin to the point X, Y. Excel works in radians, so we need to convert this back to degrees (just like in the previous formulas I converted degrees to radians). And then I take it MOD 360, so as not to get any negative angles. ATAN2 never produces values in excess of PI (i.e., 180 degrees), and creates negative values for angles that go beyond that. Taking this modulo 360, he returns it to a positive number.
And then the last step is to convert this back to your system with a clockwise angle:
= 360 - B19
Filing in stretched sizes 1.88 / 3.4, we get 165.51 and 287.70 degrees. This doesn't exactly match your numbers, but I'm trying to figure out where you got them from. Are they made by eye? And the food is at 2.5 / 2.55, I get 171.71 and 299.51. Again, it is very slightly different from yours, but not much.