Poetic meter

I always thought it was a shame that the metric system for length (millimeters, meters, etc.), and the English system (inches, feet, etc.) seem so unrelated. For one thing, the number ten shows up everywhere in the metric system, but it’s hard to find in the English system.

Sure, in 1959 a standards committee set the ratio of an inch to a centimeter to be 2.54, but that always seemed weird and arbitrary to me. I always thought that it would be great to find some poetry between the two measurement systems.

Then I started a project a few days ago in which I needed to compactly represent some 3D curves in virtual reality, measured in meters. My approach was to store first the starting point of the curve, and then the difference in millimeters from each point to the next, because smaller numbers require fewer bits of storage.

I use a single signed byte to represent each difference, which means those differences go from -127mm to +127mm. The range between the smallest and largest possible value is therefore 254mm.

Which turns out to equal exactly ten inches. Poetry found!

† Because this is an encoding to compress a data string, I need to reserve -128 (binary 10000000) as a flag to embed any mode switches. That leaves only 254 actual values to work with. [footnote added]

2 thoughts on “Poetic meter”

  1. Good point. Because this is an encoding to compress a data string, I need to reserve -128 (binary 10000000) as a flag so I can embed any mode switches, which leaves me only 254 actual values to work with.

Leave a Reply

Your email address will not be published. Required fields are marked *