Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

enter image description here

I have a circle, with an object lying at the edge. In the diagram the object is represented by the blue circle. I need to form a sector in the same way that is drawn in the diagram, given the following:

  • The distance between the centre of the circle and the object, i.e. the radius r.
  • The width of the object.
  • The ratio between the width of the object and the length of the sector arc. e.g. 50%, meaning that half the arc length would be covered by the object.

I basically need to calculate the angle alpha that would satisfy the given ratio.

share|cite|improve this question
Do you know object's width ? – Jean-Claude Arbaut Mar 16 '13 at 14:53
If the object has radius $\rho$, then the angle required is $4(2 \arcsin \frac{\rho}{2r})$. – copper.hat Mar 16 '13 at 15:08
Sorry I should have mentioned that I have the width of the object. I've fixed the question. – KkovAli Mar 16 '13 at 20:02
up vote 1 down vote accepted

Let $w$ be the width of the object, $r$ the radius of the circle, $\rho$ the ratio of the width to the arc length and $\alpha$ the total angle of the arc.

The arc length is $\alpha r$, and $\rho = \frac{w}{\alpha r}$. Hence $\alpha = \frac{w}{\rho r}$ (radians).

share|cite|improve this answer
  1. Compute tangents intersections between the object and the circle. How you do this depends a lot on how your objects are represented.
  2. Compute the angle corresponding to this pair of points. An aran2 kind of function might help in this step.
  3. Divide that angle by the ratio you're given, i.e. by 0.5 for 50%.
share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.