Started by Jul 13 2012 02:30 PM

,
8 replies to this topic

Posted 13 July 2012 - 02:30 PM

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?

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

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_{n}(t) = [t, sin(t*2*pi+phi), cos(t*4*pi+2*phi+pi/2)] where phi is 2*n*pi/6.

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

**Edited by Brother Bob, 13 July 2012 - 04:24 PM.**

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.**

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

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.

Posted 19 July 2012 - 10:53 AM

Thank you very much for all your suggestions, I'll try to code something next days and show what I can come up with. MrRowl, unfortunately the image with the equation doesn't show, would it be possible for you to post it again? Many thanks

Posted 19 July 2012 - 04:27 PM

Sorry about that - I guess it was a dynamically created image. I've edited the post now.

Posted 20 July 2012 - 03:34 AM

Thank you very much MrRowl. Just a clarification, the formula would be:

x(t) = a * sin(t)

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

Right? Where a is a constant value to give the braid some dimension.

x(t) = a * sin(t)

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

Right? Where a is a constant value to give the braid some dimension.

Posted 20 July 2012 - 03:46 AM

Right? Where a is a constant value to give the braid some dimension.

Yes.