Getting a ruler tattooed on my hand and forearm

I don’t like carrying rulers around all the time so I decided to get one as a tattoo. A more whimsically profound reason would be that this tattoo is a daily reminder to carefully “measure” the consequences of my actions -such as the consequences of getting the ruler permanently inked onto my fingers.

Rulers are straight and rigid but my skin is inconveniently curved and elastic. To still attain some degree of accuracy I

  1. performed skin stretch tests to determine the optimal position of the tattoo
  2. 3D-scanned my forearm to create a stencil that adjusts for its curvature
  3. 3D-printed a template that fits snugly around my harm to aid in applying the stencil

Maximizing accuracy by minimizing skin-stretch

Diagram showing the amount of skin stretch along my arm.
The amount of skin stretch measured on my inner, back, and side of my forearm. [View uncompressed]

The skin around my elbow stretches and contracts as I bend my arm. To determine the resulting measurement error, I angled my arm at a 90-degree angle and applied 1.0 cm marks at three positions on my forearm (inside, side, and back). After extending the arm again, I measured these marks to observe any changes in length.

I recorded significant stretching and contraction on the inside and back, but measurements on the side remained consistent, staying within an acceptable 1 cm threshold. Additionally, the skin on the side is exposed less to the sun, reducing tattoo fading. Surprisingly, this is not a popular spot for ruler tattoos. For example, Adam Savage chose the inner forearm, where the skin stretches most.

Adjusting for the curvature of my forearm

I want to use the tattoo to measure straight lines but the surface of my arm is curved. Without adjusting the stencil for this curvature, the measurements may exhibit a positive bias.

Creating a 3D model from photographs

To accurately project the straight ruler marks onto the curved surface of my arm, I created a 3D model of it using photogrammetry which required taking over a hundred overlapping pictures of my arm from different perspectives. While using my phone’s Lidar sensor would have been less tedious, it lacks the resolution required to capture the fine detail of fingers.

Using algorithms like SIFT (Scale-invariant feature transform), thousands of common points/features are identified in the photographs. Since the pixel coordinates of these features are fully determined by the 3D location of that feature in space, the position of the camera, and the distortion caused by the camera’s lens, the mathematical relationship between a features’s 3D position \((x, y, z)\) and its pixel coordinates \((p_x, p_y)\) can be represented as follows

\[ \begin{bmatrix} p_x \\ p_y \end{bmatrix} = K (R \begin{bmatrix} x \\ y \\ z \end{bmatrix} + \mathbf{t}) \]

Here, \(R\) and \(\mathbf{t}\) are the rotation matrix and translation vector which capture the camera’s rotation and position around the object. \(K\) is the camera’s intrinsic matrix which is determined by its focal lengths, optical centers, and skew coefficient. In the triangulation step, the goal is to fine-tune \( R \), \(\mathbf{t}\), and \((x, y, z)\) to faithfully reconstruct \((p_x, p_y)\). Finally, neighboring feature vertices are connected by edges and triangular faces to form the object’s surface mesh.

I used Polycam to create the model. Alternatively, you could use Meshroom which is open-source but requires a GPU to get good results.

Creating a curvature-adjusted stencil

3D Model of my arm with a red line along the side
A side-view of my arm with a red line indicating the path I chose for the ruler tattoo to follow. [View uncompressed]

The red line in the above image represents the path I chose for the ruler to follow. I tried avoiding skin folds and the inner hand where tattoo ink tends to fade prematurely. Using CAD software, I orthographically projected this path onto the surface of my arm.

A point is projected onto a triangle
The point L2 is projected onto the triangle (F1, F2, F3) [View uncompressed]

Intuitively, this projection can be thought of as drawing lines passing from my eye through any of the points on the path and determining if/where they intersect the triangles composing my arm’s surface mesh. Essentially this problem is equivalent to finding the point \(P\) at which a line in \(\mathbb{R}^3\) passing through two points \( (L_1, L_2)\) intersects the triangle in \(\mathbb{R}^3\) defined by three vertices \( (F_1, F_2, F_3)\).

Every point within the triangle can be expressed as an interpolation among the vertices, initially between \(F1\) and \(F2\), and subsequently with \(F3\) as follows

\[ F_i = F_3 + \beta_i(F1 + \alpha_i(F_2 - F_1) - F_3) \]

Similarly, any point on the line passing through \(L_1\) and \(L2\) can be expressed using the interpolation

\[ L_i = L_1 + \gamma_i (L_2 - L_1) \]

By equating \(L_i\) to \(F_i\) and solving for \(\alpha_i\), \(\beta_i\), and \(\gamma_i\) via Gaussian elimination, you can determine the intersection, \(P\), of the line with the plane containing the triangle. This point lies within the triangle iff \(\alpha_i\) and \(\beta_i\) fall between 0 to 1.

The projected path creates a series of connected vertices (a.k.a. spline) on the 3D mesh. From there it’s trivial to determine the spacing between the ruler marking that’s required to adjust for the curvature. I used the “reportlab” Python package to draw the lines and distance annotations and save the stencil as a PDF.

3D printing a stencil application template

Having invested significant effort in designing the ideal stencil, it was imperative to guarantee its precise application. To streamline this process, I developed 3D-printed templates designed to snugly fit over my hand and forearm. Their edge delineated the intended path for the stencil with small arrows marking the placement of the ruler markings. This template turned out to be pretty useful as it enabled my tattoo artist to effortlessly trace its edge as a guide, ensuring the stencil was applied with precision.

3D print preview in UltiMaker Cura
The print preview in UltiMaker Cura [View uncompressed]

3D printing GIF
3D-printing the stencil application template

3D-printed template fits over hand and forearm
The template fits snugly over my hand and forearm [View uncompressed]

The completed tattoo

Ruler markings on my fingers
Ruler markings on my pinky [View uncompressed]

Measuring a fish with a ruler tattoo on my arm
The fish isn't real! [View uncompressed]

Here are some additional factors I considered: