______________________ ISOMETRIC SNOWFLAKES Leon Rische ______________________ [2019-12-15 Sun] Table of Contents _________________ 1. Introduction 2. Symmetry 3. Randomness 4. Iteration 1 5. Iteration 2 6. Getting a Plot of This 7. License 8. Material Used 1 Introduction ============== This post uses a rust-based Emacs plugin for generating art and plotting it using AxiDraw plotters. You can find it at [l3kn/Plotter]. [l3kn/Plotter] 2 Symmetry ========== Most snowflakes have six-fold radial symmetry. A cube under isometric projection forms a hexagon. To replicate the symmetry of a snowflake, we fill this cube with randomly generated cuboids, then swap their axes (x and y, x and z, y and z) to introduce three-fold symmetry. 3 Randomness ============ Each image should uses a random seed of 32 bits (eight hexadecimal digits). What I like about generative art is being surprised by how different the outputs of a simple algorithms can look when all the parameters are randomized. When generating random numbers, I like to do so in two steps, first generating a range delimited by two powers of two $[2^a, 2^b]$ where $a <= b$ are chosen at random (in a limited range), then generating random numbers in this range. 4 Iteration 1 ============= `->' is a *threading macro* from [magnars/dash.el]. ,---- | (dotimes (_i 50) | (let* ((seed (plt-random-seed)) | (caption (vector (format "0x%s" seed)))) | (random seed) | (let* ((grid-size 128) | (n-cuboids (plt-random-pow2 4 7)) | (cuboid-size (plt-random-pow2-size 0 6)) | (grid (plt-make-grid grid-size))) | (-> (loop for x below n-cuboids | collect | (plt-random-iso-cuboid (plt-random-pow2-size 0 6) grid-size)) | (plt-swap-xy-both) | (plt-swap-xz-both) | (plt-swap-yz-both) | (plt-grid-add grid)) | (plt-grid-to-image | grid | plt-a3-size | plt-a3-caption-size | (concat dir "/a3/" seed ".svg") | "iso_snowflake1" | caption) | (plt-grid-to-image | grid | plt-a4-size | plt-a4-caption-size | (concat dir "/a4/" seed ".svg") | "iso_snowflake1" | caption)))) `---- [magnars/dash.el] 5 Iteration 2 ============= ,---- | (dotimes (_i 50) | (let* ((seed (plt-random-seed)) | (caption (vector (format "0x%s" seed)))) | (random seed) | (let* ((grid-size 128) | (n-cuboids (plt-random-pow2 4 7)) | (grid (plt-make-grid grid-size))) | (-> (loop for x below n-cuboids | collect | (plt-random-iso-cuboid (plt-random-pow2-size 0 6) grid-size)) | (plt-swap-xy-both) | (plt-swap-xz-both) | (plt-swap-yz-both) | (plt-grid-add grid)) | (plt-grid-to-image | grid | plt-a3-size | plt-a3-caption-size | (concat dir "/a3/" seed ".svg") | "iso_snowflake2" | caption) | (plt-grid-to-image | grid | plt-a4-size | plt-a4-caption-size | (concat dir "/a4/" seed ".svg") | "iso_snowflake2" | caption)))) `---- 6 Getting a Plot of This ======================== If you have an [AxiDraw] or a similar plotter that can plot svg files, you should be able to download these images and plot them yourself. On [l3kn/iso_snowflakes] you can find hundreds of randomly generated svg files in A3 and A4 size. The order of the paths is already optimized, images can be plotted using the [AxiDraw CLI]. I'm using the following command (AxiDraw V3 A3): ,---- | axicli image_name.svg -L 2 -p /dev/ttyACM0 -s 30 -S 50 -a 30 `---- For different paper sizes, you can resize the images in [inkscape.] Only `path' elements are used, so it should be possible to plot these images with an HPGL plotter, too. To do so, either parse the `path' elements of the svg and scale the points or write to [support@leonrische.me] so we can come up with a format that's easy for me to generate and easy for you to use. If you want a plot on nice paper, contact me at [sales@leonrische.me]. [AxiDraw] [l3kn/iso_snowflakes] [AxiDraw CLI] [inkscape.] [support@leonrische.me] [sales@leonrische.me] 7 License ========= When distributing this work, please link to the [Isometric Snowflakes] page. For printed / plotted versions, the URL could be written on the back. This license allows commercial use, if you want to sell plots of these images, please don't charge more that necessary to cover material costs and a hourly wage for yourself you consider fair. [Isometric Snowflakes] 8 Material Used =============== 8.1 Pens ~~~~~~~~ - Faber-Castell Pitt Artist Pen, blue, 0.3 (S) - Sakura Gelly Roll, white, 05 8.2 Paper ~~~~~~~~~ - Bristol, A4, 250g/m^2 - Black carton paper, A4, 3008/m^2