Digital Textile

For me sometimes it is more difficult speak or write about my work that write the code in the editor. This images represent my eagerness that I had to translate this textile pattern, in to the code. so this is it.

Thi first step was to find the correct data store to find the points. then I put all this points inside of an array and then create the curve. and for the other curves I did the same, searching the even and odd of every point.

I know there are a lot kind of patterns in the textile insdustri, and also my Grandmother know how to create with the crochet technics differents patterns, some of them with very complex estructures. If we thought that an algortihm is and a mathematic or aritmetic rule that is repeated, (Cecil Balmond, Informal, page 112), we will see that my grandmother and all the people who elaborate knitted fabric are actually programming an Algortihm.


  • rebeca Jun 12, 2008, 23:11

    this is really quite brilliant. i’ve been looking at algorithms for less than a year now and have begun working with 3-d programs at my college. I would really love to know what porgrams you use and if you have any recomendations on what kind of things i should research or practice because i want to work with algorithms but need a clear place to begin.

  • Carlos de la Barrera Jun 13, 2008, 21:52

    Hello Rebeca,

    these works are scheduled in RhinoVisualBasic, this language it’s pretty easy to use and ideal to start. Also there are a lot of source and tutorials in the web.

    take a look these pages =

    anything that I could help you, please feel free to ask.

    by the way nice sculptures.

  • Maurice Feb 20, 2009, 23:59

    I am trying to create weaving fabric in Grasshopper. Do you have some tricks for me, or maybe a code?

    that would be really helpfull.
    By the way, you did a really great job

    Thanks very much

  • carlos de la b Feb 21, 2009, 13:40

    Hello Maurice,

    Weaving is really simple: follow this pseudocode and all will be ok.
    In the case that you can’t get it, send me another message
    and I will look in my old box of remembers:

    1_ select a surface
    2_ analize the surface by points
    3_ store the points in an 2 dimentional array
    4_ pass with a nested loop for the 2D array
    5_ use the VBS “Mod” function to determine odd and even points over the surface.
    6_ calculate a vector from the surface in the point.
    7_ If i mod 2 = 0 then

    if j mod 2 = 0
    store the point
    store the vector
    end if


    if j mod 2 = 1
    store the vector
    store the point
    end if

    end if

    Before the loop is ending add a curve by the stored points and vectors

    8_ repeat the step 7 inverting i by j.

  • Alex Jul 22, 2011, 13:07

    Hello Carlos,
    i came across your site looking weaving algorithms.
    i use Maxscript though and i want to create a maxscript version and your “natural language” is i think very helpful. i just dont understand very clearly what exactly do you mean in step 4. could you give me further explanation ?
    thank you

  • carlos delab Jul 23, 2011, 2:15

    Hello Alex,

    Point 4:
    Since you analize a surface, you have to deal with an array of 2D. columns for U directions and rows for V directions, for example. And your array will have this form: arrpts[i][j];
    But your weaving cords works as strings, so you have to decompose your 2D array in columns for the cords in one direction and rows for the other directions.
    did you get it?


  • Alex Jul 23, 2011, 10:54

    i think that rhinoscript is passing the coords as strings but in maxscript they work as point3. so i think that it is not necessary for me right ? you actually create a curve with FirstPoint the point3 value of a point. and as SecondPoint the vector’s point3 value ?

  • carlos delab Jul 23, 2011, 11:41

    Hello Alex
    No, Points in Rhinoscript works as an array of three doubles, like this: Array(0.0,0.0,0.0), one for x,y,z
    All depends how do you have your array in this case works like this:

    ‘create the 2d array
    Dim arrPts(100, 100)

    For i = 0 to 100
    For j = 0 to 100

    ‘get the points at U – V parameters on the surface
    ‘save the points into the array
    arrPts(i,j) = UVPts ‘for example.


    Since now, you have your 2D array full of points over the surface.
    and now you have to go trough each column and each row creating the stripes.


  • Alex Jul 23, 2011, 12:54

    ok i think i got it. in case i have more questions will ask you again.
    thank you very much.

  • carlos delab Jul 23, 2011, 13:26

    you’re welcome,
    good luck, and when you have it, if you can, send me and Image.

  • Alex Aug 14, 2011, 16:44

    Hello Carlos,

    i finally managed to finish the code.
    it was a little bit more difficult than i expected because maxscript acts
    different from rhinoscript. so i invented a different algorithm.
    the code has some problems but i managed the
    weaving effect. here are some pics.


  • Alex Aug 14, 2011, 16:45

  • Alex Aug 14, 2011, 16:45

  • carlos delab Aug 16, 2011, 23:55

    Very nice Alex!!!
    thanks for share

  • Wassim May 3, 2012, 20:59


    Funny coincidence, I also wrote a script in MAXSCRIPT to create a weave on any NURBS surface. However, the difference is that my ‘weft’ is left straight and only the “warp” is undulating. I think it creates a nicer effect. What do you guys think?

    <a href=";

    <a href=";

  • Alex Jan 18, 2013, 20:31

    Hello Wassim, just saw your reply. Is there a chance that you post your code somewhere, or inbox ?

Leave a Reply