designcoding
About Table of Contents Keywords Monthly Archive
Support designcoding!

Interlocking Torus

November 25, 2026 | Algorithms
#circle #grasshopper #interlocking #torus

Interlocking torus models kept popping up on my YouTube feed (such as this and this). Among the Grasshopper experiments sitting in my archive, I found this script I started back in 2012 and only managed to finish now. It took 14 years there, and two hours here, just like Interstellar. When we look at a torus surface, the first sections that come to mind are always familiar ones: slice it horizontally and you get horizontal circles; slice it vertically and you see small circles giving the tube cross-section. What if we pass the cutting plane through the center of the ring and tilt it at a certain angle? The models I saw in the videos are made by intersecting just such tilted sections. At first glance, I thought I could model this parametrically without much trouble. Once I dug into the geometry, though, a whole new world opened up.

Interlocking Torus animation

Villarceau Circles

These circles are produced by a very specific section of a torus. So in fact, it is a special plane determined by the major radius (R) and minor/tube radius (r) of the torus. On a standard torus, we need to tilt the cutting plane passing through the center by an angle alpha relative to the horizontal. It is a plane that passes through the center of the torus and is tangent to the top part of the torus on one side and the bottom part on the other. When the plane cuts the torus at this special angle, two separate full circles form. Interestingly, each one has a radius equal to R. These are called Villarceau circles. By copying and rotating them around the center, we can sweep out the torus.

Interlocking Torus circle, grasshopper

The critical point here is that the tilt angle is not a random angle. Based on R and r, the angle alpha is given by sin(alpha) = r/R. What an elegant formula! When we tilt the plane by +alpha relative to the horizontal axis, we get one family of circles; when we tilt it by -alpha, we get a second family tilted in the opposite direction. As these two families pass through each other, they weave a cross-grid across the surface. Nothing is quite as rewarding as watching this formula and its geometric result unfold. Exciting and curious, I sat down with Grasshopper, opened the 14-year old, half-finished script and completed it using the formula I found in Wikipedia.

The secret behind the crescent-shaped pieces that often look confusing in videos of Villarceau-circle models lies right in this fabrication logic. Even though each Villarceau circle in geometry is a full circle of radius R, in a physical model the +alpha and -alpha tilted sections intersect one another when arrayed around the axis of rotation. By cutting slots in the corresponding spots of both section sets and slotting them together, they form the framework from which we can build the model.

Grasshopper Adaptation

Here, I looked at what I could parameterize in Grasshopper 1.0. We still can’t generate a torus with a single native component, so the Revolve component was be used. Once I modeled a torus with the desired R and r, all that remained was finding the right plane angle to slice it. The Arcsin component and the r/R ratio took care of that. I rotated the normal of a central XY plane by the angle I found to get a new plane, and used that as my cutting plane. The resulting intersection gives two circles in a “8” shape. Yet I only needed one of those crescent shapes. That’s when I realized the Section component’s output comes in separate pieces and needs work to be usable. We know the radius of Villarceau circles is also R, and we know the rotation angle. So I wondered whether, instead of taking a section, I could construct these crescent-shaped sections directly. I could trim the resulting shape from the center to get the crescent I wanted, though having a piecewise interpolated section curve rather than a clean arc. I tinkered for a while and actually managed to get these circles as two crescent shapes in the first version (splitting with Split Curve and rejoining in the right order with Join Curves). However, because certain R and r combinations initially returned one Curve and sometimes two Curves, I couldn’t get an algorithm that worked reliably across every parameter. Still, I’m sharing this first version anyway.

Interlocking Torus interlocking, torus

