1
$\begingroup$

I have a circle line, where I know two things:

  1. The diameter of the full circle
  2. The height and width of the bounding box around the circle line

[Graphical representation, in case I'm explaining this horribly.]

Using that, I want to find the angle of the circle line. (At least up to 270 degrees. After that, both the bounding box width and height will, of course, be equal to the diameter.)

Up to 180° (Figure A) we can use the bounding box height to calculate the angle (0 to diameter).

From 180-270° (Figure B) we can use the width (the range from radius to diameter) to figure out how much of those 90°s are spent.

But since I don't know how circles and curves work, I'm stuck, sad and kind of scared.

Is anyone out there able to explain how, as if I'm five years old? (Because when it comes to maths, I practically am.)

$\endgroup$
  • $\begingroup$ What is your definition of a "bounding box" ? Is it in relationship with pre-established coordinate axes, the borders of the bounding box being parallel to these axes, or is it the rectangle with the smallest area in which the arc can be inscribed ? $\endgroup$ – Jean Marie Oct 24 '17 at 17:04
  • $\begingroup$ @JeanMarie The latter. (The rectangle with the smallest area in which the arc can be inscribed) $\endgroup$ – solarcore Oct 24 '17 at 17:18
0
$\begingroup$

For every length of $AB$ you can use the cosine of the angle $Ø$. enter image description here

$\endgroup$
0
$\begingroup$

The dotted line in your picture has length $r$, and is the hypotenuse of a right triangle with one leg having length $W-r$. Thus the angle opposite this leg is $\sin^{-1} \frac{W-r}{r}$. Adding this angle to $180^\circ$ will give you what you want.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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