Sunday, July 17, 2016

a first slice

Here is my first simple attempt at a geometric design using sliceformstudio - I'm looking forward to trying out many more.


I have played around a bit with sliceforms before, using instructions from John Sharp, who has written quite a bit about using them for creating models of conic sections and surfaces, and has a nice short blog post here about their history. I learned about sliceformstudio a short while ago from mathmunch.

This design was based on a simple pattern of pentagons around a decagon, to which the wondrous sliceformstudio applied some interweaving that I tweaked only slightly using the very simple interface.


After printing off the generated strip file onto cardstock, 10 long strips and 10 short strips are cut, folded, and slid together to create the final model. I've copied the generated strip file to a pdf here.

Friday, June 24, 2016

more Chladni figures in R

Following on from an earlier post, the Chladni images here are made using a slightly modified version of the same R script (source here), which uses cosines instead of sines. If you imagine the square of the vibrating surface to be fixed at the center (as depicted below), using cosines seems the natural choice. When modeling standing waves, cosines are used to model open-ended pipes, while sines are used to model fixed-end strings.


Playing around with cosine-based formulas led to some images that seemed very close to Chadni's own diagrams, which can be found in an appendix to his book on Google books.

For a few of these I've uploaded the scripts that produced them.

Chladni image 40 b
Source here.

 Chladni image 41
Source here.

Chladni image 53
Source here.

Chladni image 58
Source here.

Chladni image 63
Source here.

And of course, many more are possible. Try a few yourself :)

Rascal Triangle


A few early iterations of something produced by a short script in R. What is it? You may see it more clearly in some of its later stages of development.


Yes, it is Pascal's Triangle modulo 2 - I knew you would recognize it :). The R source for generating these images is here. Like other recent posts, this is another example of using R in some simple programming exercises, pretty much completely unrelated to its intended purpose as a language for statistical computing. A wile back, there was a post about using TinkerPlots, a data management software tool for young folk, to do something similar (more detailed instructions on drawing a general Pascal Triangle in TinkerPlots can be found in this article),



Wednesday, June 15, 2016

chladni-esque figures in R

some Chladni-esque figures

Continuing on from this post, I am playing around with some unusual R language programming activities by creating some simplified Chladni figures.

Named for Ernst Chladni, these figures represent nodal patterns formed by vibrating surfaces. Traditionally, these are formed placing fine particles on a surface, like a sheet of metal that is set vibrating (a violin bow against an edge of the metal plate is one popular method). The particles settle in the areas of the surface that have the least motion - the nodes. When you achieve a resonant frequency, a characteristic pattern emerges. 

some more Chladni-esque figures

Chladii was not the first to study these, but his enlightenment-era text is an early systematic treatment (several French and German versions are on Google Books, the German text has the best figures, in an appendix). A more recent contributor, Mary Desiree Waller, published a book Chladni Figures, a Study in Symmetry in 1961, which I would love to get a look at someday. In the 1970s, Chilandi figures were sucked down the rabbithole of Cymatics, and seem now seem to appeal equally to students of actual physics and metaphysics.

Chladni's sketches of some nodal patterns on a vibrating surface
Why use R for this? My motivation was not to select the best tool for exploring this topic, but to learn a bit more about programming in R. It was also not to try and produce exact Chladni figures, but something that reasonably resembled them. It turns out that R isn't such an unreasonable choice for this particular programming exercise, if you consider how easy it turns out to be to generate the figures using R. As an educational exercise, it makes some instructive use of R's vectorized methods, for loops, and the image function.On the other hand, we are not going to use any of R's statistical functions, so in some respects R remains an unusual (or maybe even bizarre) choice for this.


In any case, we can create simple Chladni-esque figures by thinking of a rectangular metal plate as a matrix in R (each cell being a point on the metal plate).Each entry in the matrix will receive values that represent the displacement of the plate at those coordinates at some snapshot in time.The matrix is plotted using R's image function, using a grey color range (try experimenting with other color ranges, or with the contour function).

The source code is here.

The idea is that a vibrating square surface whose edges are fixed (not moving) can be modeled as a product sine waves - one going in the horizontal direction, the other going in the vertical direction. Essentially, the displacement caused by a standing wave at a point x,y on the square is modeled as sin(kfx)*sin(kfy), where f is pi/2L, L being the length of the side of the square. and k is an integer. If k = 1, we get the 'fundamental' wave (first harmonic) for the square surface, and if k = 2 we get the first overtone (second harmonic). If we plot each wave separately we end up with a grid that gets finer and finer as we increase k values. However, things get more interesting if we form the sum of different harmonics. The images below show what we get forming the image for waves with = 1 and k = 2 separately, and then what we get when we sum them together.

fundamental, first overtone, and both together
Including or excluding overtones gives a wide variety of images, and if you increase the amplitude of particular overtones (by multiplying the corresponding term by some integer greater than 1), you can get even more patterns, some of which bear a striking resemblance to Chladni's original hand-drawn figures.




See this post for some additional chladni figures.

Monday, May 16, 2016

some tilings on regular grids

The only regular polygons that can tile the plane by themselves are equilateral triangles, squares, and regular hexagons (these are the regular tilings).


In the previous post, we noticed that the regular hexagon tiling can be used as a basis for creating decorative tilings of other polygons, such as nonagons, decagons, 15-gons, and so on, that include increasingly curved (but still polygonal) six-pointed stars to fill in the gaps, observing with the help of a formula form another post, that polygons that can be arranged around a regular hexagon like this have a number of sides equal to a multiple of 3.

15-gons on a regular hexagonal grid

We can do the same sort of thing with the regular triangle tiling, arranging hexagons, dodecagons, 18-gons, or any n-gon where n is a multiple of 6, and the gaps become increasingly-circular triangles.

And the same with the square tiling, arranging squares, octagons, dodecagons, 16-gons, or any n-gon where n is a multiple of 4, where the gaps becoming somewhat astroidal.

The polygons that can be arranged on the triangular, square and hexagonal grids can all be found by looking at the intersection of the green horizontal lines with the family of curves below, which as explained in an earlier post, describe a "regular polygons-in-rings formula" k = 2n/(n -(2+2m)).


The  regular polygon with the fewest number of sides that can be arranged this way on all of these grids is the dodecagon (some other decorative tilings from dodecagons here)


The image below shows where some of these tilings sit on the k = 2n/(n -(2+2m)) curve family.