Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I manage to create a circle inside triangle with this code, but circle inside ot

ID: 647002 • Letter: I

Question

I manage to create a circle inside triangle with this code, but circle inside other polygons are not maximum size:

var p1 = board.create("point", [0.0, 2.0]);
var p2 = board.create("point", [2.0, 1.0]);

//var pol = board.create("regularpolygon", [p1, p2, 3]);
var pol = board.create("regularpolygon", [p1, p2, 4]);
//var pol = board.create("regularpolygon", [p1, p2, 5]);

board.create("incircle", pol.vertices);
What is the easiest way to draw a maximum circle inside square and pentagon?

How about smallest circle around the polygon?

Explanation / Answer

This is why geometry class in high school had you spending all that time drawing stuff.

Assuming a regular polygon (all sides same length, all "corners" same angle), it is immediately obvious that the centers of the largest inscribed circle and the smallest circumscribed circle are identical, and are given by the vector arithmetic mean of the polygon vertices.

The smallest inscribed circle touches the polygon at the midpoint of each edge. The radius is thus given by the distance from the center to the midpoint of any one edge of the polygon.

The smallest circumscribed circle touches the polygon at every vertex. The radius is the distance from the center to any one vertex of the polygon.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote