Elektrine
Log in Register
Paige Chat Timeline Gallery Friends Email Drive DNS Private DNS Domains VPN Kairo Nerve
Remote

Craig S. Kaplan

@csk@mathstodon.xyz
mastodon 4.7.2
  • Open on mathstodon.xyz

Mathematics, Computer Science, Art, Design, Music, Soup, Pedantry. he/him/anything

1886 Followers
141 Following
41 Posts
Joined June 19, 2017
Academic:
https://cs.uwaterloo.ca/~csk/
Personal:
https://isohedral.ca/
Bridges:
https://www.bridgesmathart.org/
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 7mo ago

In my online undergraduate P5.js course, students are about to begin the module on motion and physics, including a bit of physics simulation using Matter.js. It suddenly occurred to me that I had never seen anybody put together this particular demo before, and I realized it had to be done. Messy source code at https://editor.p5js.org/isohedral/full/vJa5RiZWs.

editor.p5js.org

p5.js Web Editor

A web editor for p5.js, a JavaScript library with the goal of making coding accessible to artists, designers, educators, and beginners.

1487
55
1175
7
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 7mo ago

In my online undergraduate P5.js course, students are about to begin the module on motion and physics, including a bit of physics simulation using Matter.js. It suddenly occurred to me that I had never seen anybody put together this particular demo before, and I realized it had to be done. Messy source code at https://editor.p5js.org/isohedral/full/vJa5RiZWs.

editor.p5js.org

p5.js Web Editor

A web editor for p5.js, a JavaScript library with the goal of making coding accessible to artists, designers, educators, and beginners.

1472
0
1242
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 4w ago

Everyone's droning on about the ability of AI to solve millennium prize problems in mathematics, etc., etc. But not enough people are talking about using AI to draw Islamic Geometric Patterns.

I created the first version of Taprats as a class project around 1998/1999. I wrote it in Java, which means that it's almost impossible for anybody to use it these days (and it's quite janky in any case). But David Bachmann recently fed my papers into ChatGPT and came out with a completely serviceable web-based app for drawing patterns. Might be fun to play around with: https://davbachman.github.io/Topkapi/.

davbachman.github.io
12
0
4
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 5mo ago
Replying to
Obviously that deserves an explanation. In my early years of teaching our computer graphics course, we would often make an end-of-term t-shirt featuring student projects. We'd include an image of the prof somewhere. This was Spring 2003; I appear in Neo drag, doing a Bullet Time maneuver (Matrix Reloaded had just come out). In the early 2020s we were cleaning up the lab and got rid of extras of old t-shirts we still had lying around. We left them in a hallway somewhere. A random first-year engineering undergrad (who was born in 2003, ha) grabbed one. By chance, he wore it to go rock climbing yesterday. I'd like to thank him for making life a little more surreal. [edit: dug the t-shirt image out of the memory hole]
48
2
16
1
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 5mo ago
Replying to
The construction involves defining a fractal colouring of the plane, and sampling from the fractal using points in a lattice (the vertices of a tiling by equilateral triangles). @pieter@mathstodon.xyz asked about visualizing the result of sliding the lattice relative to the fractal, which should cause whole sections of the tiling to "flip" from one configuration to another as collections of sample points move from one region of the fractal into another (like Conway Worms in the Penrose tiling). Here's a visualization of that on a very zoomed-out tiling. It's neat! (It also looks slightly glitchy, which might be an inevitable consequence of floating-point error.)
11
0
2
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 5mo ago
Replying to
Also, this is somewhat more specialized, but here's a first draft (with no documentation) that draws just the Markov partition itself: https://www.shadertoy.com/view/s3lGDM
shadertoy.com
8
3
2
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 7mo ago

Wow, I'm glad the internet enjoyed my silly demo so much. As I mentioned elsewhere, I tip my hat to the people who responded with their past implementations of the same idea.

I wish the students in my undergraduate P5.js course were as enthusiastic about this material as all of you 🙃

15
0
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 5mo ago

In the past few years, spicy topokki chips from Korea have become one of my favourite snack foods. They're the perfect blend of sweet, spice, salt, and crunchy. They're also very hard to get in my part of the world. Needless to say, that just makes them even more delicious.

