Hacker News new | past | comments | ask | show | jobs | submit login
Generating SVG for the prime knots (prideout.net)
230 points by prideout on Jan 11, 2024 | hide | past | favorite | 26 comments



Very cool. I have been trying to do something similar with tilings, but there is more information to be encoded. I am targeting something similar to the ability to render the tessellation catalog [1] and perform searches. Turns out there are multiple notations, and most of them use some level of implied knowledge. Also seems like rendering of knots is more open ended, while tilings are essentially their rendering. But they all do use a similar approach of Notation > Half Edge Data Structure > Render.

[1] https://zenorogue.github.io/tes-catalog/?c=


Not sure I learned anything about "Knot Theory" from playing this, but that was fun. Knot theory game: https://knots.netlify.app


There's some fun stuff here (I'm reminded of the algorithms used to render planar drawings of proteins, which are similar to knots).

My real interest which I haven't seen much literature about is generating real-world knots that have good properties. For example if you look at the various knots, some knots have nice properties like "easy to untie" and "does not get tighter under load", which has huge impacts. These properties derive from the topology but also the physics of the knot. Would be nice to find a new hitch knot that worked better.


> I'm reminded of the algorithms used to render planar drawings of proteins, which are similar to knots

Yes, like the PTGL - https://bio.tools/ptgl - or, er, TOPS diagrams. The main relationship to knot diagrams is really the chirality of beta-alpha-beta motifs (the majority of which are right handed).


Thanks! I was searching for this citation to include in my comment: https://www.cambridge.org/core/journals/protein-science/arti...

(I have no idea how my brain can remember a paper from 20+ years ago but not enough to find it in the literature)


Mathematics has probably already classified all knots that are human tieable. So from there you could iterate these knots in different physical positions, and perform different tests on them. The topological space has been investigated, now you need to decide between a teacup and a doughnut. This would be a mechanical engineering question, not a math question. Maybe look elsewhere?


math knots and real knots aren't the same thing and I don't think all possible human tieable knots have been enumerated and classified although I am happy to be pointed to evidence.

Math knots embed circles while real knots are typically made with free ended ropes (although some knots are not). Math knots ignore friction and the width of the rope; real knots can't ignore friction and the width (and other phyhsical properties) matter. See the comment in this article https://en.wikipedia.org/wiki/Overhand_knot

While researching my answer I found out there's a term for what I wanted to do, https://en.wikipedia.org/wiki/Physical_knot_theory

I've had this discussion with mathematicians a few times now and they don't see the difference, so maybe I'm just missing something important.


A knot with free ends can be turned into an embedded circle by connecting the ends far away from the knot. That's why they share a classification scheme.


A lot of knot books and websites provide property-based classifications.


Yes. my goal would be to identify those properties from 3d models of knots, and a mechanism to generate plausible 3d models.


The general properties of knot categories are already known. Real world factors such as the diameter of the line, its mechanical properties and environmental considerations (eg. presence of powder/dust, oil, rain, etc.) will significantly affect the actual deployment properties of a given knot. In addition, there are infinite places within a given knot that forces can be applied. Lines will also degrade over time, and factors such as complexity, time and fingers/hands/tools required-to-reliably tie/untie will also often be practical concerns in selection for deployment. Therefore, while your interest in the algorithmic exploration is interesting, if the goal is to generate novel practical results then there is a lot more complexity to add to the modeling before a useful result might be obtained, and any such result would have to be clearly based in assumptions around deployment scenario.


Sure. you're not telling me (a person who used to model knots in proteins using molecular dynamics, and works with FEA and other mechanical engineering tools) anything really novel.

Humans discovered hundreds of knots just playing around, and developed excellent knots in the past 400 years; new knots, never before tied, were invented some ~100 years ago. One imagines that a bit of searching with a computer might find a few cases that were overlooked.

For example, take a look at https://en.wikipedia.org/wiki/Butterfly_loop and https://en.wikipedia.org/wiki/Butterfly_bend and https://en.wikipedia.org/wiki/Hunter%27s_bend and https://en.wikipedia.org/wiki/The_Ashley_Book_of_Knots


> new knots, never before tied, were invented some ~100 years ago.

No. I don't believe that. The archeological record has evidence of humans making rope for tens of thousands of years. I can believe that nobody alive had seen and named those particular interlocked pairs of overhand knots; that no written record of them existed until recently. But your claim that those knots had never been tied is quite presumptuous.


OK, well go and do "a bit of searching with a computer" and let us know your novel results ignoring practical constraints, then.


Neat visualization. I noticed though that the images (when enlarged) have some awkward angles etc to them, they are not super rounded and smooth shapes... maybe the width modulation could use some easing or interpolation or something?


I feel like that would be nice. It also might be nice to have a slight change in hue over the length of the knot, so that there is more contrast on crossings and things are a little clearer.


As a knotable person myself, this is AMAZING.

Some thoughts on application of this knowledge would be to look at the patterns as you have described as cross-sections of rope weaving with the circular looming as the individual bobbins/spinny-things in an industrial loom - so rather that just woven-sheeth and full spin style cabling, one might achieve some really incredible properties in the woven elements along a axis such as these represent.

Especially if you further differentiate btwn material and woven state (Are you weaving in an already spun set of filiments? What are the materials for the various inputs, and even further - imagine you have a set of elements in the loom where youre certain threads are the static, more rigid scaffold - like woven titanium strands which then feed into another loom which is weaving in the kevlar or other materials including a core of optics which is protected by the outer woven sheath from these patterns of 2D knots stretched out along an axis - certain elements can be printed such like the articulating spine of a snake.

It could make a machinable-high-tensile strength cable with an optical core with protected turn radii (titanium snake spine)

See here for reference to advanced cabling:

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



Also known as the 'true lovers knot' I believe:

https://en.wikipedia.org/wiki/True_lover%27s_knot

(It isn't the smallest non-alternating knot. This page says 8_19 is the smallest. https://mathworld.wolfram.com/NonalternatingKnot.html)


How is it feasible to have a .svg file that has links to other .SVG files? https://prideout.net/blog/svg_knots/knottable_v1.svg. Has this capacity been around for some time?


You can have <a href="..."> links inside an SVG. It's been there since the first SVG standard back in 2001: https://www.w3.org/TR/2001/REC-SVG-20010904/linking.html


Thanks for the info, I honestly didn't know and didn't have time to search today.


The unknot isn't a prime knot for the same reason that 1 isn't a prime number.


Yes. Alas, mathematicians not in number theory tend to have p-ness envy.

A more troubling example of imposing this world view is decomposing 3-manifolds, where people like to think of S^1 x S^2 as prime. This only makes sense as a form of respect for one's elders.

One constructs 3-manifolds by gluing irreducible manifolds together after cutting out balls; one needs S^3 itself to express self-loops in this gluing graph, if there are no other pieces. S^1 x S^2 is S^3 with one self-loop. But the interest is in the pieces, not the graph (which can be freely reorganized), unless one aspires to be a number theorist.


I've never studied knots, but understanding the algorithms used here seems like a really good starting point.


Very nice work Philip.

It’s so satisfying, I wish I knew an easy way to explain why.




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

Search: