Jonathan Hauenstein and Frank Sottile
In 1992, Morgan, Sommese, and Wampler ([WMS]) provided a numerical proof that there are generically 1442 nondegenerate four-bar linkages whose coupler curve passes through nine prescribed points. Due to Roberts cognates and a two-fold symmetry, the resulting polynomial system generically has 8652 regular solutions.
Since we want the physically meaningful solutions to be real, we modified the polynomial system used by Morgan, Sommese, and Wampler. We first picked 9 random rational points in the complex plane and solved the resulting polynomial system with Bertini, which computed 8652 regular solutions. We used alphaCertified to certify that each of these points indeed correspond to distinct solutions. We then used a parameter homotopy in Bertini with these solutions as start points to compute the four-bar linkages for the specific set of 9 real points used by Morgan, Sommese, and Wampler in Problem 3 of [WMS]:
 (0.25, 0.00), (0.52, 0.10), (0.80, 0.70), (1.20, 1.00), (1.40, 1.30), (1.10, 1.48), (0.70, 1.40), (0.20, 1.00), (0.02, 0.40).
Using alphaCertified, we certified their result that 64 of the 1442 mechanisms are real. Three of these are shown the following animations, with the first one being the only viable mechanism. The remainder of this page documents these calculations, with directions on how to re-run our test and the files we used and created in the course of this test. Additionally, we provide the scripts needed to generate the animations from the solutions.

Solving Directions
Before you begin, you will need to have a working binary of Bertini and alphaCertified on your machine.
• Run Bertini with input file NinePt.bertini which uses 9 random rational points in the complex plane.
>: bertini NinePt.bertini
Using a single processor, this takes many hours.
The output file of interest is nonsingular_solutions.bz2, which is part of the input for alphaCertified. This is large, almost 10MB.
• Use alphaCertified to certify that each point in nonsingular_solutions.bz2 corresponds to a distinct solution.
The file NinePt.poly contains the polynomial system and the configurations in settings tell alphaCertified to utilize 256-bit precision. We recommend capturing the output for perusal.
>: alphaCertified NinePt.poly nonsingular_solutions settings > output
This takes a few minutes.
• Here is output. Perusing it, we see that alphaCertified does certify that there are 8652 distinct solutions.
• Next, rename nonsingular_solutions as start.bz2. These will be the start points for the parameter homotopy used to solve the problem for a specific set of 9 real points.
>: mv nonsingular_solutions start
• Use a parameter homotopy with Bertini described in NinePtParam.bertini to compute the solutions for a specific set of 9 real points.
>: bertini NinePtParam.bertini
This takes around an hour.
The output file of interest is nonsingular_solutions.bz2, which is part of the input for alphaCertified.
• The last step is to use alphaCertified to certify that each point in nonsingular_solutions.bz2 corresponds to a distinct solution and to verify that 384 are real.
The file NinePtReal.poly contains the polynomial system and the configurations in settings tell alphaCertified to utilize 256-bit precision. We recommend capturing the output for perusal.
>: alphaCertified NinePtReal.poly nonsingular_solutions settings > output
This takes a few minutes.
• Here is output. Perusing it, we see that alphaCertified does certify that there are 8652 distinct solutions and 384 (= 6 * 64) of them are real.
• Bertini and alphaCertified both create a halo of small files, which may be removed using the short shell script scour.sh.
>: sh scour.sh
Here is the bash session that ran this certification:
```>: bertini NinePt.bertini
>: alphaCertified NinePt.poly nonsingular_solutions settings > output
>: mv nonsingular_solutions start
>: bertini NinePtParam.bertini
>: alphaCertified NinePtReal.poly nonsingular_solutions settings > output
>: sh scour.sh
```

Animation directions
Before you begin, you will need to have Maple (9.5 or later should be fine) on your machine.
The file RealSols.maple contains the 384=6*64 real solutions that were computed and certified (using grab.perl, which parses the output of realDistinctSolns) in a list of Points for Maple consumption. Each solution Point is a list of 12 components
x1, x2, a1, a2, n1, n2,  y1, y2, b1, b2, m1, m2
where x = (x1,x2), a = (a1,a2), y = (y1,y2), b = (b1,b2) are drawn in Figure 1 of [WMS], and n=(n1,n2) and m=(m1,m2) are auxiliary variables such that,
n = a * conjugate(x)     and     m = b * conjugate(y),
as complex numbers.
If (x,a,n,y,b,m) is a solution, then so is (y,b,m,x,a,n) as well as the four Robert's cognates which are given in Equation 17 of [WMS]. Each of these 6 solutions are listed in RealSols.maple.
Parametrizing a 4-bar linkage by points of P1 x P1 (rotations of two parallel bars), where the endpoints have distance equal to the length of the third bar, gives a bi-homogeneous curve of bi-degree (2,2) that parametrizes the positions of the linkage. For a given four-bar linkage, we compute this curve and then parameterize it in two branches using the quadratic formula. The real geometry of the curve affects our method of parametrizing, so we first sorted all linkages by the geometry of their (2,2) curves, and then drew each one, looking for appropriate pictures, which are reproduced (with animation) in the Maple files NUMBER.maple, avaible below.
Here are the enclosed files with a short description:
 README A copy of this text. RealSols.maple The Maple list of real solutions. grab.perl perl script for parsing the alphaCertified output file realDistinctSolns. sort.maple Sorts the solutions according to the number of critical points under the coordinate projections of the 2,2-curve. rst.maple r00.maple, r22.maple, r04.maple, r40.maple, r44.maple. These draw the (2,2) curve and crudely draw the workspace of the different mechanisms. These next files draw certain solutions, with the number 17,28,49,104,171 representing the index of the solution in the list points. The first three are complete, and were used to create the graphics in our paper, as well as the animations above. 171.maple - The only viable solution. One component of its workspace curve contains all 9 control points and is a simple closed curve. 104.maple - The workspace is connected, but the curve is not simple closed. 28.maple - The workspace is disconnected with the control points lying on different components. 17.maple 49.maple - These represent early attempts to draw mechanisms, ones which were not sufficiently interesting to warrant further development

 [WMS] A.P. Morgan, A.J. Sommese, and C.W. Wampler II, Complete solution of the nine-point path synthesis problem for four-bar linkages, ASME J. Mech. Des., 114 (1992), 153–159.