Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
The Hypnotic World of Degenerate Spirals (dogatekin.com)
226 points by thetrustworthy on May 9, 2021 | hide | past | favorite | 40 comments


So the degenerate part is taking a fixed sample of points no matter how big the spiral gets. The effect is like you're sampling at larger and larger scales, so you get to sample the structure of the spiral at larger and larger scales, and the diversity of patterns you see, is the visual representation of the spiral at these larger and larger scales through the lens of the sample you are taking. That's my explanation anyway.


Reminds me a bit about a recent blogpost about KSP: https://www.kerbalspaceprogram.com/dev-diaries/6509/. Basically they draw circles as a fixed amount of points as well, but if you zoom enough the circle becomes straight lines. With some work, they're drawing more points on the visible part of the circle as you zoom in.


In 3D rendering, this is what subdivision surfaces are about. As the camera moves closer, produce more triangles to keep the model appearing smooth. Cool stuff.


It's interesting, it's a bit like moire effect due to limited sampling resolution too.. I found the realization pretty profound (as a newb math guy)


Ah, relief. Thank you.


in the spirit of hypnotic -- a while ago I was searching SO on how to animate canvas elements using js. I fell down a bit of a rabbit hole and a few hours later ended up with this:

https://codepen.io/867-5309/full/xxqGmVM


Definitely entrancing! Each loop through gave some further interesting shapes. Thanks for posting.


Reminds me of moiré patterns.

https://en.m.wikipedia.org/wiki/Moiré_pattern

This is found in magic angle graphene, which will likely yield a Nobel Prize in a few years: https://www.quantamagazine.org/when-magic-is-seen-in-twisted...

I wonder if there is a connection to these spirals and their segmentation lengths…


Yep, I think the effect is basically caused by aliasing, much like the moiré effect. Very cool!


No aliasing is required. I was first introduced to moire patterns by a book with a bunch of line patterns, and a sheet of transparent plastic with other line patterns printed on it. Put the latter over the former, move it around, watch the weird effects.


Moire patterns are related to aliasing: the gap between the lines on the overlay is your sample frequency, the lines on the underlying page is your signal frequency, with the angle of the two sheets modifying the relative frequency and the offset of the sheets changing the phase.


Reminds me of Junju Ito’s manga, Uzumaki, a masterful horror piece which involves a town becoming consumed with spirals, anyone else read/seen it?


I've seen the film. Interesting atmosphere, digital effects are somewhat dated (think 90ies video), practical effect are fine. I am not a manga reader, so it may have flown over my head.

https://en.wikipedia.org/wiki/Uzumaki_(film)


I really enjoyed the post and yes immediately thought of Uzumaki. I think it’s my favorite thing that he’s done.


Wow, I wasn't expecting to find a reference to a horror manga in the comments of my post about (what I believed to be) innocuous spirals! That's amazing, although I'm too squeamish to try and read it!


He makes interesting horror stories. I don't usually like horror but I have read some of his work. Another one, by him, that has stuck with me is a bonus story of Gyo called The Enigma of Amigara Fault.


Cannot see spirals without thinking about Uzumaki. And by considering all his work, saying Junji Ito is a master of horror isn't an overstatement.


no but now I might :)

ps: how funny, your description reminded me of a nightmarish manga about a strange hole in a mountain, and .. it was by junji ito https://www.scaryforkids.com/enigma-of-amigara-fault/ (I forgot who the author was until right now)


Was just coming here to say this - probably a bit gory for some when it comes to body horror but very cool manga!


>In mathematics, a spiral is a curve which emanates from a point, moving farther away as it revolves around the point.

I'm surprised by that definition and always thought of a spiral as a curve with a monotonic signed-curvature function.

So, for example, the Euler/Cornu Spiral has a point of inflection where the curvature changes sign at the point of inflection, but the curvature increases continuously all the way from -infinity to + infinity as you travel along the length of the curve. So under my definition the whole Euler Spiral would count as a spiral, even though it stops revolving/emanating from a point just under 1/4 turn after the inflection point.

If you split a curve into segments at its curvature minimum and maximum points (vertices in the differential geometry sense [0]) then each segment has monotonic curvature and I'd define those as spiral segments. Vertices and monotonic curvature segments are preserved under inversion, which is mathematically useful.

In contrast, inflection points with zero curvature are not preserved under inversion. So the Euler spiral can be transformed by a suitable inversion to a curve like the one defined by Wikipedia, that is a curve emanating out from, for example, the origin.

Edit: just spotted this in the Wikipedia article on spirals 1]:

> Spirals which do not fit into this scheme of the first 5 examples:

> A Cornu spiral has two asymptotic points.

> The spiral of Theodorus is a polygon.

> The Fibonacci Spiral consists of a sequence of circle arcs.

> The involute of a circle looks like an Archimedean, but is not:

The Cornu spiral I've covered.

The spiral of Theodorus doesn't have a monotonic curvature function - it's a polygon approximation of the Archimedes Spiral, which does.

The Fibonacci Spiral's curvature function is a monotonic step-function.

The involute of a circle is a log-aesthetic curve, all of which have monotonic curvature functions. (The logarithmic spiral and the Euler spiral are also log-aesthetic curves.)

[0] https://en.wikipedia.org/wiki/Vertex_(curve)

[1] https://en.wikipedia.org/wiki/Spiral


Another curve to add to this (very nice) collection is the parallel curve of an Euler spiral. It's mathematically very similar to a circle involute, but with some nice and interesting properties of its own.


This is a beautiful example of how to teach math and computer science (or simply, introducing students to "programming" or "coding") at the same time.


Thanks a lot! I agree that there is great educational potential in this format. I've definitely learned some cool things myself from the posts at https://explorabl.es/


I find it interesting that the visualizations seem to cycle polygon complexity, from circles to squares to triangles and back again.


I found this very interesting too, and it actually has a great explanation! Maybe I should have even explored this side a bit deeper in the post itself.

Let's say the spiral has rotated 6000 degrees, and I'm approximating it with 100 points (one point every 60 degrees) and line segments. Well, a hexagon is nothing other than 6 points chosen 60 degrees apart from each other at the same distance from a central point, connected with straight lines. The same thing holds for a square at, e.g. 9000 degrees.

Check out these images to see what I mean: https://imgur.com/a/mvIVuch


These shapes in the spiral are explored and explained a bit in the classic Tesla spiral hoax too. https://www.conquermaths.com/news/post/index/395/The-Mystery...


Another fascinating video on the prime "arms" in the Ulam spiral.

https://www.youtube.com/watch?v=EK32jo7i5LQ


If you like this, you might also like: Belousov-Zhabotinsky reactions

https://www.youtube.com/watch?v=PpyKSRo8Iec

https://www.youtube.com/watch?v=kw9wF-GNjqs

They can form very neat patterns.


Yes you can model it with a diffusion equation.


Reminds me of Geiss winamp visualisations. Recently installed ProjectM on my Android TV device. Mesmerising.


After watching the animated spiral at top of the page for maybe 45 seconds, I scrolled to read the text -- and experienced an interesting aftereffect: alternate lines of text seemed to be moving in opposite directions. Trippy!


Ooh, and I got an optical illusion for free. After staring at the spiral for a bit the text then seemed to want to spin as well.


Oh wow I hadn't even noticed, but you're right!


Missed opportunity to title this article: “The Twisted World of Degenerate Spirals.”


Really wonderful.

Anyone who knows how to implement this with projectM, or GLSL?


Another example. http://gpu.pizza/#love


Thanks for sharing! I hadn't managed to find another good example "in the wild" so this is pretty cool. It's at a larger scale than my examples too!


Tangential, but I am curious. What is the embedded animation/player made of?


It's a great JavaScript library for creative coding called p5.js. Here is the code for one of the degenerate spirals in their web editor, which you can play around with: https://editor.p5js.org/dogatekin/sketches/utJunQyLi


Is this effect a version of signal aliasing?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: