Single Line Drawing of Hyperbolic Tiling

A recent post mentioned the Parakeet plugin for pattern creation, and when I checked it out I was pleased to find a component for creating hyperbolic tilings. I’ve loved these for a long time, but have never had the tools to create them in my quiver. My end goal is not to physically cut the tiles, but to be able to draw the tiling as a single path (no pen-ups). I understand this will include a lot of redundant tracing - but I was hoping the polygons would be ordered in a way that would make it easy to add the redundant steps to link each polygon to its neighbor along the path. Unfortunately, not the case:

From its appearance, the tiling should be ordered in a hierarchy of same-sized polygons, but the output of the component is a 1-branch list. Trying to order them in a way that will make the task of linking them into a single path has been a good learning exercise, but alas, I’m stuck. Any pointers / advice greatly appreciated! (15.7 KB)

I’ve seen something similar on this forum for creating cnc tool paths. It might have been a travelling salesman / shortest path type problem.

Perhaps search with these keywords and see what comes up.

I’m on a phone with an abysmal screen atm so I’ll leave the searching to you! :grin:

Thanks @martynjhogg - but I think in this case it’s the Chinese Postman Problem. TSP is about the shortest path between a bunch of cities, visiting each just once. The CPP is about travelling along every road in a city in order to deliver letters, with the least possible distance. I have tools to do both, and can use CPP to make a single line path of the tiling - but it usually does not cover the “roads” in the order I want it to :frowning_face:. I’m hoping that by being able to re-order the heptagons so that they form “rings” (like the cross section of a tree), I can then join them, each to the next, in a specific way.

Ah, OK. So you want to sort the polygons into branches by distance from the centre and then sort the branch lists by angle between -x vector and the vector from the centre to the polygon centre?

Or do you want to group them like this…

Sasquatch has a “Sort points by polar angle” that might be helpful, if you can sort your polygons into fewer branches (one per ring.) (35.5 KB)

Yes, exactly. And sorting by polar position will order them. And then sorting by local polar of points around each polygon,…
Here’s progress on grouping the polygons into rings, by distance from center instead of polygon length (I’ve got the polar sorting working, but it needs cleaning up): (13.9 KB)

Thanks! I didn’t know about Sasquatch. As soon as I had a better handle on the rings, I went right to sorting them by polar phi value. A few more steps to go, learning all the way…

Grouped by “rings” and sorted by angle: (25.5 KB)



Nice! Thanks - lots to learn from your approach!!

Easiest way to sort points by angle is to create a circle at the average of the points (their center), then feed the points and circle to a Sort Along Curve component. You can use the Indices output to sort your objects as I did above.

I was trying to group the rings by distance as you were, but it wasn’t working out as the polygons in each ring aren’t the same distance from center.

When I noticed the Step input to the Hyperbolic Tiling A component was making the rings grow outward, I decided to create multiple patterns and cull each with the previous pattern.


Went through your def piece by piece - great stuff to learn from! Feeding the step input a series, then culling to get the rings is brilliant. And that cluster will is super useful to add to my display abilities. One thing that didn’t make sense was the circles you used to order the polygons around their rings. When I looked, I could only find one (actually four unit circles on top of each other). The average of the centroids of the polys in each ring is very near 0,0,0. To get the average “ring circle” you’d have to take the average of their distances to the center:

But it’s cool to know you don’t actually need that - any single circle that is centered on the middle of the tiling can be used for all the ring poly ordering.

Next steps: moving down to vertex ordering, poly joining, and finally, ring joining. The way seems pretty clear - thanks again!

Spent way too much time on this, but it definitely helped a lot in my understanding of trees and their manipulation. Able to join all the polys in each ring, but just couldn’t quite get it to nail the ring-joining (so had to manually splice them).Thanks for the help @martynjhogg and @kev.r ! (24.9 KB)



1 Like

Very cool :+1: :+1: :+1: :+1: :+1:

I always like seeing real things that come from Rhino / Grasshopper designs.