# maximum points of intersection between a circle and rectangle

I had today this mathematical question:

What is the maximum number of points of intersection between a circle and a rectangle such that the length of the rectangle is greater than the circle's diameter, and its width is less than the circle's diameter?

-

I tried to fix the English -- I hope this reflects what you want to ask? – joriki Jun 22 '11 at 21:25
exactly   yes sorry  for bad writting – dato Jun 22 '11 at 21:31

## 2 Answers

I'll try to add a graph to help demonstrate that the maximal number of points of intersection between a circle and a rectangle such that the length of the rectangle is greater than the circle's diameter and its width is less than the diameter would be 6 such points of intersection: two points of intersection along each of the longest sides, and two points of intersection along one of the shorter sides. There is no way that there can be any points of intersection along the second of two shorter sides if the circle is intersecting the opposing side, since its diameter is less than the length of the rectangle.

Consider, for example, a circle of diameter 10 (radius 5) centered at the origin; hence its equation is $x^2 + y^2 = 25$. Consider a rectangle with vertices $(x_i, y_i)$ at $(-4, -8)$, $(4, -8)$, $(4, 4)$, $(-4, 4)$. Hence it's length (height) is $4 - (-8) = 12 > 10$, and its width is $4 - (-4) = 8 < 10$ (where 10 is the diameter of the circle). Then there are 2 points of intersection between the circle $x^2 + y^2 = 25$ and each of the line segments $y = 4$ ($-4 \leq x \leq 4$), $x = 4$ ($-8 \leq y \leq 4$), and $x = -4$ ($-8 \leq y \leq 4$), but no points of intersection between $x^2 + y^2 = 4$ and the rectangle's fourth side which lies on line $y = -8$ ($-4 \leq x \leq 4$). Solving for the points of intersection yields a total of 6 points of intersection of the circle and the rectangle: $(-4, -3), (-4, 3), (-3,4), (3, 4), (4, 3), (4, -3)$. ( If we move the circle vertically so it intersects the line $y = -8$, then it will no longer intersect the side along $y = 4$.

And there is no way a circle can intersect any given (straight) line in more than two points.

-

That depends on the rectangle, for some values of a, b and r, its possible to intersect in 8 points, and the apearantly the condition for a, b and r, is some complex. – ilius Jun 27 '11 at 15:03
Depending on the circle and rectangles, this maximum would be 2, 4, 6 or 8 (these are values that i'm sure), But exact conditions (on a, b and r) for every of these values is the problem. – ilius Jun 27 '11 at 15:21
@ilius: in this case: the answer is Maximum = 6 (all other values are possible, less than six: e.g., 0 if they are placed so they don't intersect at all, 1 if they are placed so only one side of rectangle is tangent to the circle, etc.  OP asked for maximum, given the constraints listed in the post.  Yes: if a square (say 4x4) and a circle, radius 5, were both centered at origin, then there would be 8 points of intersection (which is the maximum number of points of intersection in that case). – amWhy Jun 27 '11 at 15:52
ah, yes. I was searching for 8-point exact conditions which is another issue. – ilius Jun 28 '11 at 4:52

A circle intersects a straight line in at most two points. Your circle can't intersect your rectangle on all four sides. So the answer is six.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 21, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9365118741989136, "perplexity_flag": "head"}