Search code examples
mathgame-physicscurve

Calculate radius of curve/arc formed by line segments (approximate)


The calculation is for games so a approximation is better than a computational intense correct calculation. What i need to find is the radius of the given arc.

In this case the "curve" can be thought of a arc as this approximation is good enough. So the situation look like this:

enter image description here

I know:

  1. the length the green lines (which are equal)
  2. the length of the blue arc
  3. the value of α in degrees

What i need to know:

  • the radius r

Background - Actually i need the radius for two things:

  1. To calculate the length of a arc B with offset of x from the center arc. So that r of B would be r + x
  2. To calculate the centrifugal force of a vehicle driving on that curve

What i tried:

I know how to calculate the radius if i have the circumference and the inner angle of the arc. But i am completely stuck with the given information though i am sure it should not be too complicated ..


Solution

  • If you think a triangle with right angle at the middle of the green line and another point at the center of the circle, then the angle at the intersection of the green segments in that triangle is α/2 and the cosine ratio for that angle is

    cos(α/2)*r = g/2
    

    g the length of a green segment.


    The angle at the top of a pie slice is π-α so that for the length b of the blue curve segments you should get

    b = (π-α)*r 
    

    The radius values you get from both formulas should not differ more than the measurement errors let expect.