I’ve been dedicating some of my spare time to an exciting project: G-Shark, an open-source C# geometry library tailored for computational designers in the AEC industry. Co-authored by myself and colleagues Mirco Bianchini and Cesare Caoduro, G-Shark is a set of tools that help computational designers solve complex geometric problems with the same power and features of proprietary commercial geometry libraries.

One of the most intriguing issues I recently tackled was implementing Rotation Minimizing Frames (RMF) on space curves—a fundamental algorithm in computational design. RMFs are essentially perpendicular planes distributed along a space curve, like a spline, with minimal relative rotation between consecutive planes. This concept is particularly useful when constructing swept surfaces, which rely on section profiles aligned along a curve.

Why Are RMFs Important?

When creating a swept surface, it’s crucial to ensure that the planes on which section profiles are constructed remain stable and smooth as they follow the curve. If the rotation between these planes isn’t minimized, the resulting surface can become twisted or distorted. Traditional methods that rely solely on tangent vectors and perpendicular vectors often fail to account for changes in the curve’s torsion and curvature, leading to abrupt rotational changes that disrupt the smoothness of the sweep.

To illustrate, imagine constructing one hundred frames along a 3D space curve. If these frames are defined simply by tangent and perpendicular vectors, they may exhibit abrupt changes in direction—especially on complex curves. RMFs, however, ensure a smooth rotational transition between these frames, allowing for the creation of clean, twist-free swept surfaces.

The video below shows the effects of this approach on a resulting swept surface created from a series of square section profiles aligned to the planes formed by the orange and blue axis vectors of the curve frames.

Implementing RMFs in G-Shark

While researching RMFs, I encountered several algorithms that approximate these frames. While methods like the projection method by Klok (1986) and the rotation method by Bloomenthal (1990) are well-known, I found the Double Reflection Method by Wang et al. (2008) to be particularly compelling. It’s faster, more accurate, and simpler to implement—a triple win!

In G-Shark, I’ve implemented this algorithm as a function that accepts a NURBS curve and a list of parameters at which to generate RMFs. The result is a set of smooth, well-aligned frames that can be used to construct high-quality swept surfaces.

The Results

The difference is striking. With RMFs, the resulting swept surfaces exhibit smooth, continuous transitions, free from the twists and distortions that often plague less sophisticated methods. The implementation itself is surprisingly straightforward, involving just a few lines of code, yet it delivers a beautifully smooth motion along the curve.

If you're curious to see how RMFs can be applied in your own projects, or if you want to dive into the code, it’s all freely available as part of the G-Shark library. This algorithm, like much of computational design, elegantly balances mathematical rigor with practical application, and I’m excited to see how others in the community might use and build upon it


References:

  • Klok, F. (1986). Two moving frames for sweeping along a 3D trajectory. Computer Aided Geometric Design, 3(1), 217–229.

  • Bloomenthal, J. (1990). Calculation of reference frames along a space curve. In A. Glassner (Ed.), Graphics Gems. Academic Press.

  • Wang, W., Jüttler, B., Zheng, D., & Liu, Y. (2008). Computation of rotation minimizing frame.

Guido Maciocci

Write by

Founder @ AecFoundry - Building the digital future of AEC.

Work With Us

Ready to Transform Your AEC Operations?

Book a call with today and discover how cutting-edge technology can drive efficiency, innovation, and growth in your projects.

Work With Us

Ready to Transform Your AEC Operations?

Book a call with today and discover how cutting-edge technology can drive efficiency, innovation, and growth in your projects.

Work With Us

Ready to Transform Your AEC Operations?

Book a call with today and discover how cutting-edge technology can drive efficiency, innovation, and growth in your projects.