Jekyll2023-07-03T14:16:48+00:00http://bcourter.github.io/feed.xmlBlake CourterGeometry and Manufacturing
Blake Courterbcourter@gmail.comUnit Gradient Fields: The Two-Body Field, Ξ2023-07-01T00:00:00+00:002023-07-01T00:00:00+00:00http://bcourter.github.io/2023/07/01/two-body-field<p>So far in the series, we’ve defined the basic idea that <a href="/2023/05/05/what-is-offset.html">UGFs generalize SDFs</a> and examined that when representing shapes, UGFs offer design freedom in <a href="/2023/05/18/field-notation.html">the shapes’ normal cones</a>. In most of the examples, we’ve shown that this freedom helps recapitulate the kinds of edge treatments we see in engineering software like rolling-ball blends and chamfers. In this post, we’ll take a look at the clearance and midsurface fields that apply to SDFs and the two-body field that applies to all UGFs.</p>
<p><em>Use the slider to change viewing modes:</em></p>
<div><div class="extensions extensions--video">
<iframe class="fullsize" frameborder="0" src="https://www.shadertoy.com/embed/DssczX?gui=false&t=10&paused=false&muted=false" allowfullscreen=""></iframe>
</div>
</div>
<div hidden="">
$$ \newcommand{\R}{\mathbb{R}} $$
$$ \newcommand{\shape}[1]{\mathcal{#1}} $$
$$ \newcommand{\grad}{\boldsymbol{\nabla\!}} $$
$$ \newcommand{\BoundaryMap}[2][]{\vec{\mathbf{Q}}_{#2}^{#1}} $$
$$ \newcommand{\norm}[1]{\left\|#1\right\|} $$
$$ \newcommand{\abs}[1]{\left|#1\right|} $$
<!-- $$ \newcommand{\func}[1]{\; \mathop{\text{#1}}} $$ -->
$$ \newcommand{\func}[1]{\mathop{\rm #1}\nolimits} $$
$$ \newcommand{\DF}{\mathfrak{D\hspace{-0.2em}\scriptstyle{F}\,}} $$
$$ \newcommand{\Shape}{\boldsymbol{\Omega}} $$
$$ \newcommand{\twobody}[2]{\Xi_{#1}^{#2}} $$
$$ \newcommand{\inner}[2]{#1 \cdot #2} $$
$$ \newcommand{\wavysmile}{\raise{-0.2ex}{\smallsmile}} $$
$$ \newcommand{\wavyfrown}{\raise{ 0.2ex}{\smallfrown}} $$
$$ \newcommand{\wavy}{\wavysmile\!\wavyfrown\!\wavysmile\!\wavyfrown\!\wavysmile} $$
$$ \newcommand{\sampson}[1]{\hspace{-1.3em}
\style{display: inline-block; transform: translateY(-0.1em) rotate(90deg) scale(0.4, 0.3) }{\wavy}
\hspace{-1.4em} #1 \hspace{-1.3em}
\style{display: inline-block; transform: translateY(-0.1em) rotate(-90deg) scale(0.4, 0.3)}{\wavy}
\hspace{-1.4em}} $$
$$ \newcommand{\fieldset}[2]{#1 \hspace{-0.65em} \lower{0.8ex}{\scriptscriptstyle{#2}} \;} $$
$$ \newcommand{\planesymbol}{~ \style{display: inline-block; transform: scale(2.24, 0.66)}{\diamond}} $$
$$ \newcommand{\df}[1]{\fieldset{#1}{\leftrightarrow}} $$
$$ \newcommand{\ugf}[1]{\fieldset{#1}{-}} $$
<!-- $$ \newcommand{\ugf}[1]{\fieldset{#1}{\rule[0.5ex]{1em}{0.4pt}}} $$ -->
$$ \newcommand{\augf}[1]{\fieldset{#1}{\sim}} $$
$$ \newcommand{\plane}[1]{\fieldset{#1}{\planesymbol}} $$
$$ \newcommand{\fieldsetSm}[2]{#1 \hspace{-0.48em} \lower{0.8ex}{\scriptscriptstyle{#2}} \;} $$
$$ \newcommand{\planeSm}[1]{\fieldsetSm{#1}{\planesymbol}} $$
<!-- Booleans -->
$$ \newcommand{\cupset}[2]{\; \mathop{#1 \hspace{-0.51em} \raise{0.24ex}{#2} \;}} $$
$$ \newcommand{\capset}[2]{\; \mathop{#1 \hspace{-0.51em} \raise{0.24ex}{#2} \;}} $$
$$ \newcommand{\minmaxCup}{\;\vee\;} $$
$$ \newcommand{\minmaxCap}{\;\wedge\;} $$
$$ \newcommand{\arbitraryCup}{\cupset{\vee} {\scriptstyle{\raise{ 0.4ex}{*}}}} $$
$$ \newcommand{\arbitraryCap}{\capset{\wedge}{\scriptstyle{\raise{-0.4ex}{*}}}} $$
$$ \newcommand{\distanceCup}{\cupset{\cup}{\scriptstyle{\circ}}} $$
$$ \newcommand{\distanceCap}{\capset{\cap}{\scriptstyle{\circ}}} $$
$$ \newcommand{\euclideanSymbol}{\hspace{-0.02em}\raise{0.1ex}{\scriptscriptstyle{+}}} $$
$$ \newcommand{\euclideanCup}{\cupset{\cup}{\euclideanSymbol}} $$
$$ \newcommand{\euclideanCap}{\capset{\cap}{\euclideanSymbol}} $$
$$ \newcommand{\chamferMinmaxCup}{\;\sqcup\;} $$
$$ \newcommand{\chamferMinmaxCap}{\;\sqcap\;} $$
$$ \newcommand{\chamferDistanceCup}{\cupset{\sqcup}{\scriptstyle{\circ}}} $$
$$ \newcommand{\chamferDistanceCap}{\capset{\sqcap}{\scriptstyle{\circ}}} $$
$$ \newcommand{\chamferEuclideanCup}{\cupset{\sqcup}{\euclideanSymbol}} $$
$$ \newcommand{\chamferEuclideanCap}{\capset{\sqcap}{\euclideanSymbol}} $$
</div>
<p><em>The clearance field, \(\ugf{A} + \ugf{B}\,\), the midsurface field, \(\ugf{A} - \ugf{B}\,\), and the two-body field: \(\twobody{\ugf{A}}{\ugf{B}} \equiv \frac{\ugf{A} - \ugf{B}}{\ugf{A} + \ugf{B}}\). The clearance and midsurface fields are overlaid to demonstrate their orthogonality.</em></p>
<!--more-->
<h3 id="clearance-and-midsurface-fields">Clearance and midsurface fields</h3>
<p>There are few concepts to unpack. First, lets just get a feel for why the sum and difference perform as clearance and midsurface fields. Let’s use one-dimensional functions on a line to represent the section between opposing shapes.</p>
<style>
td.RL {
background-image: linear-gradient(to right, rgba(255, 0, 0, 0.2) 0%, rgba(255, 0, 0, 0.2) 100%); /* your gradient */
background-position: 0% 50%;
background-repeat: no-repeat; /* don't remove */
}
td.BR {
background-image: linear-gradient(to left, rgba(0, 0, 255, 0.2) 0%, rgba(0, 0, 255, 0.2) 100%); /* your gradient */
background-position: 100% 50%;
background-repeat: no-repeat; /* don't remove */
}
td.GL {
background-image: linear-gradient(to right, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 100%); /* your gradient */
background-position: 0% 50%;
background-repeat: no-repeat; /* don't remove */
}
td.Div {
border-left: thin solid black;
}
table, tbody {
table-layout: fixed;
width: 100%;
margin-left: auto;
margin-right: auto;
}
table, tr, td {
border: 0px solid;
text-align: center;
padding: 0px !important;
}
p.squash {
max-height: 2rem;
width: 8rem;
overflow-y: clip;
vertical-align: center;
}
</style>
<div style="display:block; width: 60%; margin-left:auto; margin-right:auto;">
<table>
<tr>
<td style="width: 8rem;"><p class="squash"> $$ \ugf{A} $$ </p></td>
<td style="width: 1rem;" class="Div"></td>
<td class="RL" style="background-size: 100% 60%">-2</td>
<td class="RL" style="background-size: 100% 60%">-1</td>
<td class="RL" style="background-size: 50% 60%">0</td>
<td class="RL" style="background-size: 0% 60%">+1</td>
<td class="RL" style="background-size: 0% 60%">+2</td>
<td class="RL" style="background-size: 0% 60%">+3</td>
<td class="RL" style="background-size: 0% 60%">+4</td>
</tr>
<tr>
<td><p class="squash"> $$ \ugf{B} $$ </p></td>
<td class="Div"></td>
<td class="BR" style="background-size: 0% 60%">+4</td>
<td class="BR" style="background-size: 0% 60%">+3</td>
<td class="BR" style="background-size: 0% 60%">+2</td>
<td class="BR" style="background-size: 0% 60%">+1</td>
<td class="BR" style="background-size: 50% 60%">0</td>
<td class="BR" style="background-size: 100% 60%">-1</td>
<td class="BR" style="background-size: 100% 60%">-2</td>
</tr>
<tr>
<td><p class="squash"> $$ \ugf{A} + \ugf{B} $$ </p></td>
<td class="Div"></td>
<td>+2</td>
<td>+2</td>
<td>+2</td>
<td>+2</td>
<td>+2</td>
<td>+2</td>
<td>+2</td>
</tr>
<tr>
<td><p class="squash"> $$ \ugf{A} - \ugf{B} $$ </p></td>
<td class="Div"></td>
<td class="GL" style="background-size: 100% 60%">-6</td>
<td class="GL" style="background-size: 100% 60%">-4</td>
<td class="GL" style="background-size: 100% 60%">-2</td>
<td class="GL" style="background-size: 50% 60%">0</td>
<td class="GL" style="background-size: 0% 60%">+2</td>
<td class="GL" style="background-size: 0% 60%">+4</td>
<td class="GL" style="background-size: 0% 60%">+6</td>
</tr>
<tr>
<td><p class="squash"> $$ \twobody{\ugf{A}}{\ugf{B}} $$ </p></td>
<td class="Div"></td>
<td class="GL" style="background-size: 100% 60%">-3</td>
<td class="GL" style="background-size: 100% 60%">-2</td>
<td class="GL" style="background-size: 100% 60%">-1</td>
<td class="GL" style="background-size: 50% 60%">0</td>
<td class="GL" style="background-size: 0% 60%">+1</td>
<td class="GL" style="background-size: 0% 60%">+2</td>
<td class="GL" style="background-size: 0% 60%">+3</td>
</tr>
</table>
</div>
<p>Clearly, the sum indicates the clearance. The difference is the midsurface field, but scaled by a factor of two. If one zooms out of the sum field to the far side of either shape, the sum also doubles up far from the midsurface, so we normalize by two in the Shadertoy above.</p>
<p>The two-body field, \(\twobody{\ugf{A}}{\ugf{B}} \equiv \frac{\ugf{A} - \ugf{B}}{\ugf{A} + \ugf{B}}\), clearly ranges in \([-1, 1]\) in the region not contained in either of the shapes, creating a predictable parametric space for modulation, interpolation, and remapping.</p>
<h3 id="the-clearance-is-orthogonal-to-the-midsurface">The clearance is orthogonal to the midsurface</h3>
<p>In the visualization, the sum and difference fields are clearly orthogonal, but why? Algebraically, it works out trivially enough, recalling that UGFs have unit gradient magnitude by definition and that orthogonal vectors dot to zero:</p>
\[\begin{aligned}
\inner{(\grad\ugf{A} + \grad\ugf{B}\,)}{(\grad\ugf{A} - \grad\ugf{B}\,)} &= \\
\inner{\grad\ugf{A}\,}{(\grad\ugf{A}\; - \grad\ugf{B}\,)} + \inner{\grad\ugf{B}\,}{(\grad\ugf{A}\; - \grad\ugf{B}\,)} &= \\
\inner{\grad\ugf{A}}{\!\grad\ugf{A}}\; - \inner{\grad\ugf{A}}{\!\grad\ugf{B}}\; + \inner{\grad\ugf{B}}{\!\grad\ugf{A}}\; - \inner{\grad\ugf{B}}{\!\grad\ugf{B}} &= \\
1 - \inner{\grad\ugf{A}}{\!\grad\ugf{B}} + \inner{\grad\ugf{A}}{\!\grad\ugf{B}}\; - 1 &= 0 \;.
\end{aligned}\]
<p>However, those of us from the <a href="https://en.wikipedia.org/wiki/Tristan_Needham">Tristan Needham</a> school of analysis might prefer a more geometric explanation:</p>
<div><div class="extensions extensions--video">
<iframe class="fullsize" frameborder="0" src="https://www.shadertoy.com/embed/dd2cWy?gui=false&t=10&paused=false&muted=false" allowfullscreen=""></iframe>
</div>
</div>
<p>The key observation is that when \(\ugf{A}\,\) and \(\ugf{B}\,\) are UGFs, the sum and difference gradient vectors form the diagonals of a rhombus, and therefore, are orthogonal. Note that this rhombus is contained in the normal cone of the fields’ intersection (green).</p>
<p>The sum and difference fields, \(S = \ugf{A}\, + \ugf{B}\,\) and \(D = \ugf{A}\, - \ugf{B}\,\), produce an orthogonal basis and using the Sampson Norm, \(\sampson{F} \equiv \frac{F}{\norm{\grad{F}}}\), \(\sampson{S}\) and \(\sampson{D}\) form an orthonormal basis, which can be a useful way of approximating distance-to-curve and constructing edge treatments. Perhaps we’ll do a deeper dive on this topic in a future post, but here’s a teaser from some <a href="/2022/06/22/constant-width-chamfer.html">old</a> twitter <a href="/2022/06/25/edge-coordinate-system.html">threads</a>.</p>
<h3 id="applications-of-the-two-body-field">Applications of the two-body field</h3>
<p>The two-body field can be a convenient alternative to SDFs for modulating other fields and interpolating shape. In engineering applications, it can be uniquely handy when mapping one a shape from Cartesian space into a new field-driven parametric space. For example, consider the toolpath geometry for the saddle surface below. Two pairs of side walls \(U\) and \(V\) form two two-body fields, which, when multiplied by a constant characteristic length, creates a \(UVW\) coordinate space along with the the distance to the midsurface of the reference geometry, \(W\).</p>
<div style="display:block; width: 80%; margin-left:auto; margin-right:auto;">
<table>
<tr>
<td><img src="\assets\blog\UGFs\04 HyperUVW CAD.png" /></td>
<td><img src="\assets\blog\UGFs\04 HyperUVW UVW.png" /></td>
<td><img src="\assets\blog\UGFs\04 HyperUVW Final.png" /></td>
</tr>
</table>
</div>
<p>If working with oriented open or nested shapes, several two-body fields map be combined into larger piecewise continuous maps.</p>
<h3 id="generalized-conics">Generalized conics</h3>
<p>When observing the two-body field above, you might have noticed that the circles inside the blue circle aren’t concentric. Let’s simplify the situation down to the two-body field of two points:</p>
<div><div class="extensions extensions--video">
<iframe class="fullsize" frameborder="0" src="https://www.shadertoy.com/embed/cs2cW3?gui=false&t=10&paused=false&muted=false" allowfullscreen=""></iframe>
</div>
</div>
<p><em>Apollonian circles and conic sections. Only between two points to we see an Apollonian family of circles, but between a circle and a line, we see the full family of conic sections: ellipses occur near the circle, hyperbola occur near the line, and a parabola appears at \(\Xi = 0\). Observe that the two-body parameterization creates constant spacing along the horizontal axis containing the circle centers.</em></p>
<p>If these circles look familiar, they are members of the family (pencil) of <a href="https://en.wikipedia.org/wiki/Apollonian_circles">Apollonian circles</a> which sometimes appear in engineering applications. These circles are described by curves that are the constant ratio of distance to two circles, and indeed, the two-body field may be suitably reparameterized:</p>
\[\frac{\df{A}-\df{B}}{\df{A}+\df{B}} = t \quad\iff\quad \frac{\df{A}}{\df{B}} = \frac{1+t}{1-t} \,.\]
<p>When working with SDFs, our two-body parameterization has the useful property that the fields are evenly spaced, which is useful for both engineering and aesthetic applications. (This reparameterization is a one-dimensional <a href="https://en.wikipedia.org/wiki/Cayley_transform">Cayley transform</a>, which often appears in hyperbolic geometry.)</p>
<p>As noticed by <a href="https://www.tandfonline.com/doi/abs/10.4169/amer.math.monthly.121.01.018">Ponce and Santibáñez</a>, ratios of distance fields generalize conics from points, circles, and planes to arbitrary shapes, and UGFs further generalize those results beyond distance fields.</p>
<h3 id="summary">Summary</h3>
<p>The sum and difference fields represent clearance and interference when applied to SDFs. When applied to UGFs, the two-body field, the ratio of the sum and difference fields, is a straightforward approach to setting up mapping spaces in engineering applications. Mysteriously, notes of conformal mapping and complex analysis appear to present themselves, which can be useful when working on combined engineering and aesthetic challenges.</p>
<p><a href="https://docs.google.com/forms/d/e/1FAIpQLSc7ODKkQD2kd8LXfOm2oLpm4oX-CWgO6g4Hz_fSaMZh3sm75Q/viewform?usp=sf_link" target="_blank">Sign up for major updates on the UGF manuscript</a></p>Blake Courterbcourter@gmail.comSo far in the series, we’ve defined the basic idea that UGFs generalize SDFs and examined that when representing shapes, UGFs offer design freedom in the shapes’ normal cones. In most of the examples, we’ve shown that this freedom helps recapitulate the kinds of edge treatments we see in engineering software like rolling-ball blends and chamfers. In this post, we’ll take a look at the clearance and midsurface fields that apply to SDFs and the two-body field that applies to all UGFs. Use the slider to change viewing modes: $$ \newcommand{\R}{\mathbb{R}} $$ $$ \newcommand{\shape}[1]{\mathcal{#1}} $$ $$ \newcommand{\grad}{\boldsymbol{\nabla\!}} $$ $$ \newcommand{\BoundaryMap}[2][]{\vec{\mathbf{Q}}_{#2}^{#1}} $$ $$ \newcommand{\norm}[1]{\left\|#1\right\|} $$ $$ \newcommand{\abs}[1]{\left|#1\right|} $$ $$ \newcommand{\func}[1]{\mathop{\rm #1}\nolimits} $$ $$ \newcommand{\DF}{\mathfrak{D\hspace{-0.2em}\scriptstyle{F}\,}} $$ $$ \newcommand{\Shape}{\boldsymbol{\Omega}} $$ $$ \newcommand{\twobody}[2]{\Xi_{#1}^{#2}} $$ $$ \newcommand{\inner}[2]{#1 \cdot #2} $$ $$ \newcommand{\wavysmile}{\raise{-0.2ex}{\smallsmile}} $$ $$ \newcommand{\wavyfrown}{\raise{ 0.2ex}{\smallfrown}} $$ $$ \newcommand{\wavy}{\wavysmile\!\wavyfrown\!\wavysmile\!\wavyfrown\!\wavysmile} $$ $$ \newcommand{\sampson}[1]{\hspace{-1.3em} \style{display: inline-block; transform: translateY(-0.1em) rotate(90deg) scale(0.4, 0.3) }{\wavy} \hspace{-1.4em} #1 \hspace{-1.3em} \style{display: inline-block; transform: translateY(-0.1em) rotate(-90deg) scale(0.4, 0.3)}{\wavy} \hspace{-1.4em}} $$ $$ \newcommand{\fieldset}[2]{#1 \hspace{-0.65em} \lower{0.8ex}{\scriptscriptstyle{#2}} \;} $$ $$ \newcommand{\planesymbol}{~ \style{display: inline-block; transform: scale(2.24, 0.66)}{\diamond}} $$ $$ \newcommand{\df}[1]{\fieldset{#1}{\leftrightarrow}} $$ $$ \newcommand{\ugf}[1]{\fieldset{#1}{-}} $$ $$ \newcommand{\augf}[1]{\fieldset{#1}{\sim}} $$ $$ \newcommand{\plane}[1]{\fieldset{#1}{\planesymbol}} $$ $$ \newcommand{\fieldsetSm}[2]{#1 \hspace{-0.48em} \lower{0.8ex}{\scriptscriptstyle{#2}} \;} $$ $$ \newcommand{\planeSm}[1]{\fieldsetSm{#1}{\planesymbol}} $$ $$ \newcommand{\cupset}[2]{\; \mathop{#1 \hspace{-0.51em} \raise{0.24ex}{#2} \;}} $$ $$ \newcommand{\capset}[2]{\; \mathop{#1 \hspace{-0.51em} \raise{0.24ex}{#2} \;}} $$ $$ \newcommand{\minmaxCup}{\;\vee\;} $$ $$ \newcommand{\minmaxCap}{\;\wedge\;} $$ $$ \newcommand{\arbitraryCup}{\cupset{\vee} {\scriptstyle{\raise{ 0.4ex}{*}}}} $$ $$ \newcommand{\arbitraryCap}{\capset{\wedge}{\scriptstyle{\raise{-0.4ex}{*}}}} $$ $$ \newcommand{\distanceCup}{\cupset{\cup}{\scriptstyle{\circ}}} $$ $$ \newcommand{\distanceCap}{\capset{\cap}{\scriptstyle{\circ}}} $$ $$ \newcommand{\euclideanSymbol}{\hspace{-0.02em}\raise{0.1ex}{\scriptscriptstyle{+}}} $$ $$ \newcommand{\euclideanCup}{\cupset{\cup}{\euclideanSymbol}} $$ $$ \newcommand{\euclideanCap}{\capset{\cap}{\euclideanSymbol}} $$ $$ \newcommand{\chamferMinmaxCup}{\;\sqcup\;} $$ $$ \newcommand{\chamferMinmaxCap}{\;\sqcap\;} $$ $$ \newcommand{\chamferDistanceCup}{\cupset{\sqcup}{\scriptstyle{\circ}}} $$ $$ \newcommand{\chamferDistanceCap}{\capset{\sqcap}{\scriptstyle{\circ}}} $$ $$ \newcommand{\chamferEuclideanCup}{\cupset{\sqcup}{\euclideanSymbol}} $$ $$ \newcommand{\chamferEuclideanCap}{\capset{\sqcap}{\euclideanSymbol}} $$ The clearance field, \(\ugf{A} + \ugf{B}\,\), the midsurface field, \(\ugf{A} - \ugf{B}\,\), and the two-body field: \(\twobody{\ugf{A}}{\ugf{B}} \equiv \frac{\ugf{A} - \ugf{B}}{\ugf{A} + \ugf{B}}\). The clearance and midsurface fields are overlaid to demonstrate their orthogonality.Gradient Control Laboratories and LatticeRobot2023-06-14T00:00:00+00:002023-06-14T00:00:00+00:00http://bcourter.github.io/2023/06/14/gcl-latticerobot-launch<p>With the UGF research entering a public phase, some other collaborations from the background are entering the foreground. In particular, some investigations with some friends have evolved into two new entities: an incubator, <a href="https://www.gradientcontrol.com">Gradient Control Laboratories</a> and its first spinoff, <a href="https://www.latticerobot.com">LatticeRobot</a>!</p>
<p><img src="https://latticerobot.com/assets/body_text-1e1a169c.png" alt="LatticeRobot Logo" width="65%" height="65%" /></p>
<h3 id="media-coverage-from-cdfam-23">Media coverage from <a href="https://cdfam.com/">CDFAM ‘23</a></h3>
<blockquote>
<p><a href="https://3dprint.com/301007/startup-accelerator-latticerobot-launches-a-home-for-lattices-metamaterials-and-textures/">3DPrint.com: LatticeRobot Launches a Home for Lattices, Metamaterials, and Textures</a></p>
</blockquote>
<blockquote>
<p><a href="https://develop3d.com/cad/latticerobot-announces-community-for-advancing-lattices-in-products/">Develop3D: LatticeRobot announces community for advancing lattices in products</a></p>
</blockquote>
<blockquote>
<p><a href="https://www.tctmagazine.com/additive-manufacturing-3d-printing-news/software-and-simulation-news/latticerobot-launches-engineering-community-for-lattice-rese/">TCT: LatticeRobot launches engineering community for lattice research and knowledge share</a></p>
</blockquote>
<p><!--more--></p>
<h3 id="what-is-gradient-control-labs-gcl">What is <a href="https://www.gradientcontrol.com">Gradient Control Labs</a> (GCL)?</h3>
<p>GCL is an incubator founded by Luke Church, myself, and some friends to help advanced engineering software, a notoriously challenging business. The best leaders of engineering software companies are not usually the best builders of engineering software, and we close that gap by helping founders build great, scalable products. In the process of building companies, we are also developing background IP in implicit modeling, user interaction, and machine learning to future accelerate future application development.</p>
<h3 id="what-is-latticerobot">What is <a href="https://www.latticerobot.com">LatticeRobot</a>?</h3>
<p>Lattices offer the potential to change the world of advanced manufacturing, but a lack of common knowledge impedes their application. LatticeRobot closes this gap by bringing a community of engineers together in a computationally enhanced working space to aggregate and explore the world’s knowledge of lattices, textures, and related mesoscale geometry and applications.</p>
<p>LatticeRobot’s interactive environment helps engineers explore what combination of base materials and lattice geometries create data-driven results. It combines lattice geometry and empirical, functional data to produce optimized implicit unit cells that work with modern latticing software. Data supplied by hardware, software, and consulting vendors refers users back to the referenced products and services, helping users discover the most fit products and services for their applications.</p>
<p>Hear it from the team:</p>
<div><div class="extensions extensions--video">
<iframe src="https://www.youtube.com/embed/6OaUKq7LQhc?rel=0&showinfo=0" frameborder="0" scrolling="no" allowfullscreen=""></iframe>
</div>
</div>
<h3 id="whats-next-for-gcl">What’s next for GCL?</h3>
<p>While we’ll be busy with LatticeRobot for most of 2023, we have a few hunches about the future of engineering software that we continue to explore. We expect to productize aspects of that research while working with market-driven founders to bring the next generation of design, engineering, and manufacturing software to market. If you have a vision to address an undeserved engineering market, consider <a href="https://www.linkedin.com/in/blakecourter/">reaching out</a>.</p>Blake Courterbcourter@gmail.comWith the UGF research entering a public phase, some other collaborations from the background are entering the foreground. In particular, some investigations with some friends have evolved into two new entities: an incubator, Gradient Control Laboratories and its first spinoff, LatticeRobot! Media coverage from CDFAM ‘23 3DPrint.com: LatticeRobot Launches a Home for Lattices, Metamaterials, and Textures Develop3D: LatticeRobot announces community for advancing lattices in products TCT: LatticeRobot launches engineering community for lattice research and knowledge shareUnit Gradient Fields: The Promise of Unbreakable Geometry2023-06-03T00:00:00+00:002023-06-03T00:00:00+00:00http://bcourter.github.io/2023/06/03/foreword<p>Something seemed different about Sarah Frisken and Ron Perry, researchers from MERL who had ventured out to Boston’s Route 128 tech corridor to present their new modeling technology to the top geometry engineers at a leading CAD company. Frisken and Perry demonstrated that their <em>adaptively sampled distance fields</em> (“ADFs”) encoded geometry in a way where the offsets, Booleans, and rounded blends that confounded contemporaneous CAD systems like ours, would always succeed. They demonstrated organic texturing and lattices that would be unthinkable on state-of-the-art boundary representation (B-rep) solids. On the other hand, the modeling operations seemed limited to CSG operations, which had been superseded in mechanical CAD by the more expressive B-reps, and their only practical output was meshed geometry, considered inferior to B-reps. Would it be possible to combine the benefits of B-rep modeling with robust offsets, Booleans, and blends? It was 2001, I’d never seen anything like it, and I was hooked.</p>
<!--more-->
<div hidden="">
$$ \newcommand{\R}{\mathbb{R}} $$
$$ \newcommand{\shape}[1]{\mathcal{#1}} $$
$$ \newcommand{\grad}{\boldsymbol{\nabla\!}} $$
$$ \newcommand{\BoundaryMap}[2][]{\vec{\mathbf{Q}}_{#2}^{#1}} $$
$$ \newcommand{\norm}[1]{\left\|#1\right\|} $$
$$ \newcommand{\abs}[1]{\left|#1\right|} $$
<!-- $$ \newcommand{\func}[1]{\; \mathop{\text{#1}}} $$ -->
$$ \newcommand{\func}[1]{\mathop{\rm #1}\nolimits} $$
$$ \newcommand{\DF}{\mathfrak{D\hspace{-0.2em}\scriptstyle{F}\,}} $$
$$ \newcommand{\Shape}{\boldsymbol{\Omega}} $$
$$ \newcommand{\twobody}[2]{\Xi_{#1}^{#2}} $$
$$ \newcommand{\inner}[2]{#1 \cdot #2} $$
$$ \newcommand{\wavysmile}{\raise{-0.2ex}{\smallsmile}} $$
$$ \newcommand{\wavyfrown}{\raise{ 0.2ex}{\smallfrown}} $$
$$ \newcommand{\wavy}{\wavysmile\!\wavyfrown\!\wavysmile\!\wavyfrown\!\wavysmile} $$
$$ \newcommand{\sampson}[1]{\hspace{-1.3em}
\style{display: inline-block; transform: translateY(-0.1em) rotate(90deg) scale(0.4, 0.3) }{\wavy}
\hspace{-1.4em} #1 \hspace{-1.3em}
\style{display: inline-block; transform: translateY(-0.1em) rotate(-90deg) scale(0.4, 0.3)}{\wavy}
\hspace{-1.4em}} $$
$$ \newcommand{\fieldset}[2]{#1 \hspace{-0.65em} \lower{0.8ex}{\scriptscriptstyle{#2}} \;} $$
$$ \newcommand{\planesymbol}{~ \style{display: inline-block; transform: scale(2.24, 0.66)}{\diamond}} $$
$$ \newcommand{\df}[1]{\fieldset{#1}{\leftrightarrow}} $$
$$ \newcommand{\ugf}[1]{\fieldset{#1}{-}} $$
<!-- $$ \newcommand{\ugf}[1]{\fieldset{#1}{\rule[0.5ex]{1em}{0.4pt}}} $$ -->
$$ \newcommand{\augf}[1]{\fieldset{#1}{\sim}} $$
$$ \newcommand{\plane}[1]{\fieldset{#1}{\planesymbol}} $$
$$ \newcommand{\fieldsetSm}[2]{#1 \hspace{-0.48em} \lower{0.8ex}{\scriptscriptstyle{#2}} \;} $$
$$ \newcommand{\planeSm}[1]{\fieldsetSm{#1}{\planesymbol}} $$
<!-- Booleans -->
$$ \newcommand{\cupset}[2]{\; \mathop{#1 \hspace{-0.51em} \raise{0.24ex}{#2} \;}} $$
$$ \newcommand{\capset}[2]{\; \mathop{#1 \hspace{-0.51em} \raise{0.24ex}{#2} \;}} $$
$$ \newcommand{\minmaxCup}{\;\vee\;} $$
$$ \newcommand{\minmaxCap}{\;\wedge\;} $$
$$ \newcommand{\arbitraryCup}{\cupset{\vee} {\scriptstyle{\raise{ 0.4ex}{*}}}} $$
$$ \newcommand{\arbitraryCap}{\capset{\wedge}{\scriptstyle{\raise{-0.4ex}{*}}}} $$
$$ \newcommand{\distanceCup}{\cupset{\cup}{\scriptstyle{\circ}}} $$
$$ \newcommand{\distanceCap}{\capset{\cap}{\scriptstyle{\circ}}} $$
$$ \newcommand{\euclideanSymbol}{\hspace{-0.02em}\raise{0.1ex}{\scriptscriptstyle{+}}} $$
$$ \newcommand{\euclideanCup}{\cupset{\cup}{\euclideanSymbol}} $$
$$ \newcommand{\euclideanCap}{\capset{\cap}{\euclideanSymbol}} $$
$$ \newcommand{\chamferMinmaxCup}{\;\sqcup\;} $$
$$ \newcommand{\chamferMinmaxCap}{\;\sqcap\;} $$
$$ \newcommand{\chamferDistanceCup}{\cupset{\sqcup}{\scriptstyle{\circ}}} $$
$$ \newcommand{\chamferDistanceCap}{\capset{\sqcap}{\scriptstyle{\circ}}} $$
$$ \newcommand{\chamferEuclideanCup}{\cupset{\sqcup}{\euclideanSymbol}} $$
$$ \newcommand{\chamferEuclideanCap}{\capset{\sqcap}{\euclideanSymbol}} $$
</div>
<p>About a year later, at the earliest stages of designing a CAD system that would become known as “<a href="http://www.spaceclaim.com/">SpaceClaim</a>,” I caught up with Frisken and Perry, who were interested in better understanding the viability of ADFs in engineering applications. At MERL, Frisken and Perry mentored me in implicit modeling, and I had the pleasure of working with <a href="https://www.merl.com/publications/docs/TR2001-08.pdf">Kizamu</a>, their prototype modeler that delivered real time interaction at remarkably high fidelity compared to the state-of-the-art “voxel” kernels in Electric Image Amorphium and <a href="https://oqton.com/geomagic-freeform/">SensAble Freeform</a>. Although we established that ADFs were not ready for mechanical design, we gained enough confidence to pursue 2D applications. ADFs and derived technology flourished in 2D, proliferating in font representations promoted by (Agfa) Monotype that targeted mobile devices and in drawing applications such as Mischief, authored by Frisken and acquired by <a href="https://www.foundry.com/">The Foundry</a>.</p>
<p>In the 2000s, precise B-rep kernels saw significant development to enable interactive modeling. SpaceClaim and its cohorts’ direct solid modeling paradigm caused local operations to be exercised far more than the history-based approach, and vendors spent years gusseting their B-rep kernels for the purpose. Although B-rep modeling became much more robust, its boundary-based (<a href="https://0fps.net/2013/01/11/shapes-and-coordinates/">Lagrangian</a>) nature ensured that a long tail of edges cases would always detract from uninterrupted, interactive B-rep editing.</p>
<p>Direct modeling permitted a more flexible data model, and SpaceClaim’s architect, David Taylor, fastidiously and passionately built a beautiful API that was a sort of homage to B-reps themselves. Inspired by the first generation of generative design tools such as Grasshopper and artists such as Jessica Rosenkrantz and Jesse Louis-Rosenberg at <a href="https://n-e-r-v-o-u-s.com/">Nervous System</a> and implicit art pioneer <a href="https://bathsheba.com/">Bathsheba Grossman</a>, I attempted use the API to produce generative art on top of B-reps, but became frustrated as I only further exposed their weaknesses. For example, to successfully union a few thousand cylinders of identical diameter into a lattice requires adjusting radii by microns to enable some Booleans to succeed.</p>
<p><img src="/assets/blog/UGFs/00 Sphere Eversion BRep.png" alt="Sphere eversion B-rep" /></p>
<p><em>This boundary representation, produced from the edges of the non-manifold mesh, contains 8760 faces, 24,270 edges, and 14,181 vertices. About two-thirds of the faces are small triangles producing features below fabrication resolution. To successfully boolean this solid shape in a contemporary B-rep modeler, the process must be decomposed into a sequence of unions of subsets of the initial shapes, and some faces must be slightly offset to remove singularities. This geometry, the mesh of a Boy’s surface, is derived from the optimal minimax eversion by <a href="http://torus.math.uiuc.edu/jms/Papers/annotbib/pdfs/FS.pdf">Francis and Sullivan</a> and was modeled and rendered in ANSYS SpaceClaim.</em></p>
<h2 id="photon">Photon</h2>
<p>In 2014, the 3D printing juggernaut <a href="https://www.stratasys.com/en/">Stratasys</a> acquired the incredible team at <a href="https://grabcad.com/">GrabCAD</a>, with whom I was proud to serve, and provided the challenge of making their prototyping technology more suitable for end-use parts. Few tools were available at the time that would permit volumetric control of structures, but <a href="https://implicitcad.org/">ImplicitCAD</a> and <a href="https://andy-payne-68uu.squarespace.com/">Monolith</a> enabled the creation of some spatially varying lattices using simple distance functions, generating compelling results at small scale.</p>
<p>In June of 2015, our head of software, Jon Stevenson, introduced me to a hardware research team working on an electrophotography-based printer that needed their soluble support structures to dissolve faster. They were printing model material inside a solid block of support material, so we discussed adding lattices that would <a href="https://image-ppubs.uspto.gov/dirsearch-public/print/downloadPdf/20180370155">transition to solid near the part</a>. Although I wasn’t sure at the time how to construct a distance field even in 2D, I was able to hack a simple slicer out of a <a href="https://www.blakecourter.com/homepage/Struttura/">GPU-based art project</a> and compute a distance-like field by applying Gaussian blur to cross sections of a mesh, which could then modulate implicit gyroids. While the slices looked decent to me, the hardware team was initially underwhelmed, as they also needed the supports to transition to solid beneath the part. Fortunately, I was aware of the existence of depth buffers, and somehow produced a stack of slices by combining the depth buffer and Gaussian blur into a pseudo-2.5D distance field. The team fabricated a part using the first set of slices delivered, which printed successfully with supports dissolving orders of magnitude faster than before, removing a serious business impediment. We named the new slicer “Photon.”</p>
<p>The next week, I found myself talking to a different team on the other side of the world with a novel two-material system that required printing a minor fraction of support material, or a step of their process would explode. The code base of the old art project already dynamically loaded the shaders doing the heavy lifting, so I wrote a new shader that used the pseudo distance field (with a second depth pass from the top) to modulate subdivision of space-filling solids with thin gaps. The first prints from <a href="https://3dprintingindustry.com/news/stratasys-unveils-layered-powder-metallurgy-3d-printing-platform-143307/">this approach</a> were also successful.</p>
<p>Having supported two hardware teams on a whim, I sheepishly approached GrabCAD’s head of engineering, Amos Benninga, to inform him of the liabilities I’d potentially created. He was delighted, and offered me a small team if the stack could also support <a href="https://www.stratasys.com/en/guide-to-3d-printing/technologies-and-materials/polyjet-technology/">PolyJet</a>, Stratasys’ flagship multi-material jetting technology. The next day, I handed him a Photon-sliced PolyJet part.</p>
<p>Steve DeMai joined as lead engineer on Photon, evolving it from a Node/Electron art project to a professional, optimized C# application. I figured out how to replace the Gaussian blur with a narrow-band distance field by brute force sampling, but performance was terrible. Steve implemented several methods, ultimately landing on the sweep-based <a href="https://cs.brown.edu/people/pfelzens/papers/dt-final.pdf">lower envelope distance algorithm</a> and, with <a href="https://image-ppubs.uspto.gov/dirsearch-public/print/downloadPdf/20200346411">Nur Arad</a>, realized he could precondition it with the depth-buffer, giving us a full resolution, accurate, signed 3D distance field of <a href="https://image-ppubs.uspto.gov/dirsearch-public/print/downloadPdf/20180240263">entire slices in real time</a>.</p>
<p><img src="/assets/blog/UGFs/00 Gyroid Belt.png" alt="Gyroid Belt" style="size: 80%; display: block; margin-left: auto; margin-right: auto" /></p>
<p><em>For this limited compliance assembly, the untrimmed individual repeating unit was produced with Monolith, then assembled, trimmed to shape, and packaged for manufacturing in SpaceClaim. (We’ll eventually get to a post on such ramped, folded structures.)</em></p>
<p>As far as I’m aware, this was the first point in history that an implicit modeler produced distance fields from imported meshes at the full resolution of high-fidelity manufacturing hardware. It’s a moment I had estimated far further into the future, but made possible by the hardware’s relative coarseness compared to traditional manufacturing processes. As impressive as PolyJet’s 600DPI resolution may have been, the \(~40\,\mu m\) resolution is about two orders of magnitude coarser than the worst case in most engineering software implementations. Over three dimensions, and coupled with the fact that we only needed to slice as fast as printers could print, our modeling stack delivered end-to-end results with eight or nine orders of magnitude less computing than I’d predicted. The future was now!</p>
<p>While Photon’s main job was to prototype techniques to slice parts, generate supports, and produce output for novel printing processes, my interest lay in generative solid modeling. Our team had two interns just out of high school, Brenna Sorkin and Bradley Stevenson, who started implementing our modeling library. Brenna sorted through Vadim Shapiro’s notes on Rvachav’s R-functions to implement blends, and Bradley found expressions for primitives that somehow had more <code class="language-plaintext highlighter-rouge">if</code> statements than the primitives had topology. The art project had a bunch of noise functions copied from all over the internet, which combined with periodic lattices, TPMS such as gyroids, and Brenna and Bradley’s contributions, constituted a pretty awesome modeler. Much of that prototype library gave way to <a href="https://iquilezles.org">Inigo Quilez</a>’s elegant <a href="https://iquilezles.org/articles/distfunctions/">haiku of distance field primitives</a>, about which I was oblivious until at least 2016.</p>
<p>With three bitmap-based printing platforms initially supported, we hooked up marching squares and cubes to produce high-resolution output for toolpath-based printers and CAD. There was strong affinity with Stratasys’ need for novel support structures and my interest in applying generative thinking and implicit modeling to mechanical engineering challenges. New materials and hardware configurations created endless demand to create more slicers that could synthesize supports and fine-tune process issues. Creating working hardware and electronics was typically the main concern of the engineering teams, so I found myself not only producing slices, but also working through the process engineering, a discipline rife with contradictions and exceptions. (For example, it’s common to both want to support a model from below and also create an in-layer air gap between the model and support materials. In regions with sloped overhang, there’s a contradiction between the air and the supports, and different process situations call for different choices.)</p>
<p>Support structures require precise control over offsets and taper, some of the most error-prone operations in traditional B-rep-based CAD technology, so we developed techniques to handle them correctly. Challenges like the <a href="https://image-ppubs.uspto.gov/dirsearch-public/print/downloadPdf/9636868">H-2000 prototype</a> separated the problems of gravitational and build process continuity, resulting in support geometry that resembled multi-pull injection molded parts. Meanwhile, we had other interesting challenges that weren’t easily described with conventional distance fields, like needing to know the distance from the silhouette of the projection of a shape to create the coated PolyJet supports.</p>
<p>Only armed with signed distance fields, we would have been forced to approximate some of the fields needed to construct these results. Coincidentally, the intermediate data Photon used to construct the 3D distance fields also facilitated computation of the needed auxiliary fields. For example, in the process of building the 3D field, we could also generate the 2D distance field of data only on the plane. Using the depth buffer information, we produced a 1D signed directional distance to our shape from above or below. Similarly, we could construct a distance to the contour or the silhouette in a given slice plane. These “foliated fields” (future post) became indispensable in <a href="https://image-ppubs.uspto.gov/dirsearch-public/print/downloadPdf/20210221045">enabling draft</a> and making appropriate choices in situations like the underhang contradiction mentioned above.</p>
<p><img src="/assets/blog/UGFs/00 Photon Rabbit Model.png" alt="Photon Rabbit Model" width="45%" height="45%" />
<img src="/assets/blog/UGFs/00 Photon Rabbit Slice.png" alt="Photon Rabbit Slice" width="45%" height="45%" /></p>
<p><em>A texture-mapped rabbit (right) intersected with gyroid TPMS, with the intersection blended, and printed on a Stratasys PolyJet jetting system with five color resins. The original model is a sample provided with Materialise Magics software and was sliced and rendered with Implicit Space (right).</em></p>
<p>For each of these these fields, Steve had provided a data structure that included not just the distance, but also the closest point and therefore the gradient. At the closest point, we knew the surface texture color, surface normal, and ID of the body and face topology. We could support an arbitrary number of juxtaposed fields for different bodies or body types. When manual input was required in delicate processes, we could easily tune the builds using color maps or 3D Photoshop jobs. Each slicer could be configured with custom parameters and options to enable a surprising amount of control and interactivity.</p>
<p>The ultimate application of Photon came from Daniel Dikovsky, who had been experimenting with a family of eight PolyJet materials that, when printed together, could reproduce the material properties of human bone, soft tissue, and blood. We would layer low-fidelity, segmented MRI data of organ structures, assign each layer a tissue type, and paint on layers of embellishment as needed. The biomimetic slicer would then add mesoscale structure, interpolate it between the layers of geometry and modulate it with metadata fields, knitting together complex assemblies of organ structures. The geometry would often be imprecise and overlap, and we often needed to fix clearance and interference between the meshes. It was in this setting that I first started to compare distance fields, investigating the difference field (midsurface), sum (clearance), and their ratio, <a href="https://www.shadertoy.com/view/wdffW2">the “two-body field”</a> that interpolates between shapes (topic of next post). We were quickly achieving results that would have been inconceivable with meshes alone, such as automatically dilating small vasculature to meet minimum manufacturing conditions or designing intentional structural defects to <a href="https://image-ppubs.uspto.gov/dirsearch-public/print/downloadPdf/20200155321">mimic pathological situations</a>.</p>
<p><img src="/assets/blog/UGFs/00 Photon Biomimics Femur.png" alt="Photon Biomimics Femur" style="size: 80%; display: block; margin-left: auto; margin-right: auto" /></p>
<p><em>A biomimetic femur produced with prototype software and materials of the <a href="https://www.stratasys.com/en/3d-printers/printer-catalog/polyjet/j850-digital-anatomy/">Stratasys PolyJet Digital Anatomy</a> system. The wall thickness varies along the length of the bone, and the trabeculae (lattice) on the proximal epiphysis (round end), which would be too fine to produce at scale, are homogenized via cellular (Worley) noise.</em></p>
<p>Eventually, we also solved toolpathing, cost estimation, color calibration, and material property management challenges in Photon, much of which lives on in Stratasys’ commercial products and its spinoffs.</p>
<h2 id="ntopology">nTopology</h2>
<p>In the spring of 2017, I met Bradley Rothenberg, founder of <a href="http://www.ntop.com">nTop</a> (née “nTopology”), at the COFES gathering of engineering software technologists. nTopology’s first product, Element, was a runaway success for latticing 3D printed models, and Brad was interested in expanding the vision to a broader set of applications. I started to advise the company as they were raising their A round, and we upgraded the pitch to generalize generative technology beyond additive. With funding achieved, I visited nTopology’s original office on Lafayette Street in SOHO, New York City, to help align product strategy to the expanded scope. Element had been hitting a resolution wall with the popular and excellent <a href="https://www.openvdb.org/">OpenVDB kernel</a>, so we had a whiteboard discussion over the advantages of B-reps, meshes, and implicits. The team decided to give implicits a shot, creating a beautiful block-based user experience with evaluation initially powered by <a href="https://www.mattkeeter.com/">Matt Keeter</a>’s <a href="https://libfive.com/">libfive</a> library.</p>
<p><img src="/assets/blog/UGFs/00 FDM Hyper.png" alt="FDM hyperbolic shape" width="40%" height="40%" />
<img src="/assets/blog/UGFs/00 Electroimpact.png" alt="Electroimpact panel" width="55%" height="55%" /></p>
<p><em>An application of UGFs on spatially-varying, multiscale, geometry designed for 5-axis deposition and created and rendered in nTop (left), and an example from industry produced by <a href="https://www.electroimpact.com/3d/overview.aspx">Electroimpact SCRAM</a>. UGFs maintain constant gaps between walls while the surrounding geometry is warped into a curved space, the map of which is defined by a distance field and two orthogonal two-body fields. This nTop demo video demonstrates <a href="https://www.youtube.com/watch?v=EALpNgdSYCg">the approach</a>.</em></p>
<p>The results were impressive, as nTop could render in seconds 3D models that would take Photon hours. I joined full time to build nTopology’s product team and ready the product for market before settling in as CTO, where I spent most of my time applying “nTop” to diverse mechanical design challenges. nTopology’s engineering team continued to accelerate performance and increase resolution, and the flexibility of the block system enabled us to quickly prototype new applications.</p>
<p>The initial set of nTop implicit modeling routines included a decent set of primitives and blended Booleans that still represent the state of the art. As with Photon, careless use of these blocks would produce unintended results. While implicits may never fail, garbage in is still garbage out, perhaps without the error message one would see doing something similar with boundary representations. Just as with SpaceClaim, where interactive modeling exposed weaknesses in the B-rep paradigm, nTop’s expedient user interface and diverse user base exposed usability issues with implicit modeling. Without care, common modeling operations such as offsets, Booleans, and blends, while unbreakable, can leave unexpected artifacts in the remote field that may appear as defects in subsequent operations. In addition, popular implicit fields like gyroid lattices are not distance fields, creating further aberrations. To make implicit modeling accessible, nTopology created specialized tools that do the right thing in everyday workflows.</p>
<h2 id="unit-gradient-fields">Unit Gradient Fields</h2>
<p>Over time, as engineering tools become higher fidelity and increasingly interactive, they propel their users to higher vantages from which they gain better control over their work. When waiting overnight for a result, as with Photon, the surprise of an oddly-shaped blend causes less notice than in real-time physically-based rendering in nTop. When making support structures and mechanical demos with Photon, such details were negligible, but when designing real parts in nTop, they were hard to avoid. With the initial focus on latticing and topology optimization use cases, the core tool in nTop delivered results, and several of us strove to facilitate trickier situations such as modulating warped lattice parameters.</p>
<p>To work around early performance and limitations in nTop that have since been overcome, I prototyped a new gradient-aware stack on top of a new project Steve DeMai was interdependently pursuing, “Implicit Space”. (The work was sufficiently contemporaneous with <a href="https://iquilezles.org/articles/distgradfunctions2d/">Quilez’s post on gradients</a> that I yet again just missed using his results.) Over a few releases, nTop received more tech to compensate transformations, culminating in a new pipelines that abstracted the grunt work of modulating warped lattices. With a “new lattice pipeline” and breakthrough interactivity in nTop’s third release in the spring of 2021, nTop felt like a complete product for lattices and top opt. Although there wasn’t a single technology that addressed the issues, a common theme became keeping the gradient magnitudes (Lipschitz coefficients) near unity.</p>
<p><img src="/assets/blog/UGFs/02 RadiatedFieldBefore.png" alt="Radiated Before" width="45%" height="45%" />
<img src="/assets/blog/UGFs/02 RadiatedFieldAfter.png" alt="Radiated After" width="45%" height="45%" /></p>
<p><em>A Worley noise field displaces a torus. On the right, there are overhangs with respect to surface torus gradient and disconnected topology. On the left, the noise field has been composed with the torus’ boundary map, so no overhangs or disconnected topology are present.</em></p>
<p>Through the COVID years, I dedicated more time to working on recapitulating the full suite of rounds, chamfers, and drafts expected in conventional boundary representation modelers for mechanical design. Although the \(\func{Radiate}\) operation (remapping through via the boundary map) had proved useful at Stratasys for monotonic texturing, I found it could construct isocline draft surfaces as well as rolling-ball rounds via what I would learn to be called “the normal cone” (<a href="https://www.blakecourter.com/2023/05/18/field-notation.html">last post</a>). At the time, the constructions were missing the correction factors needed to conserve unit gradient magnitudes, so I reached out for assistance to Vadim Shapiro, the peripatetic professor from UW-Madison, CEO of the pioneering simulation startup Intact Solutions, and editor of The CAD Journal. For over a decade, Vadim has helped fill gaps in my analytical acumen while I’ve provided business advice to Intact. He quickly responded to my long email which was brief on descriptions but included lots of pretty pictures of cross sections. His response was something like:</p>
<p>“I have no idea what you’re talking about.”</p>
<p>So I tried to explain a bit more about the radiated field construction, because I thought I was just looking for a bit of standard differential geometry. However, he replied with:</p>
<p>“I still have no idea what you’re talking about, but your techniques appear to be new. It sounds like you are trying to say something like…” and he proceeded to state a little proposition and a proof. “You need to write a paper. Let’s talk on Monday.”</p>
<p>On Monday, Vadim started to cajole me into this project. He promised to help, but only if I stopped sending him rambling emails, typeset everything in \(\LaTeX\), and produced a paper. He foretold that with this endeavor, I would achieve a much clearer understanding of the concepts and produce higher fidelity results. I spent the fall of 2022 and winter of 2023 expanding this “paper” to a somewhat technical manuscript, which feels like it’s about half done, but I keep finding practical and curious side roads to explore. Although the work so far has been receiving good feedback, most of my friends and colleagues prefer a simplified treatment, which is why I’ve decided to ship the most fun and useful parts of the book in these blog posts.</p>Blake Courterbcourter@gmail.comSomething seemed different about Sarah Frisken and Ron Perry, researchers from MERL who had ventured out to Boston’s Route 128 tech corridor to present their new modeling technology to the top geometry engineers at a leading CAD company. Frisken and Perry demonstrated that their adaptively sampled distance fields (“ADFs”) encoded geometry in a way where the offsets, Booleans, and rounded blends that confounded contemporaneous CAD systems like ours, would always succeed. They demonstrated organic texturing and lattices that would be unthinkable on state-of-the-art boundary representation (B-rep) solids. On the other hand, the modeling operations seemed limited to CSG operations, which had been superseded in mechanical CAD by the more expressive B-reps, and their only practical output was meshed geometry, considered inferior to B-reps. Would it be possible to combine the benefits of B-rep modeling with robust offsets, Booleans, and blends? It was 2001, I’d never seen anything like it, and I was hooked.Unit Gradient Fields: SDFs, UGFs, and their friends2023-05-18T00:00:00+00:002023-05-18T00:00:00+00:00http://bcourter.github.io/2023/05/18/field-notation<p>Many readers <a href="/2023/05/05/what-is-offset.html">of the last post</a> requested a more formal definition of a UGF. Let’s look a bit more closely at the definition of an SDF and how it compares to UGFs and other useful fields in engineering applications. Some readers may find the visual concepts more intuitive than the nuances, so let’s get a feel for the territory first by examining the field at the intersection of two planes:</p>
<iframe class="fullsize" frameborder="0" src="https://www.shadertoy.com/embed/clV3Rz?gui=false&t=10&paused=false&muted=false" allowfullscreen=""></iframe>
<!--more-->
<div hidden="">
$$ \newcommand{\R}{\mathbb{R}} $$
$$ \newcommand{\shape}[1]{\mathcal{#1}} $$
$$ \newcommand{\grad}{\boldsymbol{\nabla\!}} $$
$$ \newcommand{\BoundaryMap}[2][]{\vec{\mathbf{Q}}_{#2}^{#1}} $$
$$ \newcommand{\norm}[1]{\left\|#1\right\|} $$
$$ \newcommand{\abs}[1]{\left|#1\right|} $$
<!-- $$ \newcommand{\func}[1]{\; \mathop{\text{#1}}} $$ -->
$$ \newcommand{\func}[1]{\mathop{\rm #1}\nolimits} $$
$$ \newcommand{\DF}{\mathfrak{D\hspace{-0.2em}\scriptstyle{F}\,}} $$
$$ \newcommand{\Shape}{\boldsymbol{\Omega}} $$
$$ \newcommand{\twobody}[2]{\Xi_{#1}^{#2}} $$
$$ \newcommand{\inner}[2]{#1 \cdot #2} $$
$$ \newcommand{\wavysmile}{\raise{-0.2ex}{\smallsmile}} $$
$$ \newcommand{\wavyfrown}{\raise{ 0.2ex}{\smallfrown}} $$
$$ \newcommand{\wavy}{\wavysmile\!\wavyfrown\!\wavysmile\!\wavyfrown\!\wavysmile} $$
$$ \newcommand{\sampson}[1]{\hspace{-1.3em}
\style{display: inline-block; transform: translateY(-0.1em) rotate(90deg) scale(0.4, 0.3) }{\wavy}
\hspace{-1.4em} #1 \hspace{-1.3em}
\style{display: inline-block; transform: translateY(-0.1em) rotate(-90deg) scale(0.4, 0.3)}{\wavy}
\hspace{-1.4em}} $$
$$ \newcommand{\fieldset}[2]{#1 \hspace{-0.65em} \lower{0.8ex}{\scriptscriptstyle{#2}} \;} $$
$$ \newcommand{\planesymbol}{~ \style{display: inline-block; transform: scale(2.24, 0.66)}{\diamond}} $$
$$ \newcommand{\df}[1]{\fieldset{#1}{\leftrightarrow}} $$
$$ \newcommand{\ugf}[1]{\fieldset{#1}{-}} $$
<!-- $$ \newcommand{\ugf}[1]{\fieldset{#1}{\rule[0.5ex]{1em}{0.4pt}}} $$ -->
$$ \newcommand{\augf}[1]{\fieldset{#1}{\sim}} $$
$$ \newcommand{\plane}[1]{\fieldset{#1}{\planesymbol}} $$
$$ \newcommand{\fieldsetSm}[2]{#1 \hspace{-0.48em} \lower{0.8ex}{\scriptscriptstyle{#2}} \;} $$
$$ \newcommand{\planeSm}[1]{\fieldsetSm{#1}{\planesymbol}} $$
<!-- Booleans -->
$$ \newcommand{\cupset}[2]{\; \mathop{#1 \hspace{-0.51em} \raise{0.24ex}{#2} \;}} $$
$$ \newcommand{\capset}[2]{\; \mathop{#1 \hspace{-0.51em} \raise{0.24ex}{#2} \;}} $$
$$ \newcommand{\minmaxCup}{\;\vee\;} $$
$$ \newcommand{\minmaxCap}{\;\wedge\;} $$
$$ \newcommand{\arbitraryCup}{\cupset{\vee} {\scriptstyle{\raise{ 0.4ex}{*}}}} $$
$$ \newcommand{\arbitraryCap}{\capset{\wedge}{\scriptstyle{\raise{-0.4ex}{*}}}} $$
$$ \newcommand{\distanceCup}{\cupset{\cup}{\scriptstyle{\circ}}} $$
$$ \newcommand{\distanceCap}{\capset{\cap}{\scriptstyle{\circ}}} $$
$$ \newcommand{\euclideanSymbol}{\hspace{-0.02em}\raise{0.1ex}{\scriptscriptstyle{+}}} $$
$$ \newcommand{\euclideanCup}{\cupset{\cup}{\euclideanSymbol}} $$
$$ \newcommand{\euclideanCap}{\capset{\cap}{\euclideanSymbol}} $$
$$ \newcommand{\chamferMinmaxCup}{\;\sqcup\;} $$
$$ \newcommand{\chamferMinmaxCap}{\;\sqcap\;} $$
$$ \newcommand{\chamferDistanceCup}{\cupset{\sqcup}{\scriptstyle{\circ}}} $$
$$ \newcommand{\chamferDistanceCap}{\capset{\sqcap}{\scriptstyle{\circ}}} $$
$$ \newcommand{\chamferEuclideanCup}{\cupset{\sqcup}{\euclideanSymbol}} $$
$$ \newcommand{\chamferEuclideanCap}{\capset{\sqcap}{\euclideanSymbol}} $$
</div>
<p><em>If the controls aren’t working on your device, click through to <a href="https://www.shadertoy.com/view/clV3Rz">ShaderToy</a></em></p>
<p>With <code class="language-plaintext highlighter-rouge">SDF</code> enabled and <code class="language-plaintext highlighter-rouge">offset</code> non-negative, the <em>boundary map</em> arrow always points to the boundary, via the distance intersection of two planes, \(\df{F} = \plane{A} \distanceCap \plane{B}\) . With <code class="language-plaintext highlighter-rouge">SDF</code> disabled, the points in a region opposite of the vertex, the <em>normal cone</em> of the intersection, fail to point at the boundary. The normal cone, shown in green, is the set of points closest to the sharp intersection. Similarly, with <code class="language-plaintext highlighter-rouge">SDF</code> enabled and negative <code class="language-plaintext highlighter-rouge">offset</code>, the boundary map of points in the normal cone of the intersection trace out the classic <em>swallowtail</em> failure mode of offsetting chains of curves with fillets.</p>
<p><a href="https://ornithologi.com/2015/09/06/swallow-tailed-kite-movements/"><img src="https://ofbirdsandb.files.wordpress.com/2015/09/stki.jpg" alt="Swallowtail bird" />
<em>A swallow with its tail</em>
</a></p>
<h2 id="definitions">Definitions</h2>
<p>Let’s nail down some definitions to at least a SIGGRAPH level of rigor. For nuanced definitions, see <a href="https://link.springer.com/article/10.1007/s10957-018-1414-2">Luo, Wang, and Lukens’s framing of SDFs using Variational Analysis</a>.</p>
<h3 id="fields">Fields</h3>
<p>Fields are functions mapping a smoothly curved space, usually \(\R^n\), to the affinely extended reals \(\overline\R \equiv \R \cup \{\pm\infty\}\). If you haven’t seen extended reals before, it turns out that you can do the hokey-pokey with analysis and simply define the ends of the real number line to be closed instead of open, even dividing (anything other than zero) by zero; feel free to resent your third grade teachers and find new brilliance in IEEE floating point representations.</p>
<h3 id="unit-gradient-fields">Unit Gradient Fields</h3>
<p>Unit Gradient Fields (UGFs) are simply fields with unit gradient magnitude, everywhere the gradient exists. Although we usually use them to represent shapes, there is no need for them to have any non-positive values, as adding a constant to a UGF doesn’t change its gradient.</p>
<h3 id="distance-fields">Distance Fields</h3>
<p>Distance fields (DFs) are defined by the difference of the unsigned distance to a set minus the unsigned distance to the set’s complement, noting that the distance to a set from its inside is zero. The piecewise definition is \(C^1\) continuous (where differentiable) across the set’s boundary. DFs are UGFs when defined by <em>proper</em> sets. (The two improper sets, the null set and the set of all points in a space, generate the distance fields \(+\infty\) and \(-\infty\), respectively.) When DFs have an interior, we will call them “signed” <em>SDFs</em>. (We avoid the term “UDF” due to its similarity to “UGF”.)</p>
<p>DFs contain more information about a shape than a UGF representing the same shape. For example, the sum of two DFs represents the <a href="https://www.ntop.com/resources/blog/interpolating-with-implicit-modeling/">local clearance between parts</a>. These properties derive from the key fact about DFs: their boundary map always points to their boundary.</p>
<h3 id="the-boundary-map">The Boundary Map</h3>
<p>The boundary map, represented by the black arrow in the visualization, is simply the map to the closest point on the surface of a set represented by a DF \(\df{F}\):</p>
\[\BoundaryMap{\df{F}} = -\df{F} \;\, \grad\df{F}\]
<p>Distance fields can be thought of as the magnitude of the boundary map vector fields, and any UGF that is a boundary map represents a distance field.</p>
<h3 id="plane-fields">Plane Fields</h3>
<p>Plane fields are a special case of SDFs to planar half-spaces with the special property that they are everywhere differentiable.</p>
<h3 id="notation">Notation</h3>
<p>In this series, we’ll use a secondary notation to remind ourselves of the properties of fields:</p>
<table>
<tbody>
<tr>
<td><strong>Plane fields</strong></td>
<td>\(\plane{P}\)</td>
</tr>
<tr>
<td><strong>Distance field</strong></td>
<td>\(\df{D}\)</td>
</tr>
<tr>
<td><strong>Unit gradient field</strong></td>
<td>\(\ugf{U}\)</td>
</tr>
<tr>
<td><strong>Unit gradient field at zero</strong></td>
<td>\(\augf{A}\)</td>
</tr>
</tbody>
</table>
<h3 id="approximate-ugfs">Approximate UGFs</h3>
<p>The latter, we’ll refer to as <em>approximate UGFs</em> (AUGFs). Any field with non-vanishing gradient can be converted to an AUGF via <em>Sampson normalization</em> (<a href="http://dx.doi.org/10.1016/0146-664X(82)90101-0">Sampson 1982</a>):</p>
\[\sampson{F} \equiv \frac{F}{\norm{\grad{F}}} \;.\]
<p>We will often generalize properties of planar intersections to behavior near the isosurface of AUGFs.</p>
<h2 id="families-of-booleans">Families of Booleans</h2>
<p>So far, we’ve seen minmax, distance-based, and, in the last post, chamfered Booleans that preserve UGFness. There are also many useful fast and reliable Boolean operations that produce results that are not UGFs.</p>
<iframe class="fullsize" frameborder="0" src="https://www.shadertoy.com/embed/dtVGRd?gui=false&t=10&paused=false&muted=false" allowfullscreen=""></iframe>
<p><em><a href="https://www.shadertoy.com/view/dtVGRd">(Direct link to Shadertoy if preview failing.)</a></em></p>
<p>We’re going to need some notation to keep the different flavors of Booleans straight. Let’s focus on the Union or \(\min\) operation, as the intersection can be defined as the complement of the union of the complement of the inputs:</p>
\[\max(A, B) = -\min(-A, -B) \;.\]
<h3 id="distance-preserving-boolean">Distance-Preserving Boolean</h3>
<p>First, nodding to Rvachev and logic functions, we can define the minmax Booleans \(\minmaxCup\) and \(\minmaxCap\) using \(\min\) and \(\max\). Similarly, we can define the DF-preserving Booleans, \(\distanceCup\) and \(\distanceCap\), which are defined piecewise across the boundary of the normal cone. Outside of the normal cone, the distance result is the same as the minimax Booleans, but inside it sees the distance to the curve of intersection.</p>
<h3 id="euclidean-blend">Euclidean Blend</h3>
<p>It’s worth comparing the DF blend to common implicits blends in the graphics community. <a href="https://mercury.sexy/hg_sdf/">Korndörfer</a> gives perhaps the most elegant, in which the entire remote quadrant of the intersection receives the blend instead of the normal cone, a subset of it:</p>
\[\ugf{A} \euclideanCup \ugf{B} \equiv \max\!\left(\ugf{A} \minmaxCup \ugf{B}, 0 \right) \;-\; \norm{\left(\min(\ugf{A}, 0),\strut\min(\ugf{B}, 0) \right)} \;,\]
<p>where \(\norm{\cdot}\) is the Euclidean norm of a vector of fields. We’ll use variants of the traditional union and intersections symbols for blended or rounded intersections.</p>
<h3 id="scaled-quilez-blend">Scaled Quilez Blend</h3>
<p><a href="https://iquilezles.org/articles/smin/">Quilez</a> provide several examples of “smooth minimum functions” that blend the entire discontinuity typically produced by \(\min\). With constant blend radius, they do not repeat the logic of \(\min\) and \(\max\), but by using an estimate of distance-to-curve for their intersection, we can produce a logic-preserving minimum. This radius variation works on Quilez’ polynomial and exponential \(\func{smin}\):</p>
\[\func{smin}\left(\ugf{A}\,, \ugf{B}\,, \abs{\ugf{A} \, \ugf{B } \; (1 - \grad{\ugf{A}} \,\cdot \grad{\ugf{B}})}\right) \;.\]
<p>The sum and difference of fields and the distance to intersections curves will be further explored in future posts.</p>
<h3 id="rvachev-blend-0">Rvachev Blend 0</h3>
<p><a href="https://www.cambridge.org/core/journals/acta-numerica/article/abs/semianalytic-geometry-with-rfunctions/3F5E061C35CA6A712BE338FE4AD1DB7B">Rvachev, as popularized by Shapiro</a> first identified and classified the concept of logic-preserving implicit functions, named <em>R-functions</em> after him. In this example, we’re showing \(\vee_0\) in Rvachev’s notation:</p>
\[\vee_0 \equiv \ugf{A} + \ugf{B} - \sqrt{\ugf{A}^2 + \ugf{B}^2} \;.\]
<p>Note that \(\vee_0\) is an AUGF, despite its remote field departing quickly from unit magnitude.</p>
<h3 id="consistent-notation">Consistent Notation</h3>
<p>For most applications not requiring UGFs, the Euclidean blend works well, so we won’t continue with Quilez or Rvachev blends in this series. We will get to chamfers in a future post (which use squared notation due to the extra edge), so let’s define a common set of notation for the family of R-function Booleans available in edge treatments.</p>
<table>
<tbody>
<tr>
<td><strong>Minmax</strong></td>
<td>\(\minmaxCup\)</td>
<td>\(\minmaxCap\)</td>
</tr>
<tr>
<td><strong>Distance-preserving Boolean</strong></td>
<td>\(\distanceCup\)</td>
<td>\(\distanceCap\)</td>
</tr>
<tr>
<td><strong>Euclidean blend (Korndörfer)</strong></td>
<td>\(\euclideanCup\)</td>
<td>\(\euclideanCap\)</td>
</tr>
<tr>
<td><strong>Chamfer (minmax intersections)</strong></td>
<td>\(\chamferMinmaxCup\)</td>
<td>\(\chamferMinmaxCap\)</td>
</tr>
<tr>
<td><strong>Chamfer (distance-preserving)</strong></td>
<td>\(\chamferDistanceCup\)</td>
<td>\(\chamferDistanceCap\)</td>
</tr>
<tr>
<td><strong>Chamfer (Euclidean blend)</strong></td>
<td>\(\chamferEuclideanCup\)</td>
<td>\(\chamferEuclideanCap\)</td>
</tr>
<tr>
<td><strong>Arbitrary (any of the above)</strong></td>
<td>\(\arbitraryCup\)</td>
<td>\(\arbitraryCap\)</td>
</tr>
</tbody>
</table>
<p>As a preview to future posts on edge treatments, see these two social media threads:</p>
<ul>
<li><a href="https://www.blakecourter.com/2022/06/22/constant-width-chamfer.html">Constant-Width Chamfer</a></li>
<li><a href="https://www.blakecourter.com/2022/06/25/edge-coordinate-system.html">Edge Coordinate System</a></li>
</ul>
<h2 id="connecting-the-dots">Connecting the Dots</h2>
<p><img src="https://64.media.tumblr.com/tumblr_lpeps6ji5C1r13x2bo1_500.jpg" alt="John Nash Stereotype" /></p>
<p><em>While I’m a fan of John Nash’s work, this portrayal never landed for me. That said, I did question my sanity working on this diagram.</em></p>
<p>Given a few different grades of fields and a set of operators, one might wonder if there’s any structure worth noting. For example, the distance-preserving Boolean maps DFs to DFs. Here’s my attempt to document the structure of the system, with a few operations to be defined in later posts:</p>
<p><img src="/assets/blog/UGFs/01 Shapes and Fields Legend.svg" alt="Shapes and Fields Diagram" width="45%" height="45%" />
<img src="/assets/blog/UGFs/01 Shapes and Fields Diagram.png" alt="Shapes and Fields Diagram" width="50%" height="50%" /></p>
<h2 id="a-summary-so-far">A Summary so Far</h2>
<p>DFs and UGFs to a shape can only differ in shapes’ normal cones that arise on non-smooth boundaries. In this post and the last, we focused on these sharp (edge-like) regions and offsets to help clarify that all fields with unit gradient magnitude are not DFs. There’s more fun to be had with edges and edge treatments, but perhaps in the next posts we’ll visit some of the tricks that work only with UGFs and some techniques for creating UGFs to new shapes.</p>
<p>Please keep the feedback coming!</p>Blake Courterbcourter@gmail.comMany readers of the last post requested a more formal definition of a UGF. Let’s look a bit more closely at the definition of an SDF and how it compares to UGFs and other useful fields in engineering applications. Some readers may find the visual concepts more intuitive than the nuances, so let’s get a feel for the territory first by examining the field at the intersection of two planes:Unit Gradient Fields: What do we mean by “offset”?2023-05-05T00:00:00+00:002023-05-05T00:00:00+00:00http://bcourter.github.io/2023/05/05/what-is-offset<p>For those of us who work in engineering and geometric modeling, “offset” is an everyday operation. We use it in 2D and 3D to produce curves and surfaces at constant distance from other curves and surfaces. With experience, we learn that offset can be failure-prone, especially with precise B-rep solids and meshes. <a href="https://www.blakecourter.com/2019/03/12/ntopology-implicits-basics.html">Implicit modeling</a>, in particular, the signed distance field (SDF) representation of shapes, offers robust offsetting, but again, with experience, we learn that the results aren’t always what we expect.</p>
<p>Take these three examples of an offset rectangle, created using three different “line joining” approaches that date back to the early days of 2D graphics and are built into your browser:</p>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="50 75 596 114" style="enable-background:new 0 0 646 249;" xml:space="preserve">
<style type="text/css">
.stroke0{fill:#CCB8B8;stroke:#331A1A;stroke-width:10;transition-duration: 0.6s;animation: expand-stroke 3s ease-in-out infinite alternate;}
.fill0{fill:#CCB8B8;stroke:none;pointer-events:none;}
.stroke1{fill:#B8CCB8;stroke:#1A331A;stroke-width:10;stroke-linejoin:round;transition-duration: 0.6s;animation: expand-stroke 3s ease-in-out 2s infinite alternate;}
.fill1{fill:#B8CCB8;stroke:none;pointer-events:none;}
.stroke2{fill:#B8B8CC;stroke:#1A1A33;stroke-width:10;stroke-linejoin:bevel;transition-duration: 0.6s;animation: expand-stroke 3s ease-in-out 4s infinite alternate;}
.fill2{fill:#B8B8CC;stroke:none;pointer-events:none;}
.stroke0:hover, .stroke1:hover, .stroke2:hover{
animation: expand-hover 2s ease-in-out infinite alternate;
}
@keyframes expand-stroke {
from {stroke-width:10;}
to {stroke-width:25;}
}
@keyframes expand-hover {
from {stroke-width:25;}
to {stroke-width:50;}
}
</style>
<g>
<rect x="102" y="102" class="stroke0" width="102" height="63" />
<rect x="102" y="102" class="fill0" width="102" height="63" />
</g>
<g>
<rect x="300" y="102" class="stroke1" width="102" height="63" />
<rect x="300" y="102" class="fill1" width="102" height="63" />
</g>
<g>
<rect x="492" y="102" class="stroke2" width="102" height="63" />
<rect x="492" y="102" class="fill2" width="102" height="63" />
</g>
</svg>
<!--more-->
<div hidden="">
$$ \newcommand{\R}{\mathbb{R}} $$
$$ \newcommand{\shape}[1]{\mathcal{#1}} $$
$$ \newcommand{\grad}{\boldsymbol{\nabla\!}} $$
$$ \newcommand{\BoundaryMap}[2][]{\vec{\mathbf{Q}}_{#2}^{#1}} $$
$$ \newcommand{\norm}[1]{\left\|#1\right\|} $$
$$ \newcommand{\abs}[1]{\left|#1\right|} $$
<!-- $$ \newcommand{\func}[1]{\; \mathop{\text{#1}}} $$ -->
$$ \newcommand{\func}[1]{\mathop{\rm #1}\nolimits} $$
$$ \newcommand{\DF}{\mathfrak{D\hspace{-0.2em}\scriptstyle{F}\,}} $$
$$ \newcommand{\Shape}{\boldsymbol{\Omega}} $$
$$ \newcommand{\twobody}[2]{\Xi_{#1}^{#2}} $$
$$ \newcommand{\inner}[2]{#1 \cdot #2} $$
$$ \newcommand{\wavysmile}{\raise{-0.2ex}{\smallsmile}} $$
$$ \newcommand{\wavyfrown}{\raise{ 0.2ex}{\smallfrown}} $$
$$ \newcommand{\wavy}{\wavysmile\!\wavyfrown\!\wavysmile\!\wavyfrown\!\wavysmile} $$
$$ \newcommand{\sampson}[1]{\hspace{-1.3em}
\style{display: inline-block; transform: translateY(-0.1em) rotate(90deg) scale(0.4, 0.3) }{\wavy}
\hspace{-1.4em} #1 \hspace{-1.3em}
\style{display: inline-block; transform: translateY(-0.1em) rotate(-90deg) scale(0.4, 0.3)}{\wavy}
\hspace{-1.4em}} $$
$$ \newcommand{\fieldset}[2]{#1 \hspace{-0.65em} \lower{0.8ex}{\scriptscriptstyle{#2}} \;} $$
$$ \newcommand{\planesymbol}{~ \style{display: inline-block; transform: scale(2.24, 0.66)}{\diamond}} $$
$$ \newcommand{\df}[1]{\fieldset{#1}{\leftrightarrow}} $$
$$ \newcommand{\ugf}[1]{\fieldset{#1}{-}} $$
<!-- $$ \newcommand{\ugf}[1]{\fieldset{#1}{\rule[0.5ex]{1em}{0.4pt}}} $$ -->
$$ \newcommand{\augf}[1]{\fieldset{#1}{\sim}} $$
$$ \newcommand{\plane}[1]{\fieldset{#1}{\planesymbol}} $$
$$ \newcommand{\fieldsetSm}[2]{#1 \hspace{-0.48em} \lower{0.8ex}{\scriptscriptstyle{#2}} \;} $$
$$ \newcommand{\planeSm}[1]{\fieldsetSm{#1}{\planesymbol}} $$
<!-- Booleans -->
$$ \newcommand{\cupset}[2]{\; \mathop{#1 \hspace{-0.51em} \raise{0.24ex}{#2} \;}} $$
$$ \newcommand{\capset}[2]{\; \mathop{#1 \hspace{-0.51em} \raise{0.24ex}{#2} \;}} $$
$$ \newcommand{\minmaxCup}{\;\vee\;} $$
$$ \newcommand{\minmaxCap}{\;\wedge\;} $$
$$ \newcommand{\arbitraryCup}{\cupset{\vee} {\scriptstyle{\raise{ 0.4ex}{*}}}} $$
$$ \newcommand{\arbitraryCap}{\capset{\wedge}{\scriptstyle{\raise{-0.4ex}{*}}}} $$
$$ \newcommand{\distanceCup}{\cupset{\cup}{\scriptstyle{\circ}}} $$
$$ \newcommand{\distanceCap}{\capset{\cap}{\scriptstyle{\circ}}} $$
$$ \newcommand{\euclideanSymbol}{\hspace{-0.02em}\raise{0.1ex}{\scriptscriptstyle{+}}} $$
$$ \newcommand{\euclideanCup}{\cupset{\cup}{\euclideanSymbol}} $$
$$ \newcommand{\euclideanCap}{\capset{\cap}{\euclideanSymbol}} $$
$$ \newcommand{\chamferMinmaxCup}{\;\sqcup\;} $$
$$ \newcommand{\chamferMinmaxCap}{\;\sqcap\;} $$
$$ \newcommand{\chamferDistanceCup}{\cupset{\sqcup}{\scriptstyle{\circ}}} $$
$$ \newcommand{\chamferDistanceCap}{\capset{\sqcap}{\scriptstyle{\circ}}} $$
$$ \newcommand{\chamferEuclideanCup}{\cupset{\sqcup}{\euclideanSymbol}} $$
$$ \newcommand{\chamferEuclideanCap}{\capset{\sqcap}{\euclideanSymbol}} $$
</div>
<p>The red rectangle on the left uses extensions of the rectangle’s edges. This approach is similar to what we expect from B-rep and most mesh modelers, where extra faces are only added when needed. One might not notice that the offset vertices are actually a factor of \(\sqrt{2}\) farther from the vertex than the sides. In engineering applications, we often prefer the topological simplicity of such <em>naturally extended</em> intersections to geometric correctness.</p>
<p>In the middle, the green rectangle offsets geometrically, with a rounded corner the exact Euclidean distance to the vertex. When modeling with SDFs, we expect these geometric offsets, but the result may surprise engineers who prefer the simplicity of naturally extended corners.</p>
<p>As a third example, although not normally considered a common option during offset in engineering applications, offset can produce a chamfered result. Are there other possibly legitimate options for how one might want to treat a corner?</p>
<h2 id="offsets-and-sdfs">Offsets and SDFs</h2>
<p>When modeling with fields, we often “offset” a field \(F\) as an alternative to offsetting the boundary of the shape \(\shape{F}\) it represents.</p>
<p>(In our notation, one can convert a shape to a distance field via \(\df{F} = \DF \shape{F}\) or extract a shape from the non-positive region of a field via \(\shape{F} = \Shape F\). We also annotate planes \(\plane{P}\), distance fields \(\df{D}\), and unit gradient fields \(\ugf{G}\) to distinguish them from general fields \(F\). The next post will cover these topics.)</p>
<p>We define the <em>offset of the field</em> \(F\) <em>by constant distance</em> \(\lambda\):</p>
\[\func{Offset}_{\lambda}(F) \equiv F - \lambda \;,\]
<p>so the distance the zero isosurface moves depends on the gradient of \(F\). One can think of the offset behavior as baked into the field’s geometry itself, not something one can do to the geometry, as with boundary modeling. If we’d like different edge treatments on different edges, somehow we need to produce a fields with the proper behavior encoded in them ahead of time.</p>
<p>For example:</p>
<table>
<tbody>
<tr>
<td><img src="/assets/blog/UGFs/01 Square UGF Intro Nominal.png" alt="UGF example nominal" /></td>
<td><img src="/assets/blog/UGFs/01 Square UGF Intro Offset.png" alt="UGF example offset" /></td>
</tr>
</tbody>
</table>
<p>Clearly, only the top right corner represents an SDF. In this example, the gradient, where defined, always has unit magnitude, as observed by the 1:1 slope in the field’s <em>epigraph</em>, \(\planeSm{z} - F(\planeSm{x}, \planeSm{y})\):</p>
<div class="extensions extensions--video"> <iframe title="Intro UGF 3D" frameborder="0" allowfullscreen="" mozallowfullscreen="true" webkitallowfullscreen="true" allow="autoplay; fullscreen; xr-spatial-tracking" xr-spatial-tracking="" execution-while-out-of-viewport="" execution-while-not-rendered="" web-share="" src="https://sketchfab.com/models/691afa46a83c4c25a95b844c5bb1e2ee/embed"> </iframe> </div>
<p>A similar situation presents itself in 3D. How the edges of the cube propagate when this spherecube is rounded is predetermined by the field surrounding the cube, yet it’s not visible on the nominal geometry:</p>
<table>
<tbody>
<tr>
<td><img src="/assets/blog/UGFs/01 SphereCube Round Sharp.png" alt="Spherecube sharp" /></td>
<td><img src="/assets/blog/UGFs/01 SphereCube Round Round.png" alt="Spherecube round" /></td>
<td><img src="/assets/blog/UGFs/01 SphereCube Round Chamfer.png" alt="Spherecube chamfer" /></td>
</tr>
</tbody>
</table>
<p>The left option is most common with B-rep modelers when rounding an edge, and some provide the option to round the blend, as seen in the center. UGF modeling, however, provides a unique ability to add more control, as expressed with the chamfered alternative on the right.</p>
<h2 id="introducing-unit-gradient-fields-ugfs">Introducing Unit Gradient Fields (UGFs)</h2>
<p>UGFs, fields with unit gradient magnitude (where the gradient is defined), offer a generalization over SDFs with the appropriate amount of flexibility for many engineering applications. They also overcome the greatest weakness of SDFs: closure.</p>
<p>The offset of a distance field is not, in general, a distance field. Starting with a SDF, if one offsets a convex edge inward or a concave edge outward, the result is a field that no longer represents the distance to the isosurface. (We’ll dedicate a post on this topic soon, but if you wanted an exercise, this would be it.) Similarly, <a href="https://www.iquilezles.org/www/articles/interiordistance/interiordistance.htm" target="_blank">as observed by Inigo Quilez</a>, Booleans, as produced by \(\min\) and \(\max\), do not produce distances. Most other common operations, including blending, smoothing, interpolating, variable offsetting, warping, and even scaling all can introduce artifacts that cause subsequent operations to behave unpredictably. Finally, we can also construct UGFs from other UGFs in ways that are not possible with SDFs.</p>
<p>Over the past year or so, I’ve been gathering my implicit modeling practices into a manuscript unified by organizing principle of UGFs and how they relate to SDFs and their relatives. Now that the book has achieved critical mass, I thought I’d start to introduce UGFs thought a blog series. With the release of <a href="https://ntop.com" target="_blank">nTop 4.0</a> and its new spherecube and UGF themed logo, as well as in anticipation of conversations at <a href="https://cdfam.com/" target="_blank">CDFAM 23</a>*, it’s time to start talking about the project!</p>
<table>
<tbody>
<tr>
<td><img src="/assets/Spacer-150.png" alt="" /></td>
<td><img src="/assets/Spacer-150.png" alt="" /></td>
<td><a href="https://ntop.com" target="_blank"><img src="/assets/blog/UGFs/nTop.jpg" alt="nTop Logo" height="100%" width="100%" /></a></td>
<td><img src="/assets/Spacer-150.png" alt="" /></td>
<td><a href="https://cdfam.com/" target="_blank"><img src="/assets/blog/UGFs/cdfam.png" alt="CDFAM Logo" height="30%" width="30%" /></a></td>
<td><img src="/assets/Spacer-150.png" alt="" /></td>
</tr>
</tbody>
</table>
<p>* <font size="2"> Note: while the nTop logo, as most of the images on this page, was designed in nTop, the CDFAM logo appears to have been generated using machine learning. </font></p>
<h2 id="example-of-the-power-of-ugfs">Example of the power of UGFs</h2>
<p>Let’s take a look at a less theoretical example, where we want to control different edges with different edge treatments. Here, we’re also using UGFs to produce drafted faces and a lip feature, as common in molding applications.</p>
<table>
<tbody>
<tr>
<td><img src="/assets/blog/UGFs/01 Drafted Split Sharp Sharp.png" alt="Drafted all sharp" /></td>
<td><img src="/assets/blog/UGFs/01 Drafted Split Round Sharp.png" alt="Drafted half and half" /></td>
<td><img src="/assets/blog/UGFs/01 Drafted Split Round Round.png" alt="Drafted all round" /></td>
</tr>
</tbody>
</table>
<p>Each Boolean operation offers an opportunity to choose what kind of edge treatment is appropriate, establishing downstream design intent. When modeling with UGFs, it is natural to encode such design intent sooner than with explicit modeling, enabling downstream operations to behave predictably and be automated.</p>
<p>What makes UGFs special? Couldn’t we always do these tricks? Yes, but without a resolute focus on maintaining unit gradient magnitude, the results would not produce the constant offsets, circular rounds, and predictable results we associate with engineering software.</p>
<h2 id="ugf-blog-series">UGF Blog series</h2>
<p>So stay tuned through June as I walk you through more explanation of the above and through diverse application such as:</p>
<ul>
<li>How to use UGFs to condition fields for downstream use when producing lattices, edge treatments, and thin-walled geometry.</li>
<li>Parameterizations possible from UGFs, such as the two-body field and the orthogonal sum and difference fields.</li>
<li>Everything you want to know about implicit edge treatments, including rolling-ball blend and chamfer.</li>
<li>Distance-preserving ramp and other transformations.</li>
<li>Curve-driven and isocline draft.</li>
</ul>
<p>And any discussion topics that I hope come up in conversations along the way!</p>
<h2 id="summary">Summary</h2>
<p>So to summarize: UGFs are like SDFs but are more useful, enabling a more expressive language for implicit modeling in engineering and closure in modeling with distance fields. By focusing on UGFs instead of SDFs, we can put implicits to work in more engineering applications.</p>
<p><em>Closing image: multiscale, spatially-varying FDM/FFF infill with constant weld offsets:</em></p>
<p><img src="/assets/blog/UGFs/UGF-Wheel.svg" alt="FDM Wheel" /></p>
<p><a href="https://docs.google.com/forms/d/e/1FAIpQLSc7ODKkQD2kd8LXfOm2oLpm4oX-CWgO6g4Hz_fSaMZh3sm75Q/viewform?usp=sf_link" target="_blank">Sign up for major updates on the UGF manuscript</a></p>Blake Courterbcourter@gmail.comFor those of us who work in engineering and geometric modeling, “offset” is an everyday operation. We use it in 2D and 3D to produce curves and surfaces at constant distance from other curves and surfaces. With experience, we learn that offset can be failure-prone, especially with precise B-rep solids and meshes. Implicit modeling, in particular, the signed distance field (SDF) representation of shapes, offers robust offsetting, but again, with experience, we learn that the results aren’t always what we expect. Take these three examples of an offset rectangle, created using three different “line joining” approaches that date back to the early days of 2D graphics and are built into your browser:Hyperbolic CAD for High-Performance Engineering2023-04-01T00:00:00+00:002023-04-01T00:00:00+00:00http://bcourter.github.io/2023/04/01/hyperbolic-cad<h2 id="1-april-2023-fiction">1 April 2023 (Fiction)</h2>
<p>As the cost of fabricating high-fidelity, quantum-collapsed geometry becomes increasingly prevalent, as an industry, we’re forced to confront the following challenge: where are we going to put all of our crap? At <a href="https://www.linkedin.com/company/qe3d/" target="_blank">QE3D</a>, we’re hard at work to collapse wave functions in our commitment to enable more engineering design space.</p>
<div><div class="extensions extensions--video">
<iframe src="https://www.youtube.com/embed/CNd1rZMOKO8?rel=0&showinfo=0" frameborder="0" scrolling="no" allowfullscreen=""></iframe>
</div>
</div>
<p>You may wonder: how does the superposition of quantum entanglement and machine learning scintillate more room for our everyday carry? Indeed, our technology achieves for consumer products, implantable electronics, wearable devices, and sub-dermal surveillance exactly the same advantages parachute pants achieved for break dancers. With the supremacy of the mesoscale fully realized via TPMS, spinodal decomposition, and mixed topology lattices, from what extra space might we draw additional engineering acumen?</p>
<p>At QE3D, we manifest our quantum technology through three regimes for AI-driven, dimensionality enhanced, spatial domains.</p>
<p><!--more--></p>
<h3 id="the-geometric-fourth-dimension">The geometric fourth dimension</h3>
<p><a href="https://twitter.com/KangarooPhysics?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor" target="_blank">Daniel Piker</a> introduced me to the concept of transforming otherwise Euclidean three-dimensional objects via stereographic projection onto the Riemann hypersphere. Astonished by the myopia of the <a href="https://threejs.org/" target="_blank">three.js</a> community, I launched <a href="https://github.com/bcourter/four.js" target="_blank">four.js</a>, which has mostly enjoyed success in the dimension orthogonal to this reality.</p>
<div class="extensions extensions--video">
<iframe src="https://www.blakecourter.com/homepage/Four/" frameborder="0" scrolling="no" allowfullscreen=""></iframe>
</div>
<h3 id="exploiting-the-hausdorff-dimension-of-fractal-boundaries">Exploiting the Hausdorff dimension of fractal boundaries</h3>
<p>Throwing differential geometry out the window, we apply variational analysis to fractal boundaries with fractional Hausdorff dimension, creating a countable class of nooks and crannies. We can apply Stokes equations using Monte Carlo techniques, which speak the language of quantum. This approach is particularly useful when combined with topology optimization, as realized in this lovely tufted furniture collection by <a href="https://www.shadertoy.com/user/EvilRyu" target="_blank">EvilRyu</a></p>
<div class="extensions extensions--video">
<iframe frameborder="0" src="https://www.shadertoy.com/embed/MdXSWn?gui=true&t=10&paused=true&muted=false" allowfullscreen=""></iframe>
</div>
<h3 id="conformal-maps-into-hyperbolic-embeddings">Conformal maps into hyperbolic embeddings</h3>
<div hidden="">
$$ \newcommand{\R}{\mathbb{R}} $$
$$ \newcommand{\shape}[1]{\mathcal{#1}} $$
$$ \newcommand{\grad}{\boldsymbol{\nabla\!}} $$
$$ \newcommand{\BoundaryMap}[2][]{\vec{\mathbf{Q}}_{#2}^{#1}} $$
$$ \newcommand{\norm}[1]{\left\|#1\right\|} $$
$$ \newcommand{\abs}[1]{\left|#1\right|} $$
<!-- $$ \newcommand{\func}[1]{\; \mathop{\text{#1}}} $$ -->
$$ \newcommand{\func}[1]{\mathop{\rm #1}\nolimits} $$
$$ \newcommand{\DF}{\mathfrak{D\hspace{-0.2em}\scriptstyle{F}\,}} $$
$$ \newcommand{\Shape}{\boldsymbol{\Omega}} $$
$$ \newcommand{\twobody}[2]{\Xi_{#1}^{#2}} $$
$$ \newcommand{\inner}[2]{#1 \cdot #2} $$
$$ \newcommand{\wavysmile}{\raise{-0.2ex}{\smallsmile}} $$
$$ \newcommand{\wavyfrown}{\raise{ 0.2ex}{\smallfrown}} $$
$$ \newcommand{\wavy}{\wavysmile\!\wavyfrown\!\wavysmile\!\wavyfrown\!\wavysmile} $$
$$ \newcommand{\sampson}[1]{\hspace{-1.3em}
\style{display: inline-block; transform: translateY(-0.1em) rotate(90deg) scale(0.4, 0.3) }{\wavy}
\hspace{-1.4em} #1 \hspace{-1.3em}
\style{display: inline-block; transform: translateY(-0.1em) rotate(-90deg) scale(0.4, 0.3)}{\wavy}
\hspace{-1.4em}} $$
$$ \newcommand{\fieldset}[2]{#1 \hspace{-0.65em} \lower{0.8ex}{\scriptscriptstyle{#2}} \;} $$
$$ \newcommand{\planesymbol}{~ \style{display: inline-block; transform: scale(2.24, 0.66)}{\diamond}} $$
$$ \newcommand{\df}[1]{\fieldset{#1}{\leftrightarrow}} $$
$$ \newcommand{\ugf}[1]{\fieldset{#1}{-}} $$
<!-- $$ \newcommand{\ugf}[1]{\fieldset{#1}{\rule[0.5ex]{1em}{0.4pt}}} $$ -->
$$ \newcommand{\augf}[1]{\fieldset{#1}{\sim}} $$
$$ \newcommand{\plane}[1]{\fieldset{#1}{\planesymbol}} $$
$$ \newcommand{\fieldsetSm}[2]{#1 \hspace{-0.48em} \lower{0.8ex}{\scriptscriptstyle{#2}} \;} $$
$$ \newcommand{\planeSm}[1]{\fieldsetSm{#1}{\planesymbol}} $$
<!-- Booleans -->
$$ \newcommand{\cupset}[2]{\; \mathop{#1 \hspace{-0.51em} \raise{0.24ex}{#2} \;}} $$
$$ \newcommand{\capset}[2]{\; \mathop{#1 \hspace{-0.51em} \raise{0.24ex}{#2} \;}} $$
$$ \newcommand{\minmaxCup}{\;\vee\;} $$
$$ \newcommand{\minmaxCap}{\;\wedge\;} $$
$$ \newcommand{\arbitraryCup}{\cupset{\vee} {\scriptstyle{\raise{ 0.4ex}{*}}}} $$
$$ \newcommand{\arbitraryCap}{\capset{\wedge}{\scriptstyle{\raise{-0.4ex}{*}}}} $$
$$ \newcommand{\distanceCup}{\cupset{\cup}{\scriptstyle{\circ}}} $$
$$ \newcommand{\distanceCap}{\capset{\cap}{\scriptstyle{\circ}}} $$
$$ \newcommand{\euclideanSymbol}{\hspace{-0.02em}\raise{0.1ex}{\scriptscriptstyle{+}}} $$
$$ \newcommand{\euclideanCup}{\cupset{\cup}{\euclideanSymbol}} $$
$$ \newcommand{\euclideanCap}{\capset{\cap}{\euclideanSymbol}} $$
$$ \newcommand{\chamferMinmaxCup}{\;\sqcup\;} $$
$$ \newcommand{\chamferMinmaxCap}{\;\sqcap\;} $$
$$ \newcommand{\chamferDistanceCup}{\cupset{\sqcup}{\scriptstyle{\circ}}} $$
$$ \newcommand{\chamferDistanceCap}{\capset{\sqcap}{\scriptstyle{\circ}}} $$
$$ \newcommand{\chamferEuclideanCup}{\cupset{\sqcup}{\euclideanSymbol}} $$
$$ \newcommand{\chamferEuclideanCap}{\capset{\sqcap}{\euclideanSymbol}} $$
</div>
<p>Recall that in a Riemannian manifold, which in infinitely differentiable, the curvature at any point maybe positive negative, or hyperbolic. As we increase in dimension, the hyperbolic case becomes more prevalent. This trend offers the opportunity to put that extra space to work! On a hyperbolic point of a surface, for example, a circle drawn around that point has a larger circumference that the same radius circle on a flat (Euclidean) surface, which is in turn larger than a circle of the same radius in spherical space. That larger circumference gives us more space to place objects, and the same is even more true as you increase dimension.</p>
<p>For example, consider the circles on this hyperbolic surface from <a href="https://www.cs.cmu.edu/~kmcrane/" target="_blank">Keenan Crane</a>’s <a href="https://www.cs.cmu.edu/~kmcrane/Projects/DDG/" target="_blank">course on discrete differential geometry</a>.</p>
<p><img src="https://www.cs.cmu.edu/~kmcrane/Projects/DDG/figure6.svg" alt="Hyperbolic Surface" /></p>
<p>In any number of dimensions, we can use the sum and difference fields of two distance fields \(\df{A}\) and \(\df{B}\):</p>
\[\df{A}+\df{B} \;,\]
<p>and:</p>
\[\df{A}-\df{B} \;,\]
<p>to create conformal maps between any two sets represented by \(\df{A}\) and \(\df{B}\), such as the conformal map between this square and circle:</p>
<p><img src="\assets\add-subtract.png" alt="Two body field" /></p>
<h3 id="conclusion-confusion">Conclusion? Confusion!</h3>
<p>If you’ve been working in boring old 2D or 3D CAD in Euclidean spaces, you’re probably leaving a lot of performance on the table. At <a href="https://www.linkedin.com/company/qe3d/" target="_blank">QE3D</a>, our software and slicing stack deconvolves bloated designs directly into high-dimensional, fractional-dimensional, and hyperbolically curved finite matter arrays. <a href="https://forms.gle/P6RoBKfMviBTnSXQ9" target="_blank">Join our wait list</a> today!</p>Blake Courterbcourter@gmail.com1 April 2023 (Fiction) As the cost of fabricating high-fidelity, quantum-collapsed geometry becomes increasingly prevalent, as an industry, we’re forced to confront the following challenge: where are we going to put all of our crap? At QE3D, we’re hard at work to collapse wave functions in our commitment to enable more engineering design space. You may wonder: how does the superposition of quantum entanglement and machine learning scintillate more room for our everyday carry? Indeed, our technology achieves for consumer products, implantable electronics, wearable devices, and sub-dermal surveillance exactly the same advantages parachute pants achieved for break dancers. With the supremacy of the mesoscale fully realized via TPMS, spinodal decomposition, and mixed topology lattices, from what extra space might we draw additional engineering acumen? At QE3D, we manifest our quantum technology through three regimes for AI-driven, dimensionality enhanced, spatial domains.Case Study: Hyperbolic multiscale lattices for the entangled lifestyle2023-04-01T00:00:00+00:002023-04-01T00:00:00+00:00http://bcourter.github.io/2023/04/01/hyperbolic-case-study<h2 id="1-april-2023-fiction">1 April 2023 (Fiction)</h2>
<p>As <a href="/2023/04/01/hyperbolic-cad.html" target="_blank">mentioned yesterday</a>, hyperbolic space is more spatially dense than Euclidean space, and therefore offers opportunities for higher performance and fidelity in engineering applications. In this case study, we’ll examine how to prepare ordinary Euclidean CAD and mesh geometry for embedding in hyperbolic space and manufacture in <a href="https://www.linkedin.com/company/qe3d/" target="_blank">QE3D</a>’s quantum entanglement production system.</p>
<h3 id="triangles-in-hyperbolic-space">Triangles in hyperbolic space</h3>
<p>The key unit in any structural design, including beam lattices, is a triangle. In Euclidean space, the sum of the angles of set of triangles around a vertex must total 360°. In hyperbolic space, we can increase that total angle to any number we want, even ∞!</p>
<p><img src="\assets\blog\Hyperbolic-Tessellation\Triangles.svg" alt="Surface curvature" /></p>
<p><!--more--></p>
<p>In CAD, that means taking a ordinary triangular structure and deforming it into a triangle a concave arc for at least once side. For a uniform tessellation like this example, we need that angle to divide 360°. The unit cell below will be reflected, so we convert it from 45° to 36° so we can fit five instead of four around a vertex.</p>
<p><img src="\assets\blog\Hyperbolic-Tessellation\Convert-Hyperbolic.png" alt="Conversion to hyperbolic triangle" /></p>
<h3 id="the-first-law-of-hyperbolic-statics">The first law of hyperbolic statics</h3>
<p>As a Euclidean engineer, you might be concerned that our structural elements are bent, and therefore may buckle under compression. Indeed, such freedom for failure exists in Euclidean space. However, recall that in conformal models of hyperbolic geometry, lines and arcs are unified as <em>circlines</em>, where lines are simply circles with infinite radius, and therefore also include the point at infinity, which we will gleefully add to our domain. (A side benefit of keeping infinity around is that we may divide by zero via <a href="https://en.wikipedia.org/wiki/Alexandroff_extension" target="_blank">Alexandrov compactification</a>.)</p>
<p>Recall also that in our hyperbolic model, there are an infinite number of lines parallel to a given line at a point. Consider a force on a point in a hyperbolic plane: an opposing force may be provided in any line parallel to the original force. The implication is that any beam, ever curved ones, are completely rigid. For example, this Poincaré disc, made from our unit cell above, is completely rigid and undeformable:</p>
<p><img src="\assets\blog\Hyperbolic-Tessellation\Poincare.svg" alt="Poincare" /></p>
<h3 id="conformal-map-to-any-shape">Conformal map to any shape</h3>
<p>This famous stiffness of conformal geometry creates a strong connection between any structure’s tessellation and the shape into which it’s formed, as guaranteed by the <a href="https://en.wikipedia.org/wiki/Riemann_mapping_theorem" target="_blank">Riemann mapping theorem</a> and realized through <a href="https://en.wikipedia.org/wiki/Schwarz%E2%80%93Christoffel_mapping" target="_blank">Schawrz-Christoffel mappings</a>. For example, this filter for a harmonic compressor was fabricated by one of our quantum supremacy pick-and-place machines:</p>
<p><img src="\assets\blog\Hyperbolic-Tessellation\Heart-Anim.gif" alt="Animated heart" /></p>
<p>Any genus topology will do. for example, we can remap the disc into a strip:</p>
<p><img src="\assets\blog\Hyperbolic-Tessellation\Band.png" alt="Strip" /></p>
<p>To be clear: to make linearized models like this strip, you don’t need fancy manufacturing such as what we develop at <a href="https://www.linkedin.com/company/qe3d/" target="_blank">QE3D</a>. Conventional progressive die and roll forming technology may suffice, such as these die rollers for an Imipolex G line:</p>
<div class="extensions extensions--video">
<iframe src="https://www.youtube.com/embed/-OWaaYw5x-A" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen=""></iframe>
</div>
<h3 id="increasing-the-dimensionality">Increasing the dimensionality</h3>
<p>We can continue remapping, for example, transforming the strip into an annulus:</p>
<p><img src="\assets\blog\Hyperbolic-Tessellation\Annulus.png" alt="Annulus" /></p>
<p>In 2006, <a href="https://en.wikipedia.org/wiki/Grigori_Perelman" target="_blank">Grigori Perelman</a> proved that we can extend this approach to any number of dimensions. For example this innocuous-appearing tiara includes the Luneburg lens for a 5G transcoding antenna.</p>
<p><img src="\assets\blog\Hyperbolic-Tessellation\Tiara.jpg" alt="Annulus" /></p>
<h3 id="summary-and-conclusions">Summary and conclusions</h3>
<p>With hyperbolic embedding, any amount of structure may be packed in to any volume of hyperbolic space, if sufficiently curved. Similarly, complex engineering geometry, such as the traces of circuit boards, vasculature, and sheet metal may also be packed into such spaces. The dawn of entanglement fabrication from QE3D motivates the need for a new generation of hyperbolic engineering software that anticipates the challenges of the quantum manufacturing industry.</p>
<p><a href="https://forms.gle/P6RoBKfMviBTnSXQ9" target="_blank">Sign up</a> to learn more, or try our embedded beta:</p>
<div class="extensions extensions--video">
<iframe src="https://www.blakecourter.com/homepage/Poincare-WebGL/" frameborder="0" scrolling="no" allowfullscreen=""></iframe>
</div>Blake Courterbcourter@gmail.com1 April 2023 (Fiction) As mentioned yesterday, hyperbolic space is more spatially dense than Euclidean space, and therefore offers opportunities for higher performance and fidelity in engineering applications. In this case study, we’ll examine how to prepare ordinary Euclidean CAD and mesh geometry for embedding in hyperbolic space and manufacture in QE3D’s quantum entanglement production system. Triangles in hyperbolic space The key unit in any structural design, including beam lattices, is a triangle. In Euclidean space, the sum of the angles of set of triangles around a vertex must total 360°. In hyperbolic space, we can increase that total angle to any number we want, even ∞!Knowing versus experiencing math2023-03-29T00:00:00+00:002023-03-29T00:00:00+00:00http://bcourter.github.io/2023/03/29/knowing-math<p>On the <a href="https://discord.gg/Bk5FZ7g4sv" target="_blank">Geometric Processing Worldwide</a> Discord server, a frequent participant was lamenting the challenge of absorbing all the great work going on in computational geometry. It caused me to consider my own challenges with learning math.</p>
<p>For a long time I wanted to know math. I thought that I could learn what was out there but by glossing over the text and seeing the ideas, maintaining some sort of mental index to the math I might someday need to use. I would assume that the author’s introductory instructions to do the exercises didn’t apply to me. I usually only made it a few chapters into such texts.</p>
<p><!--more--></p>
<p>What changed it for me was <a href="https://www.usfca.edu/faculty/tristan-needham" target="_blank">Tristan Needham</a>’s <a href="https://www.amazon.com/gp/product/0198534469/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=0198534469&linkCode=as2&tag=visualcomplexana&linkId=5a33a723c536b28ce25c6100ce67f927" target="_blank"><em>Visual Complex Analysis</em></a>. I was right with him through the chapter on non-Euclidean geometry, at which point I was inspired to write a hyperbolic geometry kernel as an art project. (There’s more room to put stuff in hyperbolic space, so there are obvious engineering applications e.g. to make smaller mobile phones.)</p>
<p>In the process of representing circlines (circles that can have infinite radius) in hyperbolic space, I started with simple constructions, but the approach seemed clumsy and inelegant. Empowered by the text, I was able to just absorb enough of <a href="http://www.math.ubc.ca/~cass/research/pdf/Geometry.pdf" target="_blank">some notes by Casselman</a> to directly transform the circlines by conjugating with Möbius transformations, all in matrix representation. Although I had previously struggled with the abstractions of group theory, I could now appreciate this deeper pattern in algebra.</p>
<p>The first app based off the kernel with a Poincaré disc viewer hooked up to a joystick that I took to lowbrow art events, Burning Man, etc. People loved not only the art, but also learning about the extra motions of hyperbolic space. <a href="https://github.com/bcourter/Poincare-Kaleidoscope" target="_blank">The desktop version is here.</a> I later made a web version that works differently. It needs a new backend for image upload and has some other glitches, but <a href="https://www.blakecourter.com/homepage/Poincare-WebGL/" target="_blank">here</a>.</p>
<div class="extensions extensions--video">
<iframe src="https://www.blakecourter.com/homepage/Poincare-WebGL/" frameborder="0" scrolling="no" allowfullscreen=""></iframe>
</div>
<p>Through these projects, I finally realized what the authors meant about math being best experienced, instead of just known. This journey empowered me to pursue new approaches in implicit modeling where, despite continuing my math education, I appear to have a list of questions that grows longer every time I try to write down and document something that I think I know. Perhaps doing the exercises in those textbooks would have provided similar experiences.</p>
<p>In computational geometry today, there appears to be a trend of putting cool number fields on explicit geometry and solving for lovely and useful properties, mostly on the surface. Cool stuff, but math-heavy. There are many other techniques that have created pockets of interest in the past, such as level sets, subdivision surfaces, and even solid modeling itself, all of which seem to have mathematical barriers to entry. Academic circles often appear to reinforce variations on particularly beautiful or useful constructs like these, but you have to work to get there. If you are pursuing an academic career, you likely have the support of your institution to ramp up into such territory, but I have found it difficult to navigate independently. Fortunately, the community appears to offer plenty of on-ramps, such as <a href="https://github.com/alecjacobson/geometry-processing-csc2520" target="_blank">Alec Jacobson’s</a> and <a href="https://www.cs.cmu.edu/~kmcrane/Projects/DDG/" target="_blank">Keenan Crane’s</a>.</p>
<p>If there is any one piece of advice I can offer, it is to be intentional with your curiosity. If you find yourself becoming interested in a problem, enable yourself to pursue it with reasonable boundaries. Stop and smell the flowers when they appear. Don’t worry about where things will lead. Also, don’t confuse commercial activity with art or educational experiments. In the former, the customer’s voice and deployment should dominate priorities, but in the latter you have complete creative authority, and time is on your side.</p>
<p>Meanwhile, I’m thrilled to be working through Needham’s <a href="https://www.vdgf.space/" target="_blank">visual approach to differential geometry</a>, and look forward to someday finishing <em>Visual Complex Analysis</em>.</p>Blake Courterbcourter@gmail.comOn the Geometric Processing Worldwide Discord server, a frequent participant was lamenting the challenge of absorbing all the great work going on in computational geometry. It caused me to consider my own challenges with learning math. For a long time I wanted to know math. I thought that I could learn what was out there but by glossing over the text and seeing the ideas, maintaining some sort of mental index to the math I might someday need to use. I would assume that the author’s introductory instructions to do the exercises didn’t apply to me. I usually only made it a few chapters into such texts.Discrete non-Euclidean geometry for kids via trivial arithmetic2023-03-11T00:00:00+00:002023-03-11T00:00:00+00:00http://bcourter.github.io/2023/03/11/non-euclidean-arithmetic<p>My daughter, “X”, who just turned five, has been enjoying adding and subtracting small whole numbers in her head. She is just starting to write, so we made a little table for her to practice. Here she is adding:</p>
<p><img src="\assets\blog\X-Math-Tables\0.jpg" alt="X addition table" /></p>
<p><!--more--></p>
<p>When she finished, we went into <a href="https://www.ntopology.com">nTopology</a> and plotted the sum field, reflecting around the origin. Looking at it this way, we can think of the sum as adding the distances to two infinite lines, as defined by the values of our rows and columns. We call this sum field a kind of <em>norm field</em>.</p>
<p><img src="\assets\blog\X-Math-Tables\sum.png" alt="nTop addition field" /></p>
<p>On the other hand, we can place a pawn on our zero and count as it walks down and right in the table. Somehow, the table always knows exactly how many steps the pawn takes. We can interpret this board as a <em>distance field</em> to the origin.</p>
<p><img src="\assets\blog\X-Math-Tables\1.jpg" alt="Addition as a metric" /></p>
<p>What happens if we repeat the same process with subtraction? Notice how the sum and difference contour lines and slopes are perpendicular at every point.</p>
<p><img src="\assets\blog\X-Math-Tables\2.jpg" alt="Addition and subtraction fields" /></p>
<p>In nTopology, we can also construct <em>epigraphs</em> of our sum and difference fields:</p>
<p><img src="\assets\blog\X-Math-Tables\sum-epi.png" alt="nTop sum field and epigraph" /></p>
<p><img src="\assets\blog\X-Math-Tables\diff-epi.png" alt="nTop difference field and epigraph" /></p>
<p>Let’s fabricate those epigraphs from magnetic tiles, relating positive and negative Gaussian curvature to the convexity and concavity of curves. Positive curvature comes from the sum field, and negative curvature from the subtraction field. Ball-like ellipses and horse-saddle hyperbolas are easily found on the surface geometry couch, especially if it has a cover like ours.</p>
<p><img src="\assets\blog\X-Math-Tables\3.jpg" alt="Magnetic tile assemblies of the epigraphs" /></p>
<p>For the next discussion, consider also assembling four squares. We can compare those four squares to the four equilateral triangles on the spherical model and the four diamonds (double equilateral triangles) in the hyperbolic model. What happens when we take the pieces around each center apart and look at them flatted?</p>
<p><img src="\assets\blog\X-Math-Tables\4.jpg" alt="Flattened magnetic tiles" /></p>
<p>(It might help to arrange the pieces next to each other, if your student doesn’t do it first.)</p>
<p>X quickly observed that the excess angle on the hyperbolic side completed the elliptical side, so they were on average flat.</p>
<hr />
<p>To complement addition, here’s the subtraction image from nTop, in case you want to print it:</p>
<p><img src="\assets\blog\X-Math-Tables\diff.png" alt="nTop addition field" /></p>
<div class="article__license">nTopology, nTop, nTop Platform, Field-Driven Design, and Element are trademarks of nTopology Inc.</div>Blake Courterbcourter@gmail.comMy daughter, “X”, who just turned five, has been enjoying adding and subtracting small whole numbers in her head. She is just starting to write, so we made a little table for her to practice. Here she is adding:Welcome to the new site2023-02-12T00:00:00+00:002023-02-12T00:00:00+00:00http://bcourter.github.io/2023/02/12/welcome<p>Hello and welcome. Sometime around 2020, my old Amazon instance with Wordpress finally bit the dust. Here we are, trying again, with modern technology. Eventually, we’ll get some of the old content rehosted here.</p>
<p><!--more--></p>Blake Courterbcourter@gmail.comHello and welcome. Sometime around 2020, my old Amazon instance with Wordpress finally bit the dust. Here we are, trying again, with modern technology. Eventually, we’ll get some of the old content rehosted here.