Following that, on a second attempt, I looked into the parametric definition of the centers of Villarceau circles. I could get these crescent-shaped sections directly without slicing the torus or even drawing the torus at all. Fortunately, such a parametric solution exists. Someone kind on Wikipedia had provided the positions of Villarceau circle centers relative to the center of the torus. I tried applying that too, but couldn’t quite get it right. Thanks to a single sentence added right below it by that same kind contributor, I cracked it: “These circles can also be obtained by starting with a circle of radius R in the xy plane, centered at (r, 0, 0) or (−r, 0, 0), and then rotating this circle about the x axis by an angle of arcsin(r/R).” That gave the cleanest possible solution, and I applied it right away. As a result, I could draw the circles directly without drawing a torus, creating a plane, or intersecting a torus with a plane. I’m admiring the mathematical purity and beauty in this version. From there, after a bit of data-list mambo jumbo (like Flip Matrix), I was able to extract the crescents easily. The next step is cutting the interlocking details into these crescent-shaped sections—one set has the detail on the inside, and the other set on the outside. Below is the final version:

Interlocking Torus Grasshopper definition
Interlocking Torus circle, grasshopper
Grasshopper 1.0 definition (GH)Download
Grasshopper 1.0 definition (GH)Download

Cite this post

Yazar, T. (2026, November 25). Interlocking Torus. designcoding. Retrieved November 25, 2026, from https://www.designcoding.net/interlocking-torus/

Related Posts

Discrete Fourier Transform

May 8, 2025

The Fourier Transform is a powerful mathematical technique that allows us to analyze the different frequency components within a signal or shape. Its discrete version, the Discrete Fourier Transform (DFT), is used when working with numerical data. I studied the Fourier Series here before. One of the most fascinating aspects of the DFT is that it can represent a signal or shape using rotating circles (or vectors). Each circle corresponds to a specific frequency, amplitude, and phase. When connected in…

Attractor Basics

June 29, 2023

In this short tutorial, I want to give Grasshopper beginners the basics of how we create attractor systems. The Grasshopper definition you see in the below figure is the equivalent of array-type copying operations in CAD. However, unlike in CAD programs, here we are dealing with multiple generations of objects rather than transformations. Attractor Basics: Data Matching In the application you see in the figure below, each row of the hexagonal grid created with HexGrid has a different radius value….

Conformal Circle Packing

September 19, 2012

After a couple of days of studying the mysterious Doyle spiral, I’ve decided to test an approach of circle packing from conformal mapping. First, I tried to understand the Poincare disk (earlier at here, here, and here and here). I used it as the hyperbolic representation of space on a two-dimensional plane. Then, I linked a regular hexagonal grid and rebuilt it after the hyperbolic distortion. This led me to find the below hexagonal grid. Therefore, it looks like a suitable…

Circle Crossing

December 25, 2011

I am learning Grasshopper. In this Circle Crossing definition, I tried to create the above pattern (also described in Sunflower Spiral) as simply as possible, this definition creates not only spirals but is also capable of more tessellations I guess. Maybe a three-dimensional equivalent might be studied in the future. As you can see from the definition, I started with a large circle. Then, I divided it into segments and placed new circles centered on them. Finally, I divide the…

Adaptive Waffle System

November 10, 2026

Since I still haven’t been able to upgrade to Windows 11, I am continuing with Rhino 8 and Grasshopper 1. But I think, hopefully, I’ll be able to sort it out soon. In the meantime, I’ll be publishing the last pieces of my remaining archive related to GH 1. Regarding interlocking (waffle) systems, I finally learned how to use the Region Slits component in GH 1, which I had never been able to use until now. I’ve been doing various…

  • Chapters

    • Algorithms
    • Discourses
    • Escapes
    • Fabrications
    • Studios
  • Explore

    • Table of Contents
    • Monthly Archive

    • All Keywords
    • #pattern
    • #kuka-prc
    • #robot
    • #polyhedra
    • #rhino-python
    • #design-education
    • #parakeet
    • #sphere
    • #parametric-surface
    • #terrain
    • #3d-printing
    • #polygon
    • #lace
    • #facade
    • #wave
    • #frege
    • #gauss
    • #voronoi
    • #laser-cutting
    • #fibonacci
  • Search

  • Support designcoding!

  • Enjoying designcoding? Support me on Patreon to keep it growing. Thank you!

  • copyright 2026 designcoding.net | about | privacy policy | end user license agreement