Pintograph (revisited) - pretty patterns with mathematics
Geometric patterns are fun. In this post, I’m going to showcase a particular method of generating such patterns, named pintograph as coined by the daughter of Fran McConville. It is, at its simplest, two rods connected at one end to draw a line with a pen, and other ends connected to rotating circles. However, its mathematical definition is a bit more involved, yet required for simulating it accurately on a computer…
Theory
In the event you have read a prior version of this post, you are correct noticing that the theory has been notably simplified. Other remastering has been done as well
Before we begin, we will make a couple of assumptions:
Of two circles that define the pintograph, the origin of first will be at (0,0), and second one exactly dcircle away from the first one in horizontal direction. Origins are denoted as P1, P2
Each circle will have a point on their perimeter, denoted Pr1 and Pr2. They are assumed to travel on the perimeter as a function of rotation given in radians, each with an individual time step value t1, t2
We assume the circles will not overlap (dcircle>r1+r2), as otherwise it might not be possible to form a valid triangle (Pr1,Pr2,Ppen)
We seek to derive an equation for Ppen, which is where the line will be drawn at each time step from the previous point. As mentioned above, the points on circles and the pen are required to form a triangle. In addition to this, we require that segments Pr1Ppen, Pr2Ppen are of equal length and constant length over time, hence forming an isosceles triangle of changing altitude. The altitude of said triangle is denoted as hpen
It would be possible to allow non-isosceles triangles, but this would add additional complexity diverting from the main point. Deriving the exact equations for such cases is left as an exercise to the reader
Calculating Pr1, Pr2
First, we need to derive the exact coordinates of Pr1x,y and Pr2x,y
Knowing1h=b2−41a2 for isosceles triangles, we come to the conclusion:
hpen=(∣Pr1Ppen∣)2−41(∣Pr1Pr2∣)2
The equation would be far too long if written fully, so it will be omitted. Geometrically the result does make sense though - as sides are of constant length, longer distance between points on circles means smaller height.
We now have sufficient information for the final equation:
ppen=pmid+hpen∗Pr1Pr2^⊥
Knowing2 rotation by 90 degrees counter-clockwise is (x,y)→(−y,x) and that V^=∣V∣V, deriving Pr1Pr2^⊥ is quite straightforward. It will be omitted for brevity.
Practice
For convenience and demonstrating what you should be able to do with the given equations, here is an interactive model of a pintograph. Tinker with the settings and see what you achieve
For example, what happens if you have circles of same size, but different rotation speed? Same speed but different sizes? Or, same speed and sizes, but different directions? What happens when you adjust them whilst the plotter is drawing?