Hi, how difficult would it be to create an algorithm that generate a braid like this: http://www.wikihow.com/Braid

I suppose one should compute 3 elicoidal paths for each hair?

**2**

# Braid algorithm

Started by Alessandro, Jul 13 2012 02:30 PM

8 replies to this topic

Sponsor:

###
#2
Moderators - Reputation: **7870**

Posted 13 July 2012 - 02:57 PM

My initial impression is that it's just three helices with 120 degrees phase shifts.

edit: Played a bit with it. It's almost three helices: the path for helix n is p

edit: Played a bit with it. It's almost three helices: the path for helix n is p

_{n}(t) = [t, sin(t*2*pi+phi), cos(t*4*pi+2*phi+pi/2)] where phi is 2*n*pi/6.
**Edited by Brother Bob, 13 July 2012 - 04:24 PM.**

###
#3
Crossbones+ - Reputation: **1616**

Posted 13 July 2012 - 04:25 PM

You can probably create an initial rough shape with the same topology and then smooth it out while constraining the distances between the three curves (so that you can construct tubes around the curves.

EDIT: This idea can be used to create more general braids. In this case, it's probably also possible to come up with an exact solution.

EDIT: This idea can be used to create more general braids. In this case, it's probably also possible to come up with an exact solution.

**Edited by apatriarca, 13 July 2012 - 05:02 PM.**

###
#4
Members - Reputation: **73**

Posted 14 July 2012 - 12:31 AM

My wild guess is to use Bezier curves.

It kinda reminds me, when I was a kid, I use to frequent a bakery, their specialty was a braided bread just like that one. Good times...

But anyways, I think you can find something useful out of Bezier curves for this.

Good luck

It kinda reminds me, when I was a kid, I use to frequent a bakery, their specialty was a braided bread just like that one. Good times...

But anyways, I think you can find something useful out of Bezier curves for this.

Good luck

###
#5
Crossbones+ - Reputation: **1511**

Posted 16 July 2012 - 03:37 AM

The path of each strand isn't a helix - when viewed along the length of the braid it's a figure-eight (remember when you make one you always lift the outer strand up before shifting it over back into the braid). So it could be constructed using this equation:

with a 120 degree phase shift for each strand, where t increases along the braid.

x(t) = a sin(t) y(t) = a sin(t) cos(t)

with a 120 degree phase shift for each strand, where t increases along the braid.