I have tens of thousands of photos I’ve taken over the years.
I think some of these photos are pretty good, but most are languishing unseen on random hard drives.
To share them, I’ve been a member of Flickr, I’ve posted on the late lamented Twitter, and I post some onto Mastodon. I’ve also created numerous gallery applications/server scripts/web sites (e.g., Statgal), but they’ve generally been clumsy or take too much work to maintain. So I’ve been working on a dumb PHP/JavaScript slideshow thing that will scan directories, cache the details, etc.
Here’s introducing PhotoSpinner. It’s a quick’n’dirty script to provide photos. It’s very simple and allows me to publish categories of pictures without a lot of effort. Source code’s at Codeberg.
My math is abandoning me. I started out with the design below, which can be used to tile a plane. My thought was that I would rotate the “blade-like” hexagonal elements, since their shapes mesh almost gear-like when rotated in opposite directions. Behind them, the pinwheels would also rotate in alternating directions.
Hexagonal-design with pinwheels and blade-like elements
It’s not hard to convert a hexagonal tiling into rectangle tiles that will evenly cover a plane. In this case, drawing a rectangle from the centers of the the blade-like elements at 2, 4, 8, and 10 o’clock will work. Ah, but not necessarily if the elements are rotating! The rotations won’t match up. I’d need to expand the pattern and cut a larger tile from the expanded pattern.
Of course, it also quickly became obvious that I need to consider it a triangular tiling, not the hexagonal tiling that was in my head. With a triangular tiling, I can’t have the blade-like elements rotating in opposite directions because you run into this problem:
Uh-oh! Odd number of elements can’t rotate in opposite directions.
Naturally, any odd-numbered circuit will have the same issue. But say we treat the center blade-like element from the initial design differently, and replace it with a different shape, say. The six elements around it could rotate in alternating directions.
Separate treatment of the hexagon’s center
You’ll no doubt see where this is going. With this design, I could tile the plane. But what if I wanted a variation of this where the center elements, different though they were, still rotated? I end up back with a variation on my triangle problem.
So after that, I briefly considered going back and altering the original design, but instead decided I didn’t want to animate it after all.
So, back in January, I posted about being back on my BS with geometry programs. Not too long after that, I think, I got distracted and changed focus and didn’t work on the code at all.
Well, in keeping with the idea that it’s better to do something half-assed than not do it at all, I’ve posted the code, such as it is. It’s a kaleidoscope-like thing written in Javascript, and outputs in SVG for all your re-use needs.
Some sample output
The programs flaws are many. It uses only line segments, not splines, so curves are not smooth. It doesn’t actually merge the line segments into continuous shapes, so the resultant SVG files are huge. And it’s written in Javascript, so in addition to all the mistakes I’ve made, it’s got bugs that may not even be mine.
Still, I think it’s fun to play with. Maybe one day, I’ll write code to merge the line segments, and possibly weave overlapping lines into knot patterns (which was the original intent). But for now, here it is: Tiler.
When designing visual stuff, I often would like the ability to create a patterned frame for whatever it is I’m doing. It’s not so much work to drag and move image tiles around to make a nice frame, but I wanted to make it easier.
Thus “Borderline” was born. It’s a JavaScript tool for laying out tiles into frame designs, with a few automated features to make playing around easier.
Click to enlarge
Borderline lets you arrange small SVG files to form a border. It optionally does some rotational and mirroring transforms to make the pattern look nice.
It includes a small collection of custom, original SVG tiles to use for making nice borders. You can also “upload” your own! (since this all takes place in your browser, nothing actually gets uploaded to a server or leaves your local machine).
Once you’re happy with your design, you can export the entire border as an SVG suitable for printing or modification in your favorite vector graphics application.
You should be able to use just about any SVG file as a tile, although if it’s too big or complicated your browser may run out of memory and behave badly.