An OpenScad implementation of the “crossed-lines method” for creating curves of constant width.

In the contest Education Tools

6

9

0

86

updated October 2, 2024

An OpenScad implementation of the “*crossed-lines method”* for creating **curves of constant width**.

I include some examples (with a constant width of 10cm and a thickness of 2cm) and the script used to generate them. The script is able to produce many families of figures related with the curves of constant width, and generate models with markings that make it easy to understand how the figure was created:

`Frame(width, height, thickness, tol=0.25)`

Generates a square frame with rounded corners, so you can “test” the figures.

`Circle(width, height, groove=0, marks=0, $fn=720)`

Generates a circle with a diameter marked on top.

`Reuleaux(N, width, height, ratio=0, groove=0, marks=0, fn=720) `

Generates a **regular ****Reuleaux polygon** with N sides (for any odd N>2). You can specify a positive extension ratio to get smoothed Reuleaux polygons. In the picture, you can see a regular Reuleaux Triangle (left) with sides 10-10-10, and a smoothed regular Reuleaux triangle (right) with sides 6-6-6 and an extension ratio of ⅓ (generating extensions of 6·⅓ = 2 cm at each vertex).

`Reinhardt(N, K, width, height, groove=0, marks=0)`

Generates a **regular ****Reinhardt polygon** with N sides (for any odd N>2) divided into K segments. Reindhardt polygons are closely related to their Reuleaux counterparts, but are NOT curves of constant width. They are provided just so you can compare them. In the picture, you can see a regular Reuleaux Triangle (left) with sides 10-10-10, and the corresponding Reindhardt polygon (right) with 3x2 sides (N=3, K=2).

`Star(alpha, beta, width, height, groove=0, marks=0, fn=720)`

Generates a pentagonal curve of constant width based on an irregular 5-pointed star. The star is automatically generated by defining 2 consecutive angles (“alpha” and “beta”) of the star.

`Triangle(sides, height, ext=0, groove=0, marks=true, fn=720)`

Given the three sides of a triangle, generates the corresponding curve of constant width based on that triangle. You can specify the extensions at the acutest vertex of the triangle, and all the other extensions will be computed automatically. Here you can see the figure of constant width corresponding to the triangle of sides 3-4-5 with an extension of 2cm at its acutest vertex:

`Circumcircle(sides, height, groove=0, marks=true, $fn=720)`

Given the three sides of a triangle, generates the corresponding **circumcircle**. Circumcircles, being circles, are curves of constant width, however, they are not the curves of constant width generated by the crossing lines method. Here you can see an example of constant width curves of the triangle 7-7-10 with extensions of 0 length (left) and the circumcircle of the same triangle (right).

In this particular case, the triangle has been chosen to approximate very well an isosceles right triangle, so its longest side will be very close to the diameter of the circle and match the width of the constant width curve, but in general this will never be the case.

`Conway(sides, height, groove=0, marks=true, $fn=720)`

Given the three sides of a triangle, generates the corresponding **Conway's Circle**. Conway's Circles, being circles, are curves of constant width, however, they are not the curves of constant width generated by the crossing lines method. Here you can see an example of constant width curve of the triangle 3-3-4 with extensions of 3cm at the two acutest vertices (left) and the Conway's Circle of the same triangle (right).

In this particular case, the triangle and the extensions have been chosen so the extreme points of the constant width segments (left) are exactly the ones that define the corresponding Conway's Circle (right). However, note that the Conway's Circle is wider than the corresponding constant width curve and does NOT fit in the frame (as will happen, in general).

All these modules use as a subroutine the module:

`constant_width(pairs, point, height, r=0, fn=720)`

that generates a very general constant width curve using the crossed lines method described here. This subroutine takes a set of lines in the plane (as a list of pairs of points, each pair defining a new line that must NOT be parallel to any other line) and a point in one of these lines (that must be “far enough” for the “crossed lines method” to work) and generates the corresponding constant width figure.

You may scale down the examples as much as you want, or use the script to generate your own custom-sized figures, but the current dimensions (10cm width and 2cm thickness) have been carefully chosen to allow the figures to stand on their side (so you can roll a book on top, for example):

and to be able to use a standard (2cm wide) measuring tape to demonstrate a well known property of the constant width curves: that their perimeter measures π·Diameter (in this case, 10π cm, which is an easily identifiable 31,4cm).

The current dimensions turned out to be satisfyingly chunky and easy to manipulate by my students, and the markings on top are easy to read and easy to understand if you use a light-colored printing material like the one in the pictures, which allows the students to discover many of the secrets of these figures on their own.

The author marked this model as their own original creation.