View Single Post
  #11   Spotlight this post!  
Unread 14-12-2012, 16:56
Christopher149 Christopher149 is offline
Registered User
FRC #0857 (Superior Roboworks) FTC 10723 (SnowBots)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2007
Location: Houghton, MI
Posts: 1,104
Christopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond repute
Re: numerical computation contest

Quote:
Originally Posted by Ether View Post
Close enough. Tell the folks how you did it.


Since this is a circular arc, I start with a circle. Based off of a diagram like this, I draw a triangle and take theta to be as is shown in that picture. From the right triangle, we know radius * sin(theta) = 5280 / 2. From the definition of arc length, we also know that radius * 2 * theta = 5281. We have two equations and two unknowns, so I substituted one into the other and let Mathematica determine theta. From theta, we easily get the radius. Next, we use this equation relating chord length and the height to the radius. Again, I let Mathematica handle the equation to a ridiculous number of decimal places.

Mathematica Code
Code:
Clear[t, h, r, c, a]
c = 5280
a = 5281
t = t /. 
  FindRoot[a/(2 t) * Sin[t] == c/2, {t, 1.8}, 
   AccuracyGoal -> 100000, PrecisionGoal -> 100000, 
   WorkingPrecision -> 500]
r = a/(2 t)
FindRoot[r == c^2/(8 h) + h/2, {h, 100}, AccuracyGoal -> 100000, 
 PrecisionGoal -> 100000, WorkingPrecision -> 500]
EDIT: I can get more decimal places ...

Last edited by Christopher149 : 14-12-2012 at 16:57. Reason: partial reply to post that beat mine