String Art simulation, CNC, Blender 3D — Transcript

Learn how to create CNC string art using an algorithm, custom hardware, and Blender simulation for realistic previews.

Key Takeaways

  • String art can be algorithmically generated by minimizing pixel differences between a target image and the string layout.
  • Custom hardware like CNC machines can automate the drilling and threading process for complex string art.
  • Simulation in Blender helps visualize the final string art before physical creation.
  • Software tools simplify the design and optimization process, making string art creation accessible.
  • Polar/circular string art has design limitations compared to more versatile linear string art methods.

Summary

  • The video explains an algorithm that recreates grayscale images as string art using nails and strings on a white canvas.
  • The process involves calculating pixel differences between the target image and the current string art to iteratively improve the design.
  • Imaginary nails are placed on the canvas, and lines are drawn between nails within a specified range to minimize image difference.
  • Software developed for this project automates drilling and threading plans and generates simulation data for Blender.
  • A custom CNC machine with a 500x500 mm work area was built to drill holes and assist in threading the string art.
  • The threading mechanism is designed with a springy feeder tube to navigate nails smoothly and avoid damage.
  • The video sponsor, PCBWay, offers PCB manufacturing and other fabrication services with special holiday promotions.
  • The creator contrasts this linear string art approach with polar/circular string art, highlighting its limitations.
  • The CNC controller software used is Candle, which is free and supports standard CNC tasks.
  • Blender simulation files and CNC software details are available on GitHub for viewers to experiment with.

Full Transcript — Download SRT & Markdown

