# How do I target a specific circle in a random circle packing?

**URL:** <https://discourse.processing.org/t/how-do-i-target-a-specific-circle-in-a-random-circle-packing/18227>\
**Category:** Coding Questions\
**Tags:** homework\
**Created:** [February 28, 2020, 10:21pm UTC](https://discourse.processing.org/t/how-do-i-target-a-specific-circle-in-a-random-circle-packing/18227 "2020-02-28T22:21:24Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)\
**Post date:** [February 29, 2020, 12:33am UTC](https://discourse.processing.org/t/how-do-i-target-a-specific-circle-in-a-random-circle-packing/18227/4 "2020-02-29T00:33:22Z")

</div>

Ok so here, what you are looking for is simple geometry.

How do you detect if a point (here it’s the mouse) is inside a circle?

Check this :

- [https://p5js.org/reference/#/p5/dist](https://p5js.org/reference/#/p5/dist)

**NOTE :**  
This is actually a duplicate of this previous subject :

- [How do i change the circle's color when the mouse hovers over it?](https://discourse.processing.org/t/how-do-i-change-the-circles-color-when-the-mouse-hovers-over-it/18226/5)

---

_[View the full topic](https://discourse.processing.org/t/how-do-i-target-a-specific-circle-in-a-random-circle-packing/18227)._
