# Finding the angle of an arc?

**URL:** <https://discourse.processing.org/t/finding-the-angle-of-an-arc/22543>\
**Category:** Coding Questions\
**Created:** [July 10, 2020, 9:59pm UTC](https://discourse.processing.org/t/finding-the-angle-of-an-arc/22543 "2020-07-10T21:59:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rkdnson](https://avatars.discourse-cdn.com/v4/letter/r/cc9497/32.png) [@rkdnson](https://discourse.processing.org/u/rkdnson)\
**Post date:** [July 10, 2020, 9:59pm UTC](https://discourse.processing.org/t/finding-the-angle-of-an-arc/22543/1 "2020-07-10T21:59:32Z")

</div>

Hello, please excuse my crude drawing. I am looking to constrain the amount a circle rotates on the circumference of its parent circle. I have the center of both, and I already have a function that moves it around the angle with touch.

Reason being, I have two circles on the outside and I don’t want them overlapping.

Thanks!

 ![MVIMG_20200710_154628](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/6/68b6156c810b853014ab942049c9ad95709bcfea.jpeg)

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [July 10, 2020, 11:00pm UTC](https://discourse.processing.org/t/finding-the-angle-of-an-arc/22543/2 "2020-07-10T23:00:10Z")

</div>

Hello,

[https://mathworld.wolfram.com/Circle-CircleIntersection.html](https://mathworld.wolfram.com/Circle-CircleIntersection.html)

And then a bit of trigonometry.

`:)`

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [July 11, 2020, 7:35am UTC](https://discourse.processing.org/t/finding-the-angle-of-an-arc/22543/3 "2020-07-11T07:35:25Z")

</div>

Look at the reference for atan2

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [July 11, 2020, 12:21pm UTC](https://discourse.processing.org/t/finding-the-angle-of-an-arc/22543/4 "2020-07-11T12:21:54Z")

</div>

Hello @rkdnson,

Also consider:  
[IsoscelesTriangle](https://mathworld.wolfram.com/IsoscelesTriangle.html#:~:text=An%20isosceles%20triangle%20therefore%20has,is%20called%20a%20scalene%20triangle.)  
[Law of Cosines](https://mathworld.wolfram.com/LawofCosines.html)

They all worked!

![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/6/6d9b3d010a5719ab4cc13dc37f3b71a6dd35bc49.png)

Processing reference:  
[https://processing.org/reference/acos\_.html](https://processing.org/reference/acos_.html)

`:)`