00:01
Speaker A
In this video, I'm going to show you how I create string art and reveal the secrets behind it. This technique is a fascinating way to turn an image into art using just nails and strings. The working principle of the algorithm is quite simple, so bear with me. I will attempt to explain it now. First, we will need a grayscale target image that we want to recreate. Besides that, a blank white canvas where the algorithm will draw our strings. As the first step, we calculate the difference between the images pixel by pixel. This is done by subtracting the pixel intensity values of the two images at the same index, taking their absolute value, and then summing them up. As a result, we obtain an integer that serves as the baseline for measuring improvements as strings are added. Then, we will need to place a couple of hundred imaginary nails on our canvas like this. A grid arrangement is not the most sophisticated, but it will be good enough for now. Next, we select a random nail as the starting position. From the starting nail, we draw a line to one of the neighboring nails within a specified range. This range represents the maximum allowed length for any single string segment. Since this is an iterative process, at each step we repeatedly draw a line from the current nail to a neighboring nail, recalculate the difference between the images, divide the result by the corresponding line length, and store the result. When no valid nail positions remain within the range, we evaluate the stored results by selecting the nail that minimizes the difference compared to our baseline value. Now that we have the second nail, we simply update our baseline value to the current one and repeat the iterations until no further improvements can be made. And that's basically it. But of course, the devil is in the details. The result can be significantly improved, for example, by positioning the nails in a way that better resembles the original image. At one point, my friend joined the project and took on the task of developing the software while I focused on building the hardware. Speaking of the software, it's plain and simple to use. We just load an image, specify the dimensions of the target string art, set the nail count, and hit optimize. The software generates the drilling and thread plans as well as the simulation data. We also created a Blender project that utilizes the simulation data to create ray-traced images and videos. This way, we can get an idea of how our string art will look in reality. To bring all this to life, I had to build a CNC machine specifically for creating string art. There's a separate video you can watch that explains how I made it. The maximum work area of the machine is 500 by 500 millimeters. Once the workboard was securely mounted in the machine, I began running the drilling program. This process took approximately 50 minutes to complete. Then, I had to clean the sawdust off the board. The most exhausting part came next, where I had to hammer 500 nails into the pre-drilled holes. I have 3D printed a small tool that won't let the nail go deeper into the workboard than needed. Some of the nails had imperfections, so I had to straighten them before continuing. This is the result of two and a half hours of hammering. After this, I needed to set up the CNC machine for the threading work. I admit that I over-engineered the thread supply mechanism. However, I wanted to ensure that nothing would be damaged in case of a collision. Before we find out what's happening next, it's time for a quick ad from the video sponsor, which is PCBWay. PCBWay is a one-stop shop for PCB manufacturing, assembly, and other types of manufacturing services, including CNC machining, sheet metal fabrication, 3D printing, and injection molding. This December, PCBWay is spreading the holiday spirit with their special Christmas event running from December 12th to December 31st, which includes free coupons to save on your next PCB project, a free prototype for Christmas-themed design, and if you have shopped with PCBWay before, you get two chances to open their exciting mystery boxes. Visit PCBWay.com and take advantage of these festive offers before they're gone. I put the link in the description. And now the threading process begins. It's incredibly satisfying to watch as the design gradually takes shape. The feeder tube glides nicely around the nails with precision. Occasionally, it may brush against a nail, but the springy design of the feeder ensures it can handle these minor interactions with ease. Another type of string art, often referred to as polar or circular, is less favored by us due to its inherent limitations. One significant drawback of circular string art is the inability to freely place nails and strings in areas that would solely enhance the design. Additionally, the strings often have to span across the entire circle, limiting finer control over the placement and contributing details. It's more beneficial to have a versatile machine capable of handling standard CNC tasks as well. By the way, the CNC controller software we use is called Candle, and it's completely free. If you would like to experiment with the Blender simulation, you can download the files from my GitHub. The link is in the description. Finally, I encourage you to leave a comment if you have any questions. Please don't forget to drop a like and subscribe to the channel so you won't miss my upcoming videos. Thank you for watching, and I will see you in the next one.
00:13
Speaker A
quite simple so bear with me I will attempt to explain it now first we will need a grayscale Target image that we want to recreate besides that a blank white canvas where the algorithm will draw our strings as the first step we
00:25
Speaker A
calculate the difference between the images pixel by pixel this is done by subtracting the Pix intensity values of the two images at the same index taking their absolute value and then summing them up as a result we obtain an integer
00:39
Speaker A
that serves as the Baseline for measuring improvements as strings are added then we will need to place a couple of hundred imaginary Nails on our canvas like this a grid Arrangement is not the most sophisticated but it will
00:50
Speaker A
be good enough for now next we select a random nail as the starting position from the starting nail we draw a line to one of the neighboring Nails within a specified range this range represents the maximum allowed length for any
01:02
Speaker A
single string segment since this is an iterative process at each step we repeatedly draw a line from the current nail to a neighboring nail recalculate the difference between the images divide the result by the corresponding line length and store the result when no
01:17
Speaker A
valid nail positions remain within the range we evaluate the stored results by selecting the nail that minimizes the difference compared to our Baseline value now that we have the second nail we simply update our Baseline value to the current one and repeat the
01:29
Speaker A
iterations until no further improvements can be made and that's basically it but of course the devil is in the details the result can be significantly improved for example by positioning the nails in a way that better resembles the original
01:42
Speaker A
image at one point my friend joined the project and took on the task of developing the software while I focused on building the hardware speaking of the software it's plain and simple to use we just load an image specify the
01:54
Speaker A
dimensions of the Target string art set the nail count and hit optimize the software generates the drilling and thread plans as well as the simulation data we also created a blender project that utilizes the simulation data to create R traced images and videos this
02:08
Speaker A
way we can get an idea of how our string art will look in reality to bring all this to life I had to build a CNC machine specifically for creating string art there's a separate video you can watch that explains how I made it the
02:21
Speaker A
maximum work area of the machine is 500x 500 mm once the workboard was securely mounted in the machine I began running the drilling program this process took approximately 50 minutes to complete then I had to clean the sawdust off the
02:35
Speaker A
board the most exhausting part came next where I had to hammer 500 Nails into the pre-drilled holes I have 3D printed a small tool that won't let the nail go deeper into the workboard than needed some of the nails had imperfections so I
02:49
Speaker A
had to straighten them before continuing this is the result of 2 and 1 half hours of hammering after this I needed to set up the CNC machine for the threading work I admit that I over-engineered the thread Supply
03:06
Speaker A
mechanism however I wanted to ensure that nothing would be damaged in case of a collision before we find out what's happening next it's time for a quick Ed from the video sponsor which is PCB way PCB way is a One-Stop shop for PCB
03:19
Speaker A
manufacturing assembly and other types of manufacturing services including CNC Machining sheet metal fabrication 3D printing and injection molding this December PCB way is spreading the Hol Hol spirit with their special Christmas event running from December 12th to December 31st which includes free
03:36
Speaker A
coupons to save on your next PCB project free prototype for Christmas theme design and if you have shopped with PCB way before you get two chances to open their exciting mystery boxes visit PCB way.com and take advantage of these
03:48
Speaker A
festive offers before they're gone I put the link in the description and now the threading process begins it's incredibly satisfying to watch as the design gradually takes shape the feeder tube Glides nicely around the nails with Precision occasionally it may brush
04:04
Speaker A
against a nail but the springy design of the feeder ensures it can handle these minor interactions with ease another type of string art often referred to as polar or circular is less favored by us due to its inherent
04:20
Speaker A
limitations one significant drawback of circular string art is the inability to freely Place nails and strings in areas that would solely enhance the design additionally the strings often have to span across the entire circle limiting finer control over the placement and
04:35
Speaker A
contributing details it's more beneficial to have a versatile machine capable of handling standard CNC tasks as well by the way the CNC controller software we use is called kandle and it's completely free if you would like to experiment with the blender
04:49
Speaker A
simulation you can download the files from my GitHub the link is in the description finally I encourage you to leave a comment if you have any questions please don't forget to drop a like And subscribe to the channel so you
05:02
Speaker A
won't miss my upcoming videos thank you for watching and I will see you in the next one
Topics:string artCNCBlender 3Dalgorithmsimulationnails and stringsCNC machinethreadingpixel differencePCBWay

Frequently Asked Questions

How does the algorithm create string art from an image?

The algorithm places imaginary nails on a canvas and iteratively draws strings between nails to minimize the pixel intensity difference between the target grayscale image and the current string art.

What hardware is used to create the physical string art?

A custom-built CNC machine with a 500x500 mm work area is used to drill holes for nails and assist in threading the string art.

Can I simulate the string art before making it physically?

Yes, the creator provides Blender simulation files that use the generated data to create ray-traced images and videos, allowing visualization before physical creation.

Get More with the Söz AI App

Transcribe recordings, audio files, and YouTube videos — with AI summaries, speaker detection, and unlimited transcriptions.

Or transcribe another YouTube video here →