Wikipedia:Reference desk/Archives/Mathematics/2020 December 6

Mathematics desk
< December 5 << Nov | December | Jan >> December 7 >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


December 6

edit

Breaking down a gyroid into layers

edit

I'm trying to figure out how a gyroid surface, expressed as

 

can be sliced horizontally.

This is a solved problem, as illustrated by the figures below. The first image shows a cross section of a cube generated by a 3D printing slicer to fill a cube with a gyroid infill, clearly showing that the slicer software figured out how to break the surface down into horizontal layers. The second image shows an animation of a gyroid surface being built up vertically in steps. The third is a unit cell, which would be ideal if I could figure out how to create it with some thickness, but I thought maybe the slicing approach would be simpler. I could be wrong though.

My goal here is to see if I can create a model of a gyroid surface in OpenSCAD, which I can then use as I please as a component of a 3D object rather than structural infill. I don't know yet if that is even feasible, but if I can generate coordinates of triangular facets, I can create any object.

The equation is simple enough. To generate a layer, I just fix the z height to some value, and generate y values as a function of x. Using Wolfram Alpha to solve the equation above for y, I get:

 

The problem is, when I try to plot this, I get curves with discontinuities that look sort of like a gyroid cross section in a piecewise fashion, but clearly aren't the same.

I've been searching for days and have not found any algorithm for generating vertices or facets or cross sections of a gyroid. And in spite of the seeming simplicity of the equation I am feeling somewhat stumped. How should I approach this? ~Anachronist (talk) 02:46, 6 December 2020 (UTC)[reply]

I have not looked into your solution, but here is how I'd solve the gyroid equation for  
First, determine   and   (modulo  ) such that   and   This can be done by taking
  and
 
Then the equation can be rewritten as
 
From this equation you can see a numerical problem arising when   (or very close to it). The values of   and   cannot simultaneously be zero, however; otherwise, all values for   would solve the equation. But assume  . Then  , so
 
The solution set for   is empty whenever   and the inequation implies that not attempting to solve such cases also will avoid dividing by values of   that are (close to) zero.
Put   Then the solutions for   are given by:
   
Taking the Minkowski sum of the set of triples     a small ball will give this some thickness. Caveat lector: I have not tested this.  --Lambiam 13:12, 6 December 2020 (UTC)[reply]