Tag: fuse

  • 8 Amazing Ways Computer Science and Fiber Arts Align

    8 Amazing Ways Computer Science and Fiber Arts Align

    Photo by author

    You might wonder: “What do computer programming and fiber arts have in common?”

    Surprisingly, quite a lot. Even though they are traditionally viewed as worlds apart, fiber arts and technical fields share striking similarities. In this article, I explore how they align, and how these overlapping skills sit at the heart of an emerging educational and creative movement known as STEAM.

    Here are 8 ways these concepts merge:

    1.STEAM

    I recently came across a movement that brings these two topics together: STEAM. Which is all about encouraging interdisciplinary learning by mixing analytical skills with creative expression, and programming fits under that umbrella.

    In a similar way, mathematics and fiber arts have been connected by Mercer University’s own Dr. Carolyn Yackel. Carolyn, who coined the term “mathematical fiber arts”, has created intricate pieces like Temari balls. Her work shows how mathematical ideas can turn into something tangible and artistic. It’s a perfect example of how math fits within the STEAM framework, especially when it connects abstract concepts to traditional crafts.

    Dr. Yackel mainly focuses on the mathematical structures found in fiber arts. Building on that foundation, I’m exploring how math, coding, and fiber arts come together in STEAM, particularly with a focus on crochet.

    Several insightful blogs have already explored the connections between math, programming, and crochet, shedding light on ways these fields overlap. Many authors and bloggers have explored the connections between crochet, computer science, and math. One notable example is Kimberly McCarthy, who examines the links between mathematics and crochet through concepts like polar coordinates. Also, Mercedes Bernard delved into these topics in 2018–2019 in a blog post. These contributions are part of a broader conversation that highlights the alignment of these fields.

    However, despite this valuable groundwork, the topic remains relatively niche, emphasizing the interdisciplinary spirit of the STEAM movement.

    2. Problem-solving : the foundation of patterns

    Programming is about giving step-by-step instructions to a computer to achieve a specific outcome.

    Photo by Nykeya Paige on Unsplash

    Computer programming assesses gaps in markets to bring about better solutions and problem-solving. Both programming and crochet offer solutions to problems — only expressed in different formats: digital vs. material.

    Effective problem-solving often starts by asking the right questions. That way, helpful answers will arise. Projects existing under either category require asking such questions as:

    1. What problem needs solving?
    2. What is the objective?
    3. What are all the necessary components that will get me the answers I need for the final result (the objective)?

    Consider a pentagon: should it form a star or a five-petal flower? What distinguishes these shapes? What sets them apart in terms of shape or form?

    How can we approach the problem in a way that would render this flower or this star?

    Photo by Cherish

    The answer emerges through algorithmic thinking.

    Both programming and crochet revolve around designing step-by-step instructions to solve a problem — whether to display data on a screen or create a lace shawl. Both prioritize algorithmic stepping, but the only difference is that programming algorithms are more abstract, often yielding digital results. Meanwhile, crochet algorithms lead to concrete results in the form of finished accessories or garments.

    Fundamentally speaking, they‘re very similar. Although technical, programming requires the programmer to design code, whether for the functionality or appearance of an app. Any programming language can draw an object if it includes a mathematical library and graphical interface.

    3. Precision and attention to detail

    A crochet project often requires the maker to follow detailed instructions to make something, as a programmer does with code. Crochet patterns share similarities to programming syntax because both develop on logic and semantics.

    Design

    Design requires much analysis, trial, and error, and practice to get the intended effect of what a project requires. Crochet work can be very fickle about gauge. Minor inconsistencies in tension or stitch size can easily distort the final result. Sometimes, anything can throw off the final results from what was previously expected or intended.

    The same is true in programming! Just one misplaced character or a minor semantic error can cause a program to behave unexpectedly or altogether fail. It’s about knowing what parts are involved, how they interact, and how to navigate those different parts separately and as a whole.

    4. Creativity

    Despite this need for precision, both crochet and programming leave space for creativity.

    Photo by ameenfahmy on Unsplash

    Although computer programming is far more technical than any fiber art effort, designing code is still quite creative. Many computer applications are products of ideas that stem from a creative thought process. This concept serves as the foundation for many programming ideas coming to fruition.

    5. Mathematics

    Computer programming and crochet each rely on mathematics in different ways. Programming relies on mathematics for logical problem-solving, algorithms, and data structure. Crochet uses mathematical concepts like symmetry, geometry, and counting to create and shape patterns, ensuring precision and consistency in the final piece.

    How about rendering a rose shape?

    Roses and other floral shapes often exhibit symmetrical properties, particularly radial symmetry. Yolanda Savirama published a paper in 2011 discussing these properties. According to their findings, flowers and roses often exhibit symmetry, especially radial symmetry, where parts collect around a central axis.

    Photo by Author

    For a rose shape, what happens in one quadrant mirrors another. The symmetry of a rose represents the trigonometric polar functions, which show how patterns repeat across all four zones. Because this shape is mathematically complex, consulting mathematical tools is one of the most effective ways to model it.

    This is where the rose curve formula, r = a·cos(kθ), comes into play. I discuss this in more detail here.

    6. Debugging and tech editing

    While many have compared the logic of crochet patterns to programming syntax, the connection between tech editing and debugging is less frequently explored, but the similarities stand out.

    Tech editing

    That system is known as tech editing, a practice in the yarn world where patterns are reviewed line by line to ensure clarity and accuracy. The design phase of a crochet or knitting project is often the most critical since it lays the foundation for how the final piece turns out.

    Stepping (debugging)

    Tech editing examines every move made to ensure no errors affect future attempts to replicate the pattern. Similarly, a programmer employs a technique known as stepping. This debugging process has the programmer systematically go through the code line by line. In turn, the coder effectively assumes the role of a computer (or interpreter) to understand how each part executes. Programmers undergo this method to check where a code is hanging, throwing an exception, or may not be running at all.

    As a crocheter, I noticed this firsthand while designing a pattern. Earlier in this post, under Design, I mentioned issues with gauges while crocheting. Developing an original pattern can be immensely rewarding, but it can also be a fickle process that may result in a misplacement of stitches. Sometimes, a project requires that a gauge be followed closely. While other times, a project may not rely on a gauge to still work well.

    7. Repetition… repetition… repetition

    Also, crochet and knitting require a fair amount of counting, repetition, and looping. Only now is the actual looping mechanism carried out manually, without any shortcuts that a program usually has! Whenever the term repeat appears in a crochet pattern, that indicates repeating a step as many times as the pattern specifies.

    Showing the repetitive rhythm of a pattern.

    In both crochet and programming, repetition continues until a specific condition or pattern requirement gets met.

    Program Looping

    Writing programs often requires a fair amount of repetition. This repetition is accomplished by creating program loops. Loops help to draw out or expand upon baseline problems, repeat patterns, and render complex visual patterns for graphics. They streamline the process of repetition by avoiding having to manually re-declare statements or variables.

    Photo by author

    Every project that involves coding a framework for a game, desktop application, or mobile app follows a unique set of repetitive steps that shape these applications into what they will become.

    Here’s an example in Java that mimics the act of chaining stitches to make 22 double crochets(dcs).

    int steps = 22;
    
       System.out.println("Crochet Chain Instructions:n");
       System.out.println("1. Start with a slip knot on your hook.");
    
       for (int i = 1; i <= steps; i++) {
    
           System.out.println((i + 1) + ". Yarn over and pull through the loop on the hook. (Chain " + i + ")");
               
    }
    
          System.out.println("nYou have completed " + steps + " chains!");

    Repetition is what drives the sequential steps that bring a pattern to life. In crochet, this means building on a foundational row with repeating sequences that grow into the full length of the project.

    8. Community & collaboration

    Much like any professional career or hobby, these endeavors often lead to community gatherings centered around a specific interest. There’s a strong sense of community that abounds whenever there is a shared interest or work circulates. Just as someone might start a club for any other interests, such as a book club, a knitting circle, or a stamp collecting group, there’s always that dimension of sociability there.

    Photo by Nick Fewings on Unsplash

    People who are members of crochet communities and other clubs gather together for the purpose of exchanging ideas in the same way developers share ideas or insights through their communities. Comparatively, the collaborative nature of programming, where developers share code, contribute to open-source projects, and seek advice from peers is a prominent feature of these interests.

    Weaving in the ends

    Now that we are fastening off, “weaving in those loose ends,” so to speak, it’s the perfect time to zoom out and realize the bigger picture here. Initially, it may seem crochet and computer science are unrelated fields, but a closer look reveals how much they have in common. Anyone who is analytical, detail-oriented, or has strong problem-solving abilities may thrive at this intersection.

    When we recognize the common threads between programming and something as crafty as crochet, we understand how interconnected our skills are now. And the presence of STEAM further validates this idea. The next time you pick up a crochet hook or open a code editor, remember: both are acts of creativity. Both are changing the world.

    Follow for more insights happening at the crossroads of code and creativity, or leave a comment. I would love to hear your thoughts on this topic. : )

  • How to Master the Rose Algorithm: Demystifying Code Through Crochet Design

    How to Master the Rose Algorithm: Demystifying Code Through Crochet Design

    Using Crochet to Visually Explain the Rose Curve and Polar Coordinates

    Have you ever wondered what gives roses their compositional spiral-like patterns? For anyone who has pondered that, this article is for you! We set out to bridge the gap between mathematics and yarn crafts.

    Now, I definitely get it — Math can be challenging. There have been occasions where I’ve certainly needed time to wrap my head around what happens in different formulas or equations. But through some exploration, I’ve noticed there’s a connection between real-world items and their mathematical counterparts. By tapping into that connection, we can deepen our understanding of how this math works. This article explores how the rose formulas, r = a • cos(kθ) and r = a • sin(kθ), relate to programming and crochet practices. What follows is my own interpretation of these concepts.

    An in-depth exploration of the rose formula

    The topic of discussion for this post centers around the formula r=a⋅cos⁡(kθ). This formula is where trigonometry, geometry, and calculus meet, turning math into visual art. This visual art in turn reflects what happens in the rose applique crochet project.

    Blue and black crocheted roses.
    Photo by author

    The shape of roses is the work of mathematical systems called the polar equations and, as Yoland Savriama et al explains, radial symmetry. There are some commonalities. In 1987, Peter R. Maurer helped popularize the rose curve through a paper, A Rose is a Rose, published in The College Mathematics Journal. His article shows how rose curves can be constructed and explored mathematically, making these concepts more accessible and visually engaging.

    Comparing these concepts highlights their parallels to each other. Just like a crocheted flower begins with a magic ring at the center, the coded rose begins at the origin, which is the heart of the coordinate plane. With each loop that’s made in crochet, you build petals outward into spirals. Similarly, the loop in code uses angles and radii to plot points, spiraling out from the center mathematically. Both start at a central anchor and blossom from there — one with yarn, the other with math.

    It’s like mapping each stitch in a spiral based on the distance from the center (r) and then deciding its placement left/right and up/down using cosine and sine. You’re “stitching” each point mathematically!

    Visualizing the geometry of a rose

    You might notice my rose drawing has 14 petals, even though I used k = 7, which should generate just 7 petals for an odd number. That’s because I continued plotting the curve across two full rotations, from 0 to 4π radians.

    The rose curve doesn’t stop after one cycle. It loops back around and retraces the pattern. In this case, those repeated sweeps produced a second set of the same 7 petals (7 x 2), giving the appearance of 14 in total. It’s a great example of how mathematics builds layered beauty through repeated motion.

    Watch: Creating the rose curve infographic using Procreate!

    https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FLJsSDFVMU7Q%3Ffeature%3Doembed&display_name=YouTube&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DLJsSDFVMU7Q&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FLJsSDFVMU7Q%2Fhqdefault.jpg&type=text%2Fhtml&schema=youtube

    Now onto the different variables that make up the formula!

    Step 1: Deciding what all is needed — unpacking the basic formula

    1. First, we figure out our point of origin (starting point). When cos(kθ) = 0, you’re starting at the center of it all, and this is where every petal begins. Anything at r=0 is the starting point and hasn’t yet progressed outward. You may think of it as the core or nucleus of the rose. In crochet, the physical version of this would be a magic ring, chain space, or the point where all petals are gathered and spiraling outward.
    2. From there, we want to measure the distance from the center, which is what r(θ) = a × cos(kθ) measures.
    3. Now, we can look into what variable a represents here. It acts as a scaling factor that adjusts the overall size of the petals when it’s multiplied by the cos() function. It determines the maximum distance (amplitude) the petals reach from the center.
    4. Next, we want to determine the number of petals the rose will have. The number of petals is controlled by the variable k, which can be either even or odd. If k is an odd number, like k = 3, you’ll get exactly 3 petals. However, when k is even, the number of petals is doubled. So, if k = 2, that value would become 2 x 2 = 4.
    5. We also want to track the progression of the sinusoidal curve and how it will open up through the value of theta or θ. Theta is an angle.
    6. Mapping out the terrain for Cos() & Sin(). Now, we want to generate the petals from the shape of the waves formed on the Cartesian plane. So, we create curves using sin() and cos(). Think of the range from -1 to 1 as the amount of landscape (or terrain) available to the cos and sin functions on the Cartesian grid over which the two functions have full reign. This environment is the entire stretch of terrain they operate within — no peaks higher than 1, no valleys lower than -1. This limited but smooth terrain gives the rose its natural, wave-like rhythm as we sweep through each angle around the unit circle.

    Step 2: Setting up some variables

    Any programming language can work for this, but I chose Java, which uses the Processing framework. This language is a visual-friendly tool perfect for bringing math to life through visual code.

    float k = 2.6;      // Controls petal count: odd k = k petals, even k = 2k petals
    float a = 190;      // Controls size of the rose
    float theta = 1.5;  // Angle in radians (swept by the loop)
    float r = 70;       // Radius, recalculated in the loop

    Step 3: Coding the formula — pulling it all together

    Next, we map out the steps in the formula using computer code. We’re looking to determine how all the expressions within the formula work together to render the rose we want.

    The petal shapes in a rose curve are sculpted by trigonometric waves that originate from the unit circle. Though the petals themselves extend beyond or within the circle’s boundary, the rhythm and symmetry of their formation are deeply rooted in the same geometry, where cosine and sine define movement around a perfect circle.

    Step 4: Setting up the for loop

    1. You may ask, “What role does the for loop play here?”. Believe it or not, the for loop (or any loop, really) acts as a set of hands used to help shape, mold, and draw out all parts of the formula. It’s one component in the programming world that brings a dynamic quality to whatever it touches. This loop, in particular, helps our rose blossom by incorporating all the components of the equation to their highest visual potential. Simply put, the loop gives the equation dynamic behavior.
    2. The loop employs the value of theta to sweep through angles from 0 to 2π. If we think of r(θ) = a × cos(kθ) as our starting point, theta or θ helps the radius progress forward by tracing a path around the unit circle, one step at a time. Theta is driving the motion. Theta is an angle that helps the radius point to and travel in a specific direction.
    for(int theta =0; theta < TWO_PI*5; theta+=0.01){
    r = a*cos(theta); //r = a × cos(kθ).. tells you how far to reach out at each point.
    float x = r*cos(k * theta);
    float y = r*sin(theta);
    
    vertex(x,y);
     }
    

    On the other hand, a bigger step size ( like theta += 0.1) is much like using a looser hand tension, or fewer stitches. You can fill the circle quickly, but the result is not as detailed. So in both crochet and code, that fine control gives you elegance in the spiral.

    Think of theta += 0.01 as the kind of hand tension or motion you use to guide the crochet hook when crocheting or the steady stroke path you follow to create outlines while drawing. When your tension is tight and consistent, your stitches are smaller and closer together, resulting in a smoother, more uniform spiral. The value 0.01 places more points around the curve, just like adding more stitches in a round or row. Also, the 0.01 doesn’t scale the size of the loop or the rose directly. Instead, it controls how finely we step through angles (theta) between 0 and 2π.

    Step 5: Setting up the Cartesian polar coordinates, coding the formula

    Moreover, we also have to set up a few values corresponding to the portion of the Cartesian grid where our unit circle will sit. This is done by establishing x and y values, which represent the vertical (x) and horizontal (y) axes. These axes give us the space to plot coordinates and draw the rose curve.

    float x = r*cos(k * theta);
    float y = r*sin(k * theta);

    Then, we start coding the rest of the formula within the Processing programming environment. After assigning the initial values of x and y for our polar coordinates, we declare more variables, each one referencing how the formula is structured.

    Coding the Rose in Java with Processing

    // Rose formula: r = a cos(nθ) and r = a sin(nθ)

    float k = 2.6; // Controls petal count: odd k = k petals, even k = 2k petals
    float a = 190; // Controls size of the rose
    float theta = 1.5; // Angle in radians (swept by the loop)
    float r = 70; // Radius, recalculated in the loop

    void setup() {
    size(500, 500); // Set window size
    background(255); // White background
    translate(width / 2, height / 2); // Move origin to center
    noFill(); // No interior fill for the rose
    stroke(0); // Set stroke color (black)
    strokeWeight(1.5); // Optional: adjust line thickness

    beginShape();
    for (theta = 0; theta < TWO_PI * 15; theta += 0.01) {
    r = a * cos(theta); // Polar equation: distance from center
    float x = r * cos(k * theta); // Convert to Cartesian coordinates
    float y = r * sin(k * theta);
    vertex(x, y); // Add a point to the shape
    }
    endShape();
    }

    The above code produces the following output:

    This output is the closest to what I hoped to achieve in drawing this rose. Remember, though, that these were just the initial steps for getting our rose set up in the programming environment. You probably noticed how the rose appears layered but trapped in a flat, 2D space. If you seek a more advanced tutorial on adding more dimension to your version, I highly recommend exploring the work of Paul Nylander, who works extensively with mathematical art. I also suggest watching Kazuki Umeda’s series, parts one and two, to create rose shapes with p5.js!

    At this point, we have explored how the rose formula builds a spiral visually. While crochet patterns don’t numerically align with this equation, the shape and rhythm of the stitches often mirror the spirals defined by this mathematical function. So, if you’re crocheting for the first time, don’t worry. No math is required to complete most crochet projects! All you’ll need is to count your stitches as you go.

    Now, onto the crocheted part

    In the programming environment we just explored, theta acts like the guiding motion of a hand moving a crochet hook. Together with the for loop and the fine increment of 0.01, theta gradually carves out the rose shape, just as steady hand movements shape stitches in a pattern.

    Reconciling Dynamic Motion (Theta) with Linear Petal Construction

    Earlier, I mentioned how a magic ring corresponds to the point where cos(kθ) = 0 within the equation. A magic ring or chain space forming a loop would be ideal for most projects worked in the round. Well, for this project, the true beauty unfolds during the assembly of the rose. We would not use a looped space for this particular rose because it would not produce the same spiraled effect.

    Although the crocheted rose is crafted as a linear row of petals, adding each petal incrementally and then shaping them into a spiral at the end allows the shape to mimic the essence of the polar function. Rather than forming petals radially from the start, this version builds them one after another along a continuous row and only reveals its radial symmetry after the petals get coiled by hand.

    Photo by author

    Even though the rose starts as a flat row, this incremental buildup of petals still behaves like a plotted curve. One stitch at a time, one-directional change at a time, until a larger, more cohesive spiral shape forms. When you finally gather the petals into a center, you’ve pulled the row into a spiral, which mirrors how the cosine function compresses or expands radius values across angular intervals.

    • The center point (magic ring) r = 0 when cos(kθ) = 0.
    • Stitch repeats/petal count — k determines the number of petals.
    • Expanding outward in rings or spirals — increasing θ to draw more of the curve.
    • The petal shape from a series of shell cluster stitches all placed in one stitch — the wave-like form represents the cosine function.

    Rose Pattern

    Instructions for making the rose.

    The above picture shows the algorithm (instructions) for crocheting a coiled rose shape. You can do this using any crochet hook size or yarn weight of your choice.

    Final Thoughts

    All things considered, there’s a clear overlap between the abstract and the tangible. Mathematics, though often challenging, does a beautiful job of revealing how its principles are reflected in the natural world — including the physical shapes we create through fiber arts.

    If you’re a crocheter, coder, or math lover, you may want to give the rose curve a try and see what kind of result you can create.

    Thank you for reading!

    Feel free to leave a comment, share this post, or follow me for more explorations into the natural aspects of math. I’d love to hear what you think about this!

    References

    Savriama Y, Klingenberg CP. Beyond bilateral symmetry: geometric morphometric methods for any type of symmetry. BMC Evol Biol. 2011 Sep 29;11:280. doi: 10.1186/1471–2148–11–280. PMID: 21958045; PMCID: PMC3209460.

    Maurer, P. M. (1987). A Rose is a Rose… The American Mathematical Monthly, 94(7), 631–645. https://doi.org/10.2307/2322215