A Sham Schwarz Surface Based on a Squircle
Year: 2022 Authors: Chamberlain Fong; Douglas Dunham
Core claim
The sham Schwarz surface, defined by cos(x) + cos(y) + cos(z) = 0, can replace the mucube for hyperbolic pattern visualization and is the 3D counterpart of an oblique squircle.
Topics
hyperbolic tilings, triply periodic surfaces, implicit surfaces, squircle geometry, 3D visualization
Domains
hyperbolic geometry, minimal surfaces, crystallographic symmetry, implicit equations, Bézier approximation, mathematical visualization, generative patterning, computer graphics
Methods
Marching Cubes, bicubic Bézier patches, implicit surface modeling, texture mapping
Media
GeoGebra, Desmos, CalcPlot3D, Escher art, video overview
Paper text
The text below is the locally extracted OCR/Markdown version of the paper. Raw PDF files remain local and are not published here.
Bridges 2022 Conference Proceedings
A Sham Schwarz Surface Based on a Squircle
Chamberlain Fong and Douglas Dunham
San Francisco, California, USA; chamberlain@alum.berkeley.edu University of Minnesota Duluth, USA; ddunham@d.umn.edu
Abstract
We present and discuss our work on tiling hyperbolic patterns on the Schwarz P surface. We also discuss how the Schwarz P surface is approximately related to the squircle, which is an intermediate shape between the square and the circle.
Introduction
In 2012, Dunham investigated the use of triply periodic polyhedra [1] to visualize hyperbolic patterns in 3D space. This paper is an offshoot of his work with the goal of replacing the polyhedra with smooth curved surfaces. In particular, we are interested in tiling hyperbolic patterns on the triply periodic Schwarz P surface. An overview of our results is shown in Figure 1. There is also a more detailed video overview included.
Figure 1: Escher’s fishy texture on the Schwarz surface. (video version: https://youtu.be/iFgkYkjUYps)
A triply periodic surface is a surface that repeats indefinitely in three independent directions of Euclidean space. Triply periodic polyhedra are a faceted subset of such surfaces that consist of adjoining polygons. Dunham used many different types of triply periodic polyhedra in his previous work. For this paper, we will only discuss one type – the mucube, also known as the regular skew polyhedron [1].
An extended mucube cell is a polyhedron consisting of 24 squares connected such that 6 squares meet perpendicularly at a common junction point. An example model of this extended cell is shown in Figure 2. The extended unit cell is not a closed polyhedron because it has square holes in its 6 open cubes. These open cubes connect with other mucube cells in order to extend to all of 3D space. These interconnections make the mucube a triply periodic polyhedron. A paper model of several connected mucube cells is shown in Figure 3 (left).
The mucube’s property of having 6 squares meet at a common junction point allows it to represent the negative curvature of the hyperbolic plane. Dunham realized that it is possible to transfer some regular tessellations of the hyperbolic plane onto the mucube. He demonstrated this by building a paper model of several mucube cells with tiling patterns printed on them. This is shown in Figure 3. Meanwhile, we assert that a smooth curved surface is better able to embody the negative curvature of the hyperbolic plane than piecewise-flat polyhedra. This is the raison d’etre for this paper.
Fong and Dunham
Figure 2: Polydron™ models of the extended mucube cell (left, center) and the Schwarz P surface (right)
The Schwarz P Surface and Its Approximation
The Schwarz P surface is a triply periodic minimal surface. It has the shape of a soap film that arises when a certain skew hexagonal wire frame [2] is dipped into liquid soap. In order to calculate points on the Schwarz P surface, one has to solve a partial differential equation that minimizes surface area for a given boundary condition. This is akin to how Hermann Schwarz studied it in the 1860s. More recently, researchers in structural chemistry have discovered closed-form analytical expressions [5] for a parametric representation of the Schwarz P surface, but the equations are complicated and involve elliptic integrals with complex parameters. For this paper, we decided to forgo complex equations and took an approximation route. Instead of using the Schwarz P surface, we used an implicit surface [6] that closely approximates it with the equation:
This approximating surface served as the starting point for all of our work in this paper. This means that we did not really work directly with the Schwarz P surface in our artistic renderings. Therefore, it would be convenient to give a name to the approximating surface we used. For the rest of this paper, we shall refer to this implicit surface as the sham Schwarz surface.
The sham Schwarz surface has the same topology as the Schwarz P surface and the mucube. This makes it a suitable replacement of the mucube for tiling hyperbolic patterns. Figure 3 shows a comparison. The sham Schwarz surface is triply periodic with a period of in the three main axial directions. Furthermore, the sham Schwarz surface has an outlandish kind of periodicity in that
Figure 3: A side-by-side comparison of extended mucube cells with part of a sham Schwarz surface
A Sham Schwarz Surface Based on a Squircle
The Schwarz P surface is a highly symmetric object. In fact, its symmetry [5] has been mathematically determined as the crystallographic group , also known as space group #229. This symmetry group has order 48 and a point group with full octahedral symmetry. Consequently, a unit cell of this surface can be partitioned into 48 identical pieces of a single fundamental patch [5]. This kind of partitioning also holds for the sham Schwarz surface.
In order to visualize the sham Schwarz surface using a computer, we had to represent it in software. We approached this task using two different ways. Our first representation is an unorganized set of triangles, also known as triangle soup. Our second representation is a collection of Bézier patches.
In the triangle soup representation, we started from the implicit equation of the sham Schwarz surface and used the Marching Cubes algorithm to generate about 70000 triangles that approximate the surface. The Marching Cubes algorithm is a popular technique in computer graphics for converting implicit surfaces into triangular meshes. The algorithm has an adjustable parameter that allows for accurate representation of the surface at the cost of increasing triangle count. This approach is great for visualizing the raw geometry of the surface. However, it is not easy to determine texture coordinates for each individual triangle. Consequently, we did not use this representation for visualizing the sham Schwarz surface with texture. Nonetheless, we used this visualization method heavily for the figures in the latter half of this paper, whereupon we examine different shapes related to the sham Schwarz surface.
We used Bézier patches as the representation for visualizing the sham Schwarz surface with texture. We start by partitioning the sham Schwarz surface into 24 bicubic Bézier patches, with each patch corresponding to a square on the extended mucube cell. The rightmost diagram of Figure 2 shows these patches. Observe that each patch has bilateral symmetry, so it could be split in half to form two sub-patches that are mirror reflections of each other. We did just that to get a total of 48 bicubic Bézier patches in our representation. In effect, we have a partitioning that takes advantage of the symmetry group [5] in order to simplify our Bézier approximation of the sham Schwarz surface. Meanwhile, texture coordinates are relatively simple to determine for Bézier patches. This enabled us to overlay tiling patterns on the sham Schwarz surface. Figure 4 shows two examples of our textured results.
Upon close examination of the triply periodic sham Schwarz surface, we couldn’t help but wonder about the true nature of this intriguing shape. Here are some questions of interest: What kind of 2D shapes form the cross sections of this surface? What curve encompasses the orifice of the sham Schwarz surface? We will answer these questions at the end of this paper.
Figure 4: Escher patterns on the triply periodic sham Schwarz surface via Bézier approximation
Fong and Dunham
Segue to the Squircle
In this section, we will take a slight detour and discuss a 2D shape known as the squircle. By the end of this paper, we will bring everything together and show that the squircle is closely related to the sham Schwarz surface. The squircle is an intermediate shape between the circle and the square. There are actually many different types of squircles [3,4,9]. The most famous one is the superellipse, also known as the Lamé curve. The equation for the superellipse with no eccentricity is
There are two parameters in this equation: and . The power parameter is an interpolating variable that allows one to blend the circle with the square. The radial parameter specifies the size of the shape. Incidentally, there are two different squircles represented in the equation above. We shall refer to these two shapes as the Lamé upper squircle and the Lamé lower squircle.
The Lamé upper squircle is the resulting shape for . When , the equation produces a circle with radius . As , the equation produces a square with a side length of . In between, the equation produces a smooth planar curve that blends the circle with the square. These are shown in the top region of Figure 5.
Figure 5: Two squircular families within the Lamé curve
The Lamé lower squircle is the resulting shape for . When , the equation produces a tilted square with side length of . When , the equation produces a circle with radius . In between, the equation produces a smooth planar curve that blends the circle with the square. These are also shown in Figure 5 (bottom). Notice that the square is tilted by
At this point, we will introduce a novel squircle that was discovered while studying the sham Schwarz surface. We shall refer to this shape as the oblique squircle. It is shown in Figure 6 and has the equation:
There are two parameters in the equation: and . The squareness parameter is an interpolating variable that allows one to blend the circle with the square. The radial parameter specifies the size of the shape. These parameters are directly analogous to the parameters for the Lamé curve. As , the equation produces a circle with radius . When , the equation produces a tilted square with a side length of . There is a degeneracy in the equation when , because it reduces to . Note that this shape resembles the Lamé lower squircle near the Cartesian origin.
A Sham Schwarz Surface Based on a Squircle
Figure 6: The oblique squircle at varying squareness values
Due to space limitations in this paper, we will not prove that the implicit equation for the oblique squircle does indeed produce an intermediate shape between the circle and the square. Instead, we refer the reader to another paper [3] containing a proof in the appendix. Nevertheless, we would like to mention that the proof merely consists of doing Taylor series expansions and using L’Hôpital’s rule when evaluating the limit as . Similarly, the case just involves simple trigonometric manipulations.
In lieu of the proof, we encourage the reader to examine the GeoGebra demo files that are included with the supplementary files for this paper. There are interactive sliders within the demo that allow the user to see how the parameters affect the appearance of the curve. The GeoGebra graphing calculator can be downloaded for free as a standalone computer program or run online [7].
For the diagram of the oblique squircle in Figure 6, we have restricted our curve to the region within and . The implicit equation for the oblique squircle actually extends to outside of this region. In fact, this curve is doubly periodic in the Cartesian plane. This property follows from the fact that cosine is a periodic function. Meanwhile, observe that
So there is a discrepancy in the range of possible values between the sides of the oblique squircle equation. In order to account for the full range of values coming from the sum of two cosines, we introduce the concept of overshoot signified by the variable . We then amend the implicit equation for the oblique squircle as
One can consider the overshoot variable as an extra parameter independent from the squareness parameter. Intuitively, it is a parameter used to account for other possible shapes that arise from the sum of two cosines. The overshoot variable can have any value between zero and two, i.e. . Note that the amended implicit equation uses the floor function as a way to decouple the overshoot and squareness parameters. However, overshoot in this squircle is only valid after the squareness parameter has reached a value of 1.
Figure 7 shows the oblique squircle at different values of overshoot. At first glance, it appears that the curve becomes disconnected into 4 parts as overshoot increases. In reality, one has to take into account the doubly periodic nature of this curve in the Cartesian plane. Actually, overshoot introduces some kind of phase shift to the oblique squircle and then causes the squircle to recede into nothing at . Again, we strongly encourage the reader to observe this parameter interactively using the GeoGebra files included. GeoGebra comes with a dynamic pan and zoom user interface that can showcase the twofold periodicity of the oblique squircle. Alternatively, we also recommend the Desmos online graphing calculator for observing the oblique squircle interactively.
Figure 7: The oblique squircle recedes as overshoot increases. See https://www.desmos.com/calculator/23njdxyut9
Fong and Dunham
3D Counterparts
It is natural to ask whether there is an analogous shape to the squircle in 3D. Indeed, there is an affirmative answer to this. For the Lamé curve, the implicit equation for its 3D counterpart is almost trivial to determine because it just requires a new variable in the Cartesian coordinate space; i.e.
We will not discuss the 3D counterpart of the Lamé upper squircle except for mentioning that it is an intermediate shape between the sphere and the cube. Instead, we focus on the 3D counterpart of the Lamé lower squircle, which is an intermediate shape between the sphere and the octahedron. Note that the octahedron is the dual of the cube, so this sort of makes sense. Also, it is easy to check that the octahedron has the implicit equation: . We include a rendering of this 3D shape in Figure 8 (top) to further justify this.
Figure 8: Some 3D counterparts of squircles
Meanwhile, the oblique squircle also has a 3D counterpart, which we shall call the triple cos surface. This 3D counterpart very much resembles the one from the Lamé lower squircle (top) shown in Figure 8. However, the shape at the right end of the spectrum when is not an octahedron. Although there is a strong semblance to the octahedron, the shape does not have flat polygonal faces. For this reason, we shall refer to it as the sham octahedron. The implicit equation for the triple cos surface is
In analogy to the oblique squircle, this 3D surface is triply periodic. Its parameters: and are identical to those in the oblique squircle. The squareness parameter is an interpolating variable that allows one to blend the sphere with the sham octahedron. The radial parameter specifies the size of the shape. As , the equation produces a sphere with radius . When , the equation produces a sham octahedron with an edge length of . These implicit surfaces can be visualized using 3D graphing programs such as CalcPlot3D [8].
A Sham Schwarz Surface Based on a Squircle
Just as with the oblique squircle, its 3D counterpart has an analogous overshoot. This time, the overshoot variable has a span where . The amended equation for the implicit surface with overshoot is .
Figure 9 shows the surface at increasing values of overshoot. Observe that the sham Schwarz surface makes an appearance when . This can be deduced from the equation above by setting the squareness , the size , and the overshoot . After simplifying, it reduces into the implicit equation of the sham Schwarz surface. Take note that all the surfaces rendered in Figure 9 are triply periodic in space. We just restricted them to a unit cell in order to simplify the visualizations.
Figure 9: The triple cos surface with overshoot. (animation: https://youtu.be/sZTxCfXudp4)
The Schwarz P triply periodic minimal surface has special property in which it splits 3D space into two isometric regions [2] corresponding to its interior and exterior. In other words, the inside of the Schwarz P surface is congruent to the outside. We claim that the sham Schwarz surface also has this property, which results from its outlandish periodicity mentioned earlier in the paper. This property makes it the most aesthetically-pleasing surface among those shown in Figure 9, at least in terms of inside/outside symmetry. We have included a visual comparison of the Schwarz P surface with the sham Schwarz surface in the video link attached with Figure 9.
In this penultimate paragraph of the paper, we will answer questions that were posed earlier. One burning question we had is regarding the shape that encompasses the six orifices of the sham Schwarz surface. Using the implicit equations for the oblique squircle and its 3D counterpart, we were able to figure this out. We start with the implicit equation [6] for the sham Schwarz surface: . We know that two of the orifices are located at . Substituting back to the implicit equation, we get . This equation is just the oblique squircle with squareness , size , and no overshoot. Therefore, we can conclude that the shape of the orifice is an oblique squircle! Using a similar approach, one can deduce that all perpendicular cross sections of the sham Schwarz surface are oblique squircles, with or without overshoot. This is shown in Figure 10.
Fong and Dunham
Figure 10: Oblique squircles encompass the perpendicular cross sections of the surface
Summary
We discussed the use of the sham Schwarz surface as a replacement to the mucube for visualizing hyperbolic patterns. We also introduced a new type of shape called the oblique squircle. We then showed that the sham Schwarz surface is just a 3D counterpart of the oblique squircle with overshoot.
Acknowledgements
We would like to thank the M.C. Escher Company for the use of various Escher art in this paper. We would also like to thank the developers of GeoGebra for their wonderful software. Likewise for Desmos!
References
[1] D. Dunham. “Patterned Triply Periodic Polyhedra.” Bridges Conference Proceedings, Towson Maryland USA, July 25-29, 2012, pp. 275-282. [2] R. Ferreol, A. Esculier. “Schwarz D and P Minimal Surfaces.” Mathcurve.com, 2017. https://mathcurve.com/surfaces.gb/schwarz/schwarz.s [3] C. Fong. “Squircular Calculations.” Joint Math. Meetings 2018, SIGMAA-ARTS. San Diego, USA. https://arxiv.org/ftp/arxiv/papers/1604/1604.02174.pdf [4] C. Fong, D. Dunham. “Hyperbolization on a Squircular Continuum.” Bridges Conference Proceedings, Linz Austria, July 16-20, 2019, pp. 83-90. [5] P. Gandy, J. Klinowski. “Exact Computation of the Triply Periodic Schwarz P Minimal Surface.” Chemical Physics Letters, volume 322, 2000, pp. 579-586. [6] D. Hoffman, J. Hoffman. “Triply Periodic Level Surfaces.” Math. Sciences Research Institute. https://www.msri.org/publications/sgp/jim/geom/level/library/triper/index. [7] M. Hohenwarter, et.al. GeoGebra. https://www.geogebra.org/graphing [8] P. Seeburger. CalcPlot3D. https://c3d.libretexts.org/CalcPlot3D/index. [9] E. Weisstein. “Squircle.” MathWorld - A Wolfram Web Resource. http://mathworld.wolfram.com/Squircle.