[Math] Drawing approximated regular shapes on square grid

circlesdiophantine-approximationgeometrypolygonsrecreational-mathematics

I find myself often fooling around with pen and paper, preferably squared paper. So I began looking for ways to sketch geometric figures as precisely as possible without using compass and/or ruler. In particular I'm thinking of regular polygons and circles. I'm attaching a picture of my best findings, intentionally left handmade to show the kind of result I'm pursuing (following an answer I introduced a couple of digital adjustments). Explanations follow below.

enter image description here

Let me start with regular polygons. The rule is simple: the vertices must lie at the grid crossings, that is their coordinates must be expressible as integer numbers. Apart from the square, it is not possible to get regular polygons with this restriction, so the intent is to obtain the closest approximations keeping the figures "small". I've explored different ways to quantitatively assess the "precision" of an approximation, starting from length uniformity of sides (satisfactory only for triangles) later combined with uniformity of angles, to the mean squared distance of vertices from the ideal ones not lying on the grid. I put no requirements about the center; should it happen to fall on or close to a crossing, even better. Moreover I tested different size factors to take into account the fact that getting better shape approximations with bigger figures is somewhat obvious and also less useful for sketching. Anyway I've found substantial agreement among different strategies. In fact, I didn't really find head-to-head confrontations whose "winner" depended on the scoring details, and even if I did I would have happily declared a tie and kept all the alternatives. So, the sheet of paper in the top-left corner of the figure collects my best results of this family.

Next I'm relaxing the restriction: I'll let the vertices fall also on the middle points of the sides of paper squares. These can be located with satisfactory precision by eye, instead I'm not going to allow center points of paper squares. This new rule is equivalent to halving all the coordinates of a valid previous solution, provided that no point had both coordinates odd (one can horizontally and/or vertically translate the original figure by $1$ before attempting the division). I might also add that I don't like to see a line running parallel to the grid cutting squares in halves, but it's just a matter of taste. Obviously, at comparable dimensions, better approximations can be found with this additional freedom, and my best findings are represented in the top-right corner.

I shall proceed to circles. They are different, in that they do not have a limited number of vertices and one can look for support points –that now can belong to the circle and lie exactly at grid intersections at the same time– with no a priori restrictions of position and amount. So the goal becomes to find as many of them, and as evenly distributed, as possible. Again I'm trying to keep the circles small, with similar considerations as before about loss of interest as size grows. With this in mind, my best circles are depicted in the bottom-left corner.

Finally, again I soften the rules: support points on the grid can be approximations of exact circle points and/or they can be placed on middle points of square sides. My best findings of this kind are those in the bottom-right corner.

I couldn't find any serious dissertation on this (indeed trivial) argument, the most closely related argument being this: Circle Lattice Points.
Is anyone aware of others? Or is anybody willing to find themselves other similar (or better, under any respect) figures?

EDIT: I don't want to seem ungrateful to those who took care of my question, but I still haven't received the answer I was hoping for. The fact is that I'm looking for a way to discover whether I have "missed" some interesting figures in the described context. I exploited my (limited) programming skills to perform some automated searches, but I'm not sure that my algorithms guarantee not to miss any good solutions. I can describe and discuss these too, but I'd prefer to leave everyone free to use their original approach. Another chance would be to find some reference covering the topic, but I'm afraid that this is really too "recreational" to be dealt with in literature. Maybe something on the Internet? Someone who has done anything similar before me? I'm starting a bounty to find out! Thanks in advance!

Best Answer

Historically, a similar problem came to people trying to use gear ratios to approximate irrational proportionality, as there is always an natural number of teeth on any particular gear. Short story very short: The convergents of continued fractions are the "best" approximation of the true value of an irrational number in the sense that there is no other rational number that is closer to the true value with a smaller denominator. (Actually the guarantees about approximation are stronger than this, which you can see at wikipedia's entry on continued fractions.)

The convergents of continued fractions of various irrationals will tell you what kind of scaling you would need to achieve your approximations. In practice this would mean that you have something like an exact expression for placement of the points, which you then convert to a rational approximation with an error less than what you consider the finest acceptable deviation (perhaps the thickness of your line, maybe 1/20 of a grid spacing).

Consider the problem of having a point at $\sqrt{2}$ in some axis. The square root of 2 is approximately 1. Well, not 1. More like $1 + \frac{1}{2}$. Well, not quite 2, more like $2 + \frac{1}{2}$. Actually the continued fraction of

$$\sqrt{2} = 1 + \frac{1}{2 + \frac{1}{2 + \cdots}} = [1~ 2~ 2~ 2~ 2~ 2~ \ldots ] = [1~ \overline{2}]$$

And its convergents are $1,~ \frac{3}{2},~ \frac{7}{5},~ \frac{17}{12},~ \frac{41}{29},~ \ldots$ which are respectively less than, greater than, less than... the true value. If we mentally rescale our sheet so that 12 units equals "1", then 17 units is approximately $\sqrt{2}$.

Related Question