r/wheelbuild • u/squiresuzuki • Mar 14 '22
Wrote a quick script that generates random spoke patterns
6
u/aoris Mar 14 '22
/u/squiresuzuki have you seen this paper?
Using Evolutionary Multiobjective Optimization Algorithms to Evolve Lacing Patterns for Bicycle Wheels
Link to the paper:
https://ntnuopen.ntnu.no/ntnu-xmlui/bitstream/handle/11250/2353636/12250_FULLTEXT.pdf?sequence=1
Also, this is really cool:
3
u/squiresuzuki Mar 14 '22
Ha, so I found bicyclewheel.info / Matthew Ford's thesis just a few days ago, and I happen to be using a genetic algorithm in a separate project at the moment, so I had exactly that idea to use an EA + copy the calculations used by Ford. My thought after though (besides 3x likely being the best for 32h) was that, well, there aren't actually that many lacing patterns. I mean, you could generate a million lacing patterns as I did and just iterate them to find the best one pretty quickly. So I'm not sure the EA was all that necessary, and is probably worse because it doesn't guarantee the optimal solution is found. Unlike the unrelated project I'm using it in where there are an infinite number of solutions. But I'll have to give it a closer read.
1
u/Mats56 Jan 19 '24
I was searching for something else, and for some reason found my thesis cited here, heh.
You are right. EA is not needed for this problem. The point was however not to find good wheels, but to explore EAs in the context of physical problems where there are multiple constraints/tradeoffs (like weight, stiffness etc). So the application of which I tried to optimize was a bit arbitrary, I chose something bicycle related just for fun :)
1
u/squiresuzuki Jan 19 '24
Makes sense!
Love your bicyclewheel.info site. I've used it many times. Hope it never goes down -- maybe replace that python with in-browser js :)
1
1
6
u/squiresuzuki Mar 14 '22 edited Mar 14 '22
Writing a spoke length calculator that supports any viable spoke pattern, which can be defined as a symmetrical sequence of (direction, cross) pairs, that when repeated, maps 1:1 from the flange holes to rim holes. As far as I know, all current spoke calculators only support sequences up to two in length. For example, standard 3x would be ((leading, 3), (trailing, 3)).
I was curious to see how many reasonable spoke patterns exist (say, under 9 spokes long and under 5 crosses) and what they look like, so I made a quick tool that generates a random one and renders it.
Many of the patterns are reminiscent of known spoke patterns like Crow's Foot, Open Crow's Foot, n-push/n-pull, etc. But they're often interleaved with radial spokes. Technically I think there are patterns that aren't symmetric, but have radial spokes on the edges (for example, what I've seen referred to as Hybrid Crow's Foot), that still work. Or more generally, there are asymmetric patterns >= 9 spokes long that have symmetric sub-patterns which I haven't included.
In total, there are about ~1k spoke patterns that are viable (map 1:1), out of ~8k possible sequences (as defined above).
Note: in the video one side of the wheel is shown. Also, the shown spoke count is often quite high but most of the patterns work on lower spoke counts (as long as it's a multiple of the pattern length).