No account? Create an account # seperis

## The Toybox

### people for the conservation of limited amounts of indignation

math people help help help help
Okay, I give up: I need someone who knows geometry.

I'm trying to enclose a rectangle of known dimensions within an ellipse and expand the ellipse thirty feet from each angle. No, Pythagorean theorum didn't work (why????????), I tried expanding the rectangle theoretically by thirty feet at all diagonals, I tried magic.

I have Pythagged, sined, cosined, tangented and right now I could pass my junior trig and geometry with a A, but I cannot make a fucking ellipse that's perimeter entirely encloses a rectangle of known dimensions that is at least one hundred feet from the closest point in the rectangle.

What. Do. I. Need. To. Do?

Assume all measurements in feet, m is the multiplier to get the ratio to recalculate w, h to a, b for second rectangle and expanded ellipse.

Formula to calculate an ellipse: https://www.mathsisfun.com/geometry/ellipse-perimeter.html <--approximation 3

Current Rectangle:
w = 2640
h = 450
d = Sqr(x) = (w ^ 2) + (h ^ 2) = 2678.0776
p of rec = 6180
p of ellipse = 5487.4475

Increasing the diagonal by 100 at all angles
d2 = 2678.0776 + (100*4) = 3078.0776

(Corrected 30 to 100; I couldn't make thirty work at all).

I thought it was working with this formula:
New Rectangle:
m = d2/d = 3078.0776/2678.0776 = 1.1493
a = w * m = 2640 * 1.1403 = 3034.3126
b = h * m = 450 * 1.1403 = 517.2123
p of new rect: 7.103.0501
p of new ellipse = 6304.7578

It could work, but I'm not sure, because when I start expanding the rectangle itself and apply the formula to get real ellipse and new ellipse, it doesn't work and I don't know why. The only explanation I have is that I'm changing the height and width too much, but the same results occur no matter what I do.

Second group:
w = 10560
h = 24390
d = Sqr(x) = (w ^ 2) + (h ^ 2) = 26,577.9175
p of rect = 69,900
p of ellipse = 57,070.34402

Increasing the diagonal by 100 at all angles
d2 = 26577.9175 + (100*4) = 26977.9175

I thought it was working with this formula:
m = d2/d = 26977.9175/26577.9175 = 1.015
a = w * m = 10560 * 1.015 = 10718.92893
b = h * m = 24390 * 1.015 = 24757.07165
p of rect: 70952.00116
p of new ellipse = 57,747.0583

What is wrong with my brain that this isn't working? I verified my results with google and it agrees something is wrong with either a.) my brain or b.) geometry. I think it's geometry. I get ellipse calculations are complicated, but I double checked that part a few times and it's working, I think. At least, google thinks so when I enter my numbers to get the smallest ellipse but this is making no sense why I can't get that second one to work.

I'm listening to country music and not like, Girl in a Country Song but stuff like The Dance and The Thunder Rolls and Straight Tequila Night and The Bluest Eyes in Texas and I'd Be Better Off (In a Pine Box) (On a Slow Train Down to Georgia) (this is the South; we like to be detailed about how you are breaking our hearts, fucker). This is Southern wake after the death of grandma level shit here; this is when we drink Southern Comfort and Wild Turkey and a metric ton of margaritas (if your Southern is Texan), eat potato salad and fried anything, and everyone gets drunk, talks about their rifles and family scandals and at some point one to three parents have a knock-down drag out among the funeral flowers and someone hides in the closet with a brownie and...we're not talking about my childhood, right.

...this is where I am right now. Fix my geometry or I won't be understandable when I talk to anyone not in a central Texas bar; I already have too many vowels in my words and all my gerunds are missing a very important ending 'g'. I will write all my entries in the dialect of a central Texas rural farmer if I have to, and don't think I won't.

This has been a mathematical cry for help.

ETA: Oh God, I Want to Be Loved Like That just came up on rotation. Help.

ETA 2: If you saw an ealirer version, I was using '30 feet' not '100 feet'; I switched when testing the formuals to 100 because thirty simply didn't work and I wanted a dramatic change. All math here is based on an increase of 100 from all angles, or an increase of 200 of each diagonal.

ETA 3: Aded figures worked out in pencil, verified in excel and google, cited my formulas, and still WHAT.

Posted at Dreamwidth: http://seperis.dreamwidth.org/1020273.html. | You can reply here or there. | comments So let me be sure I know what you want.

You have a rectangle of known dimensions. You want the ellipse that passes through four points that are thirty feet from the vertices of the rectangle. Yes? Yes.

Oh, I can give you a visual: think patrol perimeter. I can't get it to work other than with my original (current) figures and I used a lot of variations.

Also, one correction: I was using 100*4, not thirty because thirty didn't work at all. Boyfriend person dug up the following, reproduced verbatim:

The equation for an ellipse centered in the origin is
(x/A)^2 + (y/B)^2 =1

If you want to enclose a rectangle of MxN with an ellipse you can move its center to the origin of coordinates. The top right coordinates are (M/2,N/2), replacing in the ellipse equation you have a formula you can use to solve B given A or A given B.

If you have a rectangle of 4x2, the top right coordinates are (2,1), replacing you have (2/A)^2 + (1/B)^2 = 1, then if A=4 solving for B gives B=1/sqrt(1-(1/2)^2) You're not wrong; it's just that one is graphing it first and I don't need it graphed. Or more specifically--it will become super complicated if I depend on absolute coordinates to do this, and I cant' figure out why I'd have to or why it would want me to when I'm expanding an existing rectangle. But once you have it graphed you can extract the numbers and then trash the graph. :) So I think the first thing to do is to make the bigger rectangle, which means the "original" one plus the extra length and width from making the ellipse pass outside it; that should be pretty easy to get with the Pythagorean theorem.