6
4
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 5mo ago
Replying to
@simontatham@hachyderm.io @pieter@mathstodon.xyz Yes, that's clearly the case! The GPU implementation is necessarily a numerical approximation of an idealized algorithm that would produce perfect information in a computational model with real numbers. Finite precision means that some samples close to the border of the fractal will accidentally be mis-classified, giving you incorrect or missing tiles. And I don't think you even have to go very far from the origin to see that (in fact, I'm hiding some of those errors by choosing a starting translation that avoids them). In principle I think you can implement the whole algorithm with exact arithmetic in something like the rational numbers extended by sqrt(3) and sqrt(5). In that case you'd need bignums, you'd definitely be on the CPU and not the GPU, and it would be slow, but the only true limit would be your computer's memory.
4
8
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 6mo ago
Replying to
@Danpiker@mathstodon.xyz I've seen still images (and animations?) of these sorts of arrangements of squares for a while now, and I still don't believe they're possible.
4
2
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 7mo ago
Replying to
@robinhouston Yeah, it's really making the rounds! I must tip my hat to the people who came over to show their earlier demos of the same idea -- it really was hard to believe that nobody had thought to do this before.
4
0
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 13mo ago
Replying to
Fun fact (which I may have posted online previously?). As a grad student, I had to borrow a copy of Heesch and Kienzle's 1963 book _Flächenschluss_ via interlibrary loan. In the early 2000s I managed to snag my own copy. It has an interesting lineage, as you can see from the previous owner's scribblings on the title page.
10
3
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 7mo ago
Replying to
@rolandog @Humus Pull Request: The Game
2
0
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 5mo ago
Replying to
@Number_Cruncher@mathstodon.xyz Cool! You can also move the dual grid in the shader by modifying the SHIFT_SPEED constant near the top of the source code.
1
1
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 5mo ago
Replying to
@tiotasram@kolektiva.social @pieter@mathstodon.xyz That sounds similar to the method that @simontatham@hachyderm.io has presented. He discusses it on his blog starting at https://www.chiark.greenend.org.uk/~sgtatham/quasiblog/aperiodic-tilings/ (I don't know if you have the same method in mind, but I believe Simon's would indeed require logarithmic time and space for the tiles you draw.)
chiark.greenend.org.uk
1
3
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 5mo ago
Replying to
@pieter@mathstodon.xyz I think I went through a very similar train of thought. Selinger's construction ultimately produces the fractal as a union of disjoint triangles, and you can iteratively descend through levels of substitution, bailing out early if you ever reach a "definitely inside" or "definitely outside" sub-region. But I boringly iterate over ever smaller quadrilaterals, rather than inverse-transforming the sample point relative to fixed shapes (I agree that both directions will probably work fine).
1
0
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 5mo ago
Replying to
@simontatham@hachyderm.io @pieter@mathstodon.xyz Reflecting on this further, I suppose it's more accurate to say that the algorithm emphatically *does* require constant time per pixel, but that it's sometimes wrong. That's just your basic computational trade-off; for some applications of hat tilings (whatever those may be), it's perfectly adequate and perhaps even desirable.
1
2
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 7mo ago
Replying to
@nanma80@mathstodon.xyz @henryseg@mathstodon.xyz @hallunke23@troet.cafe Calling it a "nazi symbol" does not further Henry's goal of mathematical artists reclaiming it. "Swastika" is a perfectly nice Sanskrit word meaning "well-being and good fortune" (notwithstanding its loathsome historical associations).
2
5
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 7mo ago
Replying to
@nanma80@mathstodon.xyz @henryseg@mathstodon.xyz @hallunke23@troet.cafe The rehabilitation of the word might also have been smoother had it been a little more Bouba and a little less Kiki...
2
2
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 7mo ago
Replying to
@geoffl @christianp For the record this was my first try. But as it got harder I wiped the screen, then took off my glasses, then turned up my iPad's brightness, then turned off the room lights and completed it in the dark. I think the test would be harder if the dividing line could have any orientation, not just vertical. That would undermine a strategy based on scanning slowly across the screen.
1
0
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 7mo ago
Replying to
@lenaschimmel That's amazing, thanks!
1
0
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 7mo ago
Replying to
@bloody_albatross If we're talking about improving the code, then I'd be more interested in the question of how to get a stable tower to stand up in a physics sim without bouncing all over the place and collapsing spontaneously. In this demo I use a cheap hack of freezing all the blocks until you actually click on one of them. Presumably it's really hard to get this working correctly (cc @topher_batty)
1
3
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 7mo ago
Replying to
@nanma80@mathstodon.xyz @henryseg@mathstodon.xyz @hallunke23@troet.cafe Ah, fair enough. I'll have to think about whether we can distinguish the two orientations without invoking nazis. My first thought was swasticwa and swasticcwa, but that's fairly awkward (and still ambiguous) (and silly).
1
0
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 7mo ago
Replying to
@simontatham Needless to say, it would be interesting to find a physical phenomenon that can be measured in square kilowatts.
1
2
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 8mo ago
Replying to
@doctroid In fact, the process was more complicated than that. As I understand it, they were making a more superficial movie and had gotten to a scene in which Bill Murray's character starts trashing his hotel room in a frenzy. Harold Ramis basically stopped production on the spot and declared that they were making the wrong movie. He had to fight to get more time and budget to turn it into the movie we ended up with.
1
0
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 43mo ago
Replying to
@seav @henryseg @jsm28 Not peer reviewed yet, sorry. We just submitted it. But we were too excited about it not to share!
8
0
1
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 43mo ago
Replying to
@Wherearemykeys @henryseg @jsm28 One excellent starting point would be Robert Fathauer's book _Tessellations: Mathematics, Art, and Recreation_. Slightly more advanced (but still accessible) is Colin Adams's new book _The Tiling Book_.
2
1
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 5mo ago
Replying to
@plragde@mstdn.social I occasionally stop by the place on Krug on a whim, but they only had them once. T&T used to have them in stock about once a year. I live right by there, so I've developed the bad habit of checking obsessively just in case (but: they also carry St. Viatur bagels, so my visit isn't always completely futile). I don't know Koreatown well enough to know where to look.
0
2
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 5mo ago
Replying to
@rreusser Gorgeous! I’m not totally sure what I’m looking at here. Is this a pan and zoom over a single tiling, or are you sneakily stitching multiple tilings together? I’ll be curious to hear the whole story later.
0
1
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 8mo ago
Replying to
@echoparallax Well, I remember telling you to consider UWaterloo for university, so 11 sounds about right. I was probably at one or two other G4Gs in that era, but I don't remember which ones. I don't remember that Holman stunt, for example.
0
0
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 7mo ago
Replying to
@piggo @simontatham Sorry, not just Japan. CJK stands for “Chinese, Japanese, Korean”, naturally.
0
0
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 13mo ago
Replying to
@olafdf@mathstodon.xyz I only started grad school in 1996 and probably didn't borrow a copy of this book until 2000 or later, so it must have been somebody else. (By the way, a student and I have been looking at your 2003 article; perhaps we'll be in touch at some point.)
0
2
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 7mo ago
Replying to
@tonwood@mathstodon.xyz @nanma80@mathstodon.xyz @henryseg@mathstodon.xyz @hallunke23@troet.cafe It's "A in spite of B".
0
0
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 5mo ago
Replying to
@simontatham@hachyderm.io @pieter@mathstodon.xyz This does leave open the possibility that you can choose one specific offset between the lattice and the fractal, and perform the sampling process more robustly in that specific case. I'm choosing that offset more or less at random, but there may be good specific choices. (In reality the choice is essential, since the technique requires that no lattice points lie on the boundary of the fractal.)
0
1
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 8mo ago
Replying to
@echoparallax Ha, add that to the list of people I know from the Files. I didn't know Seckel particularly well, but I met him a couple of times (G4G5, I think?). He was a curious character. Years later (perhaps after I learned he had passed away) I read this exposé about him: https://www.tabletmag.com/sections/news/articles/the-illusionist-al-seckel Come to think of it, I think you and I met at G4G11, right?
tabletmag.com
0
2
0
0
Open post
Craig S. Kaplan @csk@mathstodon.xyz
· 7mo ago
Replying to
@christianp 0.0027. Had to work for it, though.
0
6
0
0
Back
313k7r1n3
Elektrine

Tor hidden service

elekhj7afj4qnrr4yd3bkzslsyo5jgfxw3orgjkhlcxifueodybyiiad.onion

I2P eepsite

j6b6cyk6gjmepjih7jjadxgxvvf3lzzujljuu2v4biemzpg3naya.b32.i2p

Platform

  • Email
  • Chat
  • Timeline
  • VPN
  • DNS

Company

  • About
  • Contact
  • FAQ
  • Lite (no JS)

Legal

  • Terms of Service
  • Privacy Policy
  • Transparency Report
  • Report Abuse
  • Warrant Canary
  • VPN Policy

Support

  • support@elektrine.com
  • Report Security Issue
Mail client setup IMAP mail.elektrine.com:993 POP3 mail.elektrine.com:995 SMTP mail.elektrine.com:465
© 2026 Elektrine. All rights reserved. Server: 19:03:22 UTC