I'm 15 years old and I've never been particularly interested in math or programming in my entire life. I wanted to do something for my school's arts festival since I have always participated but this time I wanted to do something different. I looked up how to do embroidery and found this video by pure chance. This is simply fascinating, you have completely changed how I saw mathematics.
The problem is school and school teachers. School is there to make people into unquestioning factory line workers. Don't expect to learn anything of value there.
You're basically trying to reinvent how CAT scans work. Based on the outro it seems like you've already started digging into the literature, but the first step is something called a Radon transform.
@@virtually_passedYep, the first thing I thought of is that this is a great visualization of how (cone beam) CT works! It would be cool to see with a semi-translucent thread and back light. You could expand to CMYK coloured threads as well :) others have pointed out using the SVD. I'd point you to a classic computer vision paper called EigenFaces, which might be another technique for finding the weights on your basis vectors
@@Bob94390 Yeah, that would be more accurate. Of course, as everyone is saying, the way one does a (inverse) radon transform in practice is through the FT. And even then one rarely does an exact radon transform because it typically creates artifacts. So (my understanding, I am by no means an expert) is that at the end of the day the radon transform is just a model and in reality one is just manipulating FTs.
are we talking about the polar formatting algorithm here? Also, would applying the projection slice theorem help? I suppose projection slice theorem can be problematic since the string here is of uniform density.
I'm super interested in the FFT video! I'm also interested in how you went about making the machine to do this IRL, as well as the considerations for string tension and the like
That's exactly what I was wondering. Thanks for this comment! Congratulations to the author for this amazing video and all of his brilliant ideas, +1 sub, hoping to see the next video about fft algorithm :)
@@thewhitefalcon8539 yeah, and then you just code it in such a way that you never have to go over halfway around the circle in one direction on a single sweep so then you don't have to worry about keeping tension on the string while the length is contracting. I didn't realize this when I wrote my original comment, though
Drawing an eye is spectacular art. Creating an algorithm and a machine that can use it to make art is PURE GENIUS, outstanding how far our brain can go!
1.9k views??? Wtf? This is an incredible quality video and you’ve put a ton of hard work into this I can see. It’s reminiscent of stuff made here and 3b1b put together. Thanks for sharing, and I hope it reaches tons of people as it deserves to!
@@lost.in.maze.official Uh, 3blue1brown is a example of the contrary. Grant gets millions of views on nearly every video they make, even on very obscure topics. Granted, (heh) they're an outlier, but still. Also, it might just be that string art is too obscure of a topic and the mathematics of such a thing are not immediately attention-grabbing. The thumbnail might also be to blame. It's very muted and gray, so it doesn't stand out among other thumbnails.
@@nikkiofthevalley He's not wrong. People'd rather watch others do stupid stuff or entertainment. It's obvious when you look at the most popular people on the platform.
In my youth during the 70's I was surrounded by various wire-art framed pictures and even did a few (geometric) versions for myself... but this absolutely blows my non-mathematical mind... thankyou for showing us what's really possible with this form of art🥰 (PS... I now know that I _need_ that stormtrooper artwork!!!)
This is utterly fascinating. It is truly one of the best representations of how to convert an algorithm into a practical situation. And combine that with art and you have magic and humanity.
My very first thought was this was going to be a Fourrier transform thing, then you told us about the matrix stuff. But alas, I got redeemed in the end!!! Great video.
I passed my Fourier Analysis course this past semester. This is how my brain went during this video. Me at the start of the video: minimisation? I see! He's going to use a projection and use a Fourier Transform! Me part way: Oh... so no Fourier Transform... Me at the end: AHA! There it is!
Oh man, that is fascinating! I know it's for a contest, but I would love if you made the entire project open source with CAD and code so others (myself included) can make this project and learn by doing 😀
With all due respect, that's honestly a pretty unfair ask. While I know it's not how you intended it (I agree that it would be FUN to recreate this at home), but from an engineer's perspective it feels like you're asking for someone to give away for FREE the product that they worked so hard to conceptualize, design, prototype, code, troubleshoot, refine, and present. If it is someone's intention to do all of this work for it to be freely available, that is a decision that they have made on their own, and have somehow justified, and that's fine; but to REQUEST that they give it away comes off as lazy and entitled, and implies that their expertise and effort has no value. There is more than enough information presented here for someone like yourself who is interested in making such a device to find tutorials and explanations that are already available for individual aspects of the project. By taking this route, you will truly learn by doing, but in the process learn far more and be more capable of creating your own UNIQUE product in the future!
@@jhboulder hmmmm... I also wonder how much of this project has been built on others' open source work? Seems to me that the monetization of that knowledge would be fairly disrespectful to those who believed that knowledge should be openly shared. But that's just my opinion and you by no means have to feel the same. I simply feel like if someone has learned for free, they have a duty to provide their own knowledge to the world the same way. I'm almost done my first project and am excited to share the model freely. I hope you stumble upon it and enjoy!
@@nadimfetaih3841 there's a lot to unpack in that statement. "Open Source" seems to be a more complicated concept than I gave it credit for in the past. Speaking to the comment of 'monetization of knowledge that was gained for free', there are TONS of companies out there that are making money off of products or services that use pieces of Open Source projects, but because their end product is clearly distinguishable from other's finished products, it is generally considered acceptable for them to make money from these products and services. Major software companies are notorious for this, especially Google, Microsoft, Apple, and other similarly large software companies (not to imply that I think that these are the pinnacle of ethical business practices). Quite often, the bulk of the code that is used is just a copy-and-paste of snippets of code from somewhere else that they know already works, so they simply adapt it to their needs. As for the 'they have a duty to provide their own knowledge to the world' again speaks to our current cultural state of entitlement. We have come to expect that if someone else got something free, we should get it for free too. While I can understand where this feeling comes from, I still have trouble completely getting behind the thought that receiving something for free implies that you now have an OBLIGATION to pass it on for free. However, I CAN completely agree with that statement if it's changed ever so slightly to: "if someone has learned for free, they SHOULD CONSIDER PROVIDING their own knowledge to the world the same way." Everyone's situation is different, and there can be very valid reasons to not simply distribute it freely, anything from 'easy access to this could be harmful to society' to 'rent is due, so I need to make money off of my efforts to provide for my family' and a million different reasons. Thanks for respectfully sharing your opinion, and I hope that your maker journey is a successful one!
@@jhboulder Some people actually like to give away their work. Asking costs nothing. It's a binary answer. Being asked doesn't mean you have to say yes. Buying something is lazy and entitled. Making something from someone's designs takes time and effort and is very educational. Sharing enriches everyone. The opposite of sharing is just sad.
@@jhboulder You suggesting that them asking an innocent question is unfair is pretty unfair. I have no respect for the way you answered or your expressed opinions, their question is not freeloading and does not imply that the OP's work has no value. In fact asking for a way to interact further with an authors work does the opposite, it expresses that the work has value.
I saw art like this on Pinterest months ago, and I wanted to recreate it. But I couldn't find anything on the process used to make it. So glad I found this video.
Wow, what an exciting application of math! When I saw the thumbnail, it reminded me of the math behind CT-imaging, and indeed the mathematical problem that you solve seems to be related... Keep on doing the good stuff!
Extremely well made video. Easy to understand and follow even without massive amounts of math knowledge. FFT video also sounds interesting, not sure how much I would understand but I want to watch it still
We produce string art by placing nails all over the canvas and the algorithm is very similar! It doesn't only look at brightness though. For example it limits the number of threads per nail and it avoids completely white parts of the image.
My guess was initially that you would use FFT for such a problem. FFTs are used similarly in other areas such as antenna/loudspeaker beam forming (pattern synthesis).
@@virtually_passed indeed! There might be some insight to gain in “simple pattern synthesis for complicated arrays” by RF get down here on RU-vid - but I haven’t investigated too much into the usability of the method in your case
I originally thought this could be solved for continuous images (eg: bezier curves) by making some scoring function based on the distance of the string to the curve and using simulated annealing or something similar to optimize it. But your least-squares discrete optimization didn't disappoint
great video. nice visuals. i love how you explained this interesting concept so simple with just enough depth to understand it (and remember) and not too much depth, so it doesn’t get boring
I coded one of these. I'm deeply intrigued by the way of looking at it you have since it's quite a bit more involved than the way I had of doing it. It also seems much much faster since it took my method forever. Very well done.
@@virtually_passed Instead of looking at all of the pixels that the line intersected or looking at the local neighborhood I just, hmmm actually it's been a while let me look at my code, ok I just looked at the one with the closest center for each in a rough line. So what I did was for slopes less than 1 I used an equation for a line solved for y and rounded, then for slopes greater than 1 I wrote the equation the other way around solved for x and rounded. Then I took the total darkness of all of the pixels along the potential lines and found the one that was darkest, then I subtracted some from the pixels along that line to produce a new image. It may have been a bass ackward way of doing it though, I'm certainly not saying I did it "right" or "well" or "competently" but it did end up working with a little tuning. Also the machine you showed looks super cool.
I'd have also included a part where it described the possible solutions to the boolean linear problem and the struggles of finding an optimal solution quickly, and the possible ways to do it anyway, that would then prove why going with a greedy solution is so much better
This is the reverse of how CT scanners work. CT scanners shoot X-ray beams through a patient while rotating around the patient, producing a dataset of rays of varying energy. A FFT was traditionally used to reconstruct the images of the patient slice by slice. With the advent of helical CT scanners that continuously acquire data while the patient is moving in the z plane creates a helical dataset. That requires more mathematical gymnastics to fill in the gaps in the helical dataset. These days, AI and iterative reconstruction methods are used that require even less data to produce comparable images. Great video!
I liked this a lot because I learned all the math from the video last year in university and this video shows me how it is actually used. Very cool stuff
I wonder if you could decompose a colour image into RGB, solve each then do three runs with red/green/blue string. I know they'd cover each other up to a certain degree, but I'd be fascinated to know if you could make colour string art using this technique! Perhaps allocate each nail a colour, so you've 1/3 the "resolution" but no masking of one colours' string by another. Anyway, fun to think about!
You could even add a white string that could 'cancel out' a line of color at a certain interval, like, at the very end, or in between certain colors. I wonder if this would show up graphically.
Instasubbed! I love this. Have had a sort of mystical fascination by circular dynamics like this ever since I discovered timetable multiplication. Thank you and I would love to see more videos on the subject!
Right before you brought it up, I was thinking that a Fourier transform could help with this as well. At that point, you’ve basically invented JPEG compression using strings.
@@virtually_passed I see. I think though that you end up discrete because you have a limited number of pixels input and a limited number of thread outputs.
great video! I think a possible approach to improve the greedy algo is to randomly(or greedily, or some other principle) destroy some lines and try to repair the images by add some new lines to minimize the cost.
I’m teaching math for 10 years and almost every student asks, why do we have to study maths. And every time I explain it, I feel like I’m trying to explain a cat why do I need a smartphone!
Personally as a (when I was) teenager 50% homework+ 20% semester exam got me a 70, C-. I had one teacher I liked. Although my math instructor was cool too. I didn't hate math but I never studied. It was only until I was 25 I took an IQ exam that my spacial relations was above 95%. I can see mechanisms in my head, and did study computer aided drafting.No one took the time to find out my strengths. I realize now that I cannot see numbers horizontally but I can see them vertically(in my mind). It weird try it with your kids. Converting maths into visual representations is impactful to comprehend meaning. Reading set theory for myself made the foundations of calculus relatable. I am dyslexic so could be that too. Also, contextual kinetic imagery. Just thinking about what the surface of a material feels like from memory can help with visualizations. Like if you could reach out and grab something and shape it, like a piece of clay. It helps control your concentration. I study math now on and off, but I realize that my imagination is restricted by not understanding certain aspects of mathematics. Hope your kids don't drive you nuts good luck. Thank you for being a teacher for slackers.
9:15 that was my solution i thought about after hearing string art and thinking about it for a minute.. glad i wasnt far off. got university flashbacks after i heared pseudo inverse something something and for a secound i thought OH YEAH FOR ONCE ITS USEFULL.. but nah :D edit: 10:15 oh my god, you are great :D
One of the few some3 videos that actually motivates the math in an original way, instead of making a slow and shitty video on math jargon that has 0 relevance and is basically trivial but somehow takes up 20 minutes of screen time. Good job lol
What an absolutely beatiful video, just loved every bit of it! Looking forward to the fourier transform approach video too! Thanks for this quality content!
Likely recommended by youtube after I watched some video about CT scan reconstruction using FFT and weighting (which was quite good, but I don't recall much and I fall asleep during 2nd video explaining CT with ray cone rather than parallel rays}. As some people mentioned, very similar are hough/radon transforms. I guess they differ only in opposite aproach to description.
I searched a bit about the string art problem. All I found was the wiki article and some stuff about Béziers curve and Computer graphics lessons about Bresenham algorithm and anti-aliaing. As an electrical engineer, I am familiar with a lot of these. But I like your mathematical approach more. You practically also did the Bresenhamm, but it's in a different way like the Least-Square-Regression Minimization problem. Very cool, I think, I am going to try to replicate this in MATLAB and see the results for myself :)
ahh i was trying to solve this exact simulation soem time ago. i tried using some learning methods but i couldnt do anything significant. the greedy idea was really smart
this make me think of interferometry, by combining a bunch of lines you make an image, also fourrier transform are used basically everywhere something is decompsed into a sum of values so it's not surprising that you can use FFT to make the algorithm much faster
Hi, really nice video! Small idea i have -for the lines you could use also some anti-aliasing algorithm like MXAA. That in theory can eliminate the need in a custom step function and possible make stuff a bit smoother.
But you have to discretize at some point anyway since the image is a pixel array. I suppose you could also do it without discretization, by integrating the line footprint against a vector image, but I don't think it's worth the trouble.
@@plokki456 Yes, he does that at 8:05 in the video. Thing is, he samples the analytic 2D ridge instead of a discretized version of it, which would be necessary for e.g. MXAA.
I thoroughly enjoyed this. I myself took out a pen and paper and attempted this approach on paper, which how well-made mathematical videos should feel. Wish you further success.