Oh, no, nvm, I am an idiot. Just add your extra to both the length and width, because it's going to be an isoceles right triangle which means half the extra at each side.

Edited at 2015-05-23 11:36 pm (UTC) I did. That's the d2--divide the new diagonal by the original diagonal and get the multiplier, multiply w and h by the multiplier, get the new sides, get the new ellipse. So, maybe I'm being too simple here, but your rectangle is like 5 times longer than it is wide, so the long sides of the ellipse are going to be pretty straight, right? So what you need is Lx2 + [the circumference of a circle that is W in diameter].

It's not a "real" ellipse, but it's pretty close.

Uh, unless this is like a magical emanation or something? But you said patrol route.

Edited at 2015-05-23 11:49 pm (UTC) I did the ellipse perimeter calculations from formula, yeah.

Reference: https://www.mathsisfun.com/geometry/ellipse-perimeter.html <--approximation 3

Edited at 2015-05-24 12:16 am (UTC) I can't tell if that means you agree with me or not. :)

If you do, the length of an oval patrol route that stays 30 feet from the corners of a 450x2640 rectangle is 6,848 ft. Formula? ((2640+30)*2) + (450+30)π One--that's fucking pretty. I like it.
P = ((w+30)*2) + (l+30)pi
Two A: Is the formula universally expandable?
Two B: How exact or how approximate is it and where did you get it? A: It should be.
B: I approximated it out of the air, basically. :)

So imagine you have your rectangle of Thing Whut You Patrol Around, which has corners A,B,C and D. You start at the point that's 30 ft from A; this is on a hypotenuse, so you are 10.95 ft from long side AB. You walk straight, parallel to AB, for 2670ft. At B, you begin to walk in a half circle, which is 755 ft and takes you to C. Then you go straight again, 10.95 ft from long side CD, till you hit D, and do another half-circle back to A.

If you want to be 30 ft from the long sides when you're walking straight, it'd be...6,942 ft total, because instead of adding 30 to 450 to make the diameter of the circle, you add 60. For reasons, the ellipse's closest point to the rectnagle has to be no less than 30 feet. That's one of the reasons I did it with diagonals.

Though I'm saving this for a fast and dirty calculation later. Then the length of the total route is the larger number, 6,942.

Wouldn't it be easier to just have a rectangular route that was 30 feet from the rectangle and parallel to each side? God yes. So much.

However, a.) no one walks in squares and b, there's generally a reason these sorts of things are always circular (or in this case, ellipsed). And three, spoiler. 