For a rectangle you need to know at least the top left corner and the width and height, or the center point and the distance from it to the left or right side (width / 2) and the distance from the center to the top or bottom side (height / 2). So the algorithm is (pseudo code):

```
1) point_inside = test_point.x >= rect.left AND test_point.x <= rect.left + rect.width AND test_point.y >= rect.top AND test_point.x <= rect.top + rect.height
2) point_inside = test_point.x >= rect.center.x - rect.half_width AND test_point.x <= rect.center.x + rect.half_width AND test_point.center.y >= rect.center.y - rect.half_height AND test_point.x <= rect.center.y + rect.half_height
```

You may have to use < sign instead of <= depending on the type of the coordinates (integer, float)

For a circle you need to know the center and the radius. The algorithm is:

```
delta.x = test_point.x - center.x
delta.y = test_point.y - center.y
length_squared = delta.x * delta.x + delta.y * delta.y
radius_squared = radius * radius
point_inside = length_squared <= radius_squared
NOTE: this code uses squared lengths to avoid a square root call. The code with actual lengths is:
length = sqrt(delta.x * delta.x + delta.y * delta.y)
point_inside = length <= radius
```

So if you want to know if the test point is inside the hue circle in your image, you need to do the following:

```
point_in_hue_circle = point_is_inside_outter_circle AND point_is_outside_inner_circle
BONUS hue angle (between -pi and pi):
delta.x = test_point.x - center.x
delta.y = test_point.y - center.y
hue_angle = atan2(delta.y, delta.x)
```

For a triangle or a convex polygon the algorithm is more complex, and for a general polygon even more. You can search for “point in convex polygon test” or “point in polygon test” and you will find a lot of resources on the subject.