OEIS/FASS curves: Difference between revisions

From tehowiki
Jump to navigation Jump to search
imported>Gfis
+Bubblegram
imported>Gfis
base 2,3,4,6
Line 1: Line 1:
[[File:Draht-Kn.jpg|250px|right|Steel wire]]
[[File:Kn-Draht.jpg|250px|right|Steel wire]]
===Beyond [http://oeis.org/search?q=A220952 OEIS sequence A220952]===
===Beyond [http://oeis.org/search?q=A220952 OEIS sequence A220952]===
After my [[OEIS/A220952|initial attemps to extend sequence A220952]] I became interested in [https://en.wikipedia.org/wiki/Space-filling_curve FASS curves] in general.
[[File:Fischertechnik-Kn.jpg|250px|right|Fischertechnik 15 mm]]
[[File:Fischertechnik-Kn.jpg|250px|right|Fischertechnik 15 mm]]
Sequence A220952 is best discussed with numbers to base 5. The first 125 values then are:
Sequence A220952 is best discussed with numbers to base 5. The first 125 values then are:
Line 14: Line 15:
  412,411,410,420,430,440,441,442,443,444
  412,411,410,420,430,440,441,442,443,444
In each generation the number of digits is increased by one. The first 25 values form the adjacency condition matrix as defined by Knuth:
In each generation the number of digits is increased by one. The first 25 values form the adjacency condition matrix as defined by Knuth:
        Kn
  04==14==24==34  44
  04==14==24==34  44
  ||          ||  ||
  ||          ||  ||
Line 23: Line 25:
  ||  ||          ||
  ||  ||          ||
  00  10==20==30==40
  00  10==20==30==40
[[File:Balsaholz-8mm-Kn.jpg|250px|right|Balsa lumber 8 mm]]
[[File:Balsaholz-Kn.jpg|250px|right|Balsa lumber 8 mm]]
Here, the last digit is the y coordinate, and the digit before is the x coordinate. In generation 3, the left-most digit can be interpreted as the z coordinate. Since this is Knuth's original adjacency matrix, and since it shows a letter "n", I named it "Kn".
Here, the last digit is the y coordinate, and the digit before is the x coordinate. In generation 3, the left-most digit can be interpreted as the z coordinate. Since this is Knuth's original adjacency matrix, and since it shows a letter "n", I named it "Kn".


Line 31: Line 34:
A [https://github.com/google/hilbert#hilbert----- package for Hilbert and Peano curves] can be found on github.com.
A [https://github.com/google/hilbert#hilbert----- package for Hilbert and Peano curves] can be found on github.com.
===Variants===
===Variants===
There is another, trivial matrix:
Next I wrote a Perl program which always starts with nodes 00, 01, but which then exhausts all possible paths which fill the 5*5 square. That program found several adjacency matrices which have similiar properties like that of Knuth. Depending the shapes of the paths, I invented names for them:
  04==14  24==34  44
        Fs                    Ls                    Ln                    NN     
  ||  ||  ||  ||  ||
04==14==24==34  44    04==14  24==34==44    04==14  24==34 44    04==14  24==34  44
  03  13  23  33  43
  ||          ||  ||    ||  ||  ||            ||  ||  ||  ||  ||    ||  ||  ||  ||  ||
  ||  ||  ||  ||  ||
  03  13==23==33  43    03  13  23==33==43    03  13  23  33  43    03  13  23  33  43
  02  12  22  32  42
  ||  ||          ||    ||  ||          ||    ||  ||  ||  ||  ||    ||  ||  ||  ||  ||
  ||  ||  ||  ||  ||
  02  12==22==32  42    02  12  22==32==42    02  12  22  32==42    02  12  22  32  42
  01  11  21  31  41
  ||          ||  ||    ||  ||  ||            ||  ||  ||            ||  ||  ||  ||  ||
  ||  ||  ||  ||  ||
  01  11==21==31  41    01  11  21==31==41    01  11  21==31==41    01  11  21  31  41
  00  10==20  30==40
  ||  ||          ||    ||  ||          ||    ||  ||          ||    ||  ||  ||  ||  ||
  00  10==20==30==40    00  10==20==30==40    00  10==20==30==40    00  10==20  30==40  
 
For these 4 matrices I checked the uniqueness of the generated paths up to n=3125 (5th dimension). Proofs similiar to that for sequence A220952 can probably be devised for these matrices, too.


A third adjacency matrix shows the structure of the letter "F" and "s", therefore I named it "Fs":
The cube for "Fs" can be viewed and turned in all directions:
04==14==24==34  44
||          ||  ||
03  13==23==33  43
||  ||          ||
02  12==22==32  42
||          ||  ||
01  11==21==31  41
||  ||          ||
00  10==20==30==40
The corresponding cube can be viewed:
* as a '''[http://teherba.org/threejs/meander.html colored line]''' with coordinates  
* as a '''[http://teherba.org/threejs/meander.html colored line]''' with coordinates  
* as a '''[http://teherba.org/threejs/meander-box.html solid 3D model]'''
* as a '''[http://teherba.org/threejs/meander-box.html solid 3D model]'''
===Different Bases===
Searching for space filling paths reminds me a bit to the famous [http://oeis.org/A001011 OEIS stamp folding sequence A001011]. The Perl program mentioned above finds following numbers of space filling matrices for bases 1, 2, 3 ...;
base count examples and notes
1      1  (a single node)
2      1  01==11  first order Hilbert curve
            ||  ||
            00  10
3      4  02==12==22    02==12==22    02==12==22    02==12  22  only this last matrix
                    ||    ||      ||    ||      ||    ||  ||  ||  generates a path up to the
            01==11  21    01  11==21    01  11  21    01  11  21  6th dimension
            ||  ||  ||    ||  ||        ||  ||  ||    ||  ||  ||
            00  10==20    00  10==20    00  10==20    00  10==20
4    26
5    412  where 5 generate paths up to the 5th dimension
6  11072
...    ?
===3D Manufacturing===
===3D Manufacturing===
[[File:trinckle-box.jpg|250px|right|4x4 cm cube (polyamide sintering)]]
[[File:trinckle-box.jpg|250px|right|4x4 cm cube (polyamide sintering)]]
Line 61: Line 75:
In discussions with several people I learned that such FASS curves cannot be produced by conventional processes like milling or die casting. Therefore I tried the current hype of 3D printing.
In discussions with several people I learned that such FASS curves cannot be produced by conventional processes like milling or die casting. Therefore I tried the current hype of 3D printing.


With Three.js it is also very easy tp store an [https://en.wikipedia.org/wiki/STL_(file_format) STL] file derived from the virtual scene. STL is the main format for stereolithography CAD software, 3D printers and other manufacturing devices. STL stores a ''mesh'', that is a set of triangles representing the geometry of the object.
With Three.js it is also very easy to store an [https://en.wikipedia.org/wiki/STL_(file_format) STL] file derived from the virtual scene. STL is the main format for stereolithography CAD software, 3D printers and other manufacturing devices. STL stores a ''mesh'', that is a set of triangles representing the geometry of the object.
* Download the '''[http://teherba.org/threejs/meander-box.stl meander STL file]''' and view it with the free service of [https://www.viewstl.com/ viewstl.com], and/or  
* Download the '''[http://teherba.org/threejs/meander-box.stl meander STL file]''' and view it with the free service of [https://www.viewstl.com/ viewstl.com], and/or  
* send the STL file to the production service company of your choice.
* send the STL file to the production service company of your choice.
During my holidays in Greece I sent this a file to [https://www.trinckle.com/en/printorder.php trinckle.com] in Germany, and within 10 days and 20 € I received the nice 4x4 cm cube on the right. It was made by sintering plastic (polyamide) with a laser. The problem is that the structure cannot be built on a supporting surface, and that there is some warping caused by the heat of the laser and the weight of the material. The object is very fragile.
During my holidays in Greece I sent this a file to [https://www.trinckle.com/en/printorder.php trinckle.com] in Germany, and within 10 days and 20 € I received the nice 4x4 cm cube on the right. It was made by sintering plastic (polyamide) with a laser. The problem is that the structure cannot be built on a supporting surface, and that there is some warping caused by the heat of the laser and the weight of the material. The object is very fragile.
[[File:Bubblegram.jpg|250 px|right|3D laser crystal]]
[[File:Bubblegram.jpg|250 px|right|3D laser crystal]]
In the next step I ordered a 5x5x5 cm [https://en.wikipedia.org/wiki/Bubblegram bubblegram], an internally engraved glass cube from [http://www.easycrystal.de/eng/ easycrystal.de] for about 40 €. Such a cube is very stable, and the engraved point cloud for the FASS curve is geometrically exact.
In the next step I ordered a 5x5x5 cm [https://en.wikipedia.org/wiki/Bubblegram bubblegram], an internally engraved glass cube from [http://www.easycrystal.de/eng/ easycrystal.de] for about 40 €. Such a cube is very stable, and the engraved point cloud for the FASS curve is geometrically exact. In addition to the curve the base 5 coordinates are shown, but they are very tiny.
 
The STL file should probably be "cleaned" from triangles inside the bars. There is a [https://all3dp.com/free-stl-editor-open-edit-stl-file/ good overview of 7 free STL editors], among them [http://www.meshmixer.com/ MeshMixer].
The STL file should probably be "cleaned" from triangles inside the bars. There is a [https://all3dp.com/free-stl-editor-open-edit-stl-file/ good overview of 7 free STL editors], among them [http://www.meshmixer.com/ MeshMixer].

Revision as of 20:56, 17 October 2017

Steel wire
Steel wire

Beyond OEIS sequence A220952

After my initial attemps to extend sequence A220952 I became interested in FASS curves in general.

Fischertechnik 15 mm
Fischertechnik 15 mm

Sequence A220952 is best discussed with numbers to base 5. The first 125 values then are:

0,
1,2,3,4,
14,24,34,33,32,31,21,22,23,13,12,11,10,20,30,40,41,42,43,44,
144,244,344,343,342,341,241,242,243,143,142,141,140,240,340,
330,320,310,210,220,230,130,120,110,111,112,113,123,122,121,
131,132,133,233,232,231,221,222,223,213,212,211,311,312,313,
323,322,321,331,332,333,334,324,314,214,224,234,134,124,114,
104,204,304,303,302,301,201,202,203,103,102,101,100,200,300,
400,401,402,403,404,414,424,434,433,432,431,421,422,423,413,
412,411,410,420,430,440,441,442,443,444

In each generation the number of digits is increased by one. The first 25 values form the adjacency condition matrix as defined by Knuth:

       Kn
04==14==24==34  44
||          ||  ||
03  13==23  33  43
||  ||  ||  ||  ||
02  12  22  32  42
||  ||  ||  ||  ||
01  11  21==31  41
||  ||          ||
00  10==20==30==40

Balsa lumber 8 mm
Balsa lumber 8 mm

Here, the last digit is the y coordinate, and the digit before is the x coordinate. In generation 3, the left-most digit can be interpreted as the z coordinate. Since this is Knuth's original adjacency matrix, and since it shows a letter "n", I named it "Kn".

The curve is space-filling in every dimension

For the cube I wrote a Javascript program with the beautiful framework three.js.

A package for Hilbert and Peano curves can be found on github.com.

Variants

Next I wrote a Perl program which always starts with nodes 00, 01, but which then exhausts all possible paths which fill the 5*5 square. That program found several adjacency matrices which have similiar properties like that of Knuth. Depending the shapes of the paths, I invented names for them:

        Fs                    Ls                    Ln                    NN       
04==14==24==34  44    04==14  24==34==44    04==14  24==34  44    04==14  24==34  44
||          ||  ||    ||  ||  ||            ||  ||  ||  ||  ||    ||  ||  ||  ||  ||
03  13==23==33  43    03  13  23==33==43    03  13  23  33  43    03  13  23  33  43
||  ||          ||    ||  ||          ||    ||  ||  ||  ||  ||    ||  ||  ||  ||  ||
02  12==22==32  42    02  12  22==32==42    02  12  22  32==42    02  12  22  32  42
||          ||  ||    ||  ||  ||            ||  ||  ||            ||  ||  ||  ||  ||
01  11==21==31  41    01  11  21==31==41    01  11  21==31==41    01  11  21  31  41
||  ||          ||    ||  ||          ||    ||  ||          ||    ||  ||  ||  ||  ||
00  10==20==30==40    00  10==20==30==40    00  10==20==30==40    00  10==20  30==40 

For these 4 matrices I checked the uniqueness of the generated paths up to n=3125 (5th dimension). Proofs similiar to that for sequence A220952 can probably be devised for these matrices, too.

The cube for "Fs" can be viewed and turned in all directions:

Different Bases

Searching for space filling paths reminds me a bit to the famous OEIS stamp folding sequence A001011. The Perl program mentioned above finds following numbers of space filling matrices for bases 1, 2, 3 ...;

base count examples and notes
1      1   (a single node) 
2      1   01==11  first order Hilbert curve 
           ||  ||
           00  10

3      4   02==12==22    02==12==22    02==12==22    02==12  22   only this last matrix
                   ||    ||      ||    ||      ||    ||  ||  ||   generates a path up to the
           01==11  21    01  11==21    01  11  21    01  11  21   6th dimension
           ||  ||  ||    ||  ||        ||  ||  ||    ||  ||  ||
           00  10==20    00  10==20    00  10==20    00  10==20
4     26
5    412   where 5 generate paths up to the 5th dimension
6  11072
...    ?

3D Manufacturing

4x4 cm cube (polyamide sintering)
4x4 cm cube (polyamide sintering)

All my attempts to physically build such objects were unsatisfying so far. The balsa lumber and the Fischertechnik (above) approaches worked somehow, but both needed distance bars (thin needles for the balsa, red blocks for Fischertechnik) to keep the geometry in shape. Cutting and glueing the 62 balsa parts was very tedious.

In discussions with several people I learned that such FASS curves cannot be produced by conventional processes like milling or die casting. Therefore I tried the current hype of 3D printing.

With Three.js it is also very easy to store an STL file derived from the virtual scene. STL is the main format for stereolithography CAD software, 3D printers and other manufacturing devices. STL stores a mesh, that is a set of triangles representing the geometry of the object.

  • Download the meander STL file and view it with the free service of viewstl.com, and/or
  • send the STL file to the production service company of your choice.

During my holidays in Greece I sent this a file to trinckle.com in Germany, and within 10 days and 20 € I received the nice 4x4 cm cube on the right. It was made by sintering plastic (polyamide) with a laser. The problem is that the structure cannot be built on a supporting surface, and that there is some warping caused by the heat of the laser and the weight of the material. The object is very fragile.

3D laser crystal
3D laser crystal

In the next step I ordered a 5x5x5 cm bubblegram, an internally engraved glass cube from easycrystal.de for about 40 €. Such a cube is very stable, and the engraved point cloud for the FASS curve is geometrically exact. In addition to the curve the base 5 coordinates are shown, but they are very tiny. The STL file should probably be "cleaned" from triangles inside the bars. There is a good overview of 7 free STL editors, among them MeshMixer.