Virtually Passed

Virtually Passed

This channel is dedicated to teaching math, physics and engineering. Want a topic taught? Leave a comment :)

Least Squares Formula PROOF

Least Squares Formula PROOF

Reflection Matrix Proof

Reflection Matrix Proof

Math Puzzle - Zombies!!!

Math Puzzle - Zombies!!!

Пікірлер

  • @YT_Admin_
    @YT_Admin_Күн бұрын

  • @k.i.l.l.7935
    @k.i.l.l.79353 күн бұрын

    may the force be with you.

  • @virtually_passed
    @virtually_passedКүн бұрын

    Thank you padawan

  • @agnesasopaj
    @agnesasopaj7 күн бұрын

    Hello! Can you please inform about the damping ratio if there are two masses, two dampers and two springs?

  • @virtually_passed
    @virtually_passed6 күн бұрын

    What a great question. For a single dof system you can easily find the damping ratio using the formulas shown. However for a 2 dof system there will be 2 damping ratios corresponding to each mode. You'll have to use something called modal analysis to find these two modes by diagonalizing the equations of motion. Once you have the uncoupled equations of motion you can use the formula shown to each equation to find both damping ratio. Hope that makes sense

  • @theanonymousgamer8394
    @theanonymousgamer83948 күн бұрын

    Amazing video

  • @virtually_passed
    @virtually_passed7 күн бұрын

    Glad you think so!

  • @rishiashok7840
    @rishiashok784011 күн бұрын

    tysm, exactly what i was looking for !!!

  • @virtually_passed
    @virtually_passed10 күн бұрын

    No problem!

  • @jacobhofer9502
    @jacobhofer950212 күн бұрын

    Like the music :)

  • @virtually_passed
    @virtually_passed12 күн бұрын

    Thanks! All because of your suggestion to change song 😉

  • @KeerthiRoyal25
    @KeerthiRoyal2512 күн бұрын

    Art work was super, What software do you use? Can you sell the software sir ?

  • @virtually_passed
    @virtually_passed12 күн бұрын

    Thanks! I coded up the algorithm myself with MATLAB. You can get access to the code via my Patreon :) patreon.com/VirtuallyPassed

  • @KeerthiRoyal25
    @KeerthiRoyal2512 күн бұрын

    Thank you

  • @KeerthiRoyal25
    @KeerthiRoyal2512 күн бұрын

    Sir different shapes also possible ?? Like semi circle, rectangle, ovel and other shapes hapes. ??

  • @virtually_passed
    @virtually_passed12 күн бұрын

    @@KeerthiRoyal25 Only circle and rectangle at the moment

  • @jacobhofer9502
    @jacobhofer950213 күн бұрын

    You should diversify your song choices, they're not bad, but it's getting to be too much 😭

  • @virtually_passed
    @virtually_passed13 күн бұрын

    Thanks for the advice :) I'll choose a different song next time. Do you have any favorites?

  • @jacobhofer9502
    @jacobhofer950213 күн бұрын

    @@virtually_passed not really, idk what the scene is for copyright free music. Main thing is to repeat songs less, since at least subscribers get a lot of shorts with the same audio. Doesn't help that they're enjoyable to watch multiple times, adding to the repetitiveness 😂

  • @Petch85
    @Petch8514 күн бұрын

    I guess the axis are position and velocity, or kinetic and potential energy?

  • @virtually_passed
    @virtually_passed14 күн бұрын

    x=position, y = velocity :)

  • @carlharris4265
    @carlharris426514 күн бұрын

    Song?

  • @virtually_passed
    @virtually_passed14 күн бұрын

    Go season

  • @i-make-robots
    @i-make-robots19 күн бұрын

    So... I can find the brightest point on my transform but it doesn't correspond exactly to any possible thread. What do? I tried filtering my transform based on actually reachable threads, but then there's no need to calculate the radon of a single thread and subtract that (since the transform of the image is just a sparse matrix of points).

  • @virtually_passed
    @virtually_passed17 күн бұрын

    Once you have an ordered list of nails each described with (alpha,s) values, then you need to convert those values to Psi1,Psi2 values using the last formula I derived. Once you do that you'll find that your values will likely not correspond to a perfect equally spaced set of nails, so you'll have to do a linear interpolation. You'll also have to make an algorithm that converts all these individual disconnected lines, into something a single thread can reach. Another alternative is to perform the greedy algorithm in Psi1,Psi2 space.

  • @HuguesMichau
    @HuguesMichau22 күн бұрын

    Hello, thanks for your wonderful video! I tried to create a python code using your algorithme. However, for each iteration I have to calculate the Radon Transform of the current line and it is problematic : first it is very slow, secondly if the line is drawn in diagonal, the result is not the same for a horizontal one. Is'nt it possible to calculte only one line and the extrapolate to other lines with other couple of (alpha, rho) parameters? Thanks a lot!

  • @virtually_passed
    @virtually_passed22 күн бұрын

    Hey great questions. How are you calculating p_line? Are you using an analytical formula? If so, are you calculating it using two for-loops? This can be a numerically slow way to go about it, I'd recommend array-wise multiplication and division. Then you'll be able to calculate p_line very quickly from a formula. Another thing I should confess is that the formula I showed in the video is a bit simplified. I actually used a slightly different formula which didn't make the assumption of an infinitely thin line. It's true that the lines should be rotationally invariant which means that a line which has the same s value as another line should have the same radon transform except shifted and alpha In case you're interested I have published my code on patreon :)

  • @HuguesMichau
    @HuguesMichau22 күн бұрын

    @virtually_passed Thanks for your answer! To calculate the Randon Transform I use a python library :p Honestly I didn't check how this fonction works, but I guess it might be optimized. Oh great for you code, I will watch it !

  • @nymiantoft5907
    @nymiantoft590723 күн бұрын

    I love how it pops out as soon as the black is used

  • @virtually_passed
    @virtually_passed23 күн бұрын

    I find that fascinating as well. Admittedly I sped the video up after that point to make that effect stronger

  • @Petch85
    @Petch8524 күн бұрын

    damn it is impressive. 19100 lines. Maybe keep the final image for 1 more second 🙂

  • @ryanguo13
    @ryanguo1324 күн бұрын

    Thanks so much for the amazing explaination!

  • @jacobhofer9502
    @jacobhofer950226 күн бұрын

    An idea, if you're animating it the way it's generated (most important lines being drawn first), it leaves the fine details to be filled in at the end, I'd be curious to see how it looks if you draw the lines in the other order so the "fine details" would be drawn first. Or randomize the order. Both may or may not look interesting

  • @virtually_passed
    @virtually_passed23 күн бұрын

    Interesting idea. Order matters with color so I'm curious what the result will be. For black and white string art I doubt you'd notice a difference

  • @kevinbuiied
    @kevinbuiied26 күн бұрын

    It looks really nice! I wished it paused at the end for a bit so we could actually look at the final result.

  • @virtually_passed
    @virtually_passed26 күн бұрын

    I agree, sorry about that. I'm pretty new to YT shorts. Will do this for future videos 🙂

  • @Petch85
    @Petch8527 күн бұрын

    If you are up for a challenge you could try to make a short animation. Only use the final image!. Maybe animate on twos and do 3-5 sek (12*5=60). I think it could look cool.

  • @virtually_passed
    @virtually_passed27 күн бұрын

    I love this idea!

  • @Petch85
    @Petch8526 күн бұрын

    @@virtually_passed Well you already do >300 frames in the "time laps", so you can a lot of crazy stuff with animations for sure. You could probably also do a B&W animation with a fixed numbers of lines. Where you move the lines you already have drawn, and then make a "time laps" between two images. But that would take a lot more time, creating a new algorithm that moves one line at a time to get from one picture to the next with the fewest line moves. 😛

  • @Petch85
    @Petch8527 күн бұрын

    Questions: 1. How long does it take your algorithm to make an image? 2. How much longer does it take to make a color image?

  • @virtually_passed
    @virtually_passed27 күн бұрын

    Just the image? A few minutes with a high resolution photo. The video, however, takes a bit longer because it needs to write the frames one by one. The coloured string art is typically 3x slower than black and white.

  • @Petch85
    @Petch8526 күн бұрын

    @@virtually_passed A few minutes. If you did 3D blender animations a few minuts per frame would be great, so I guess that is great. I assume you are using python and are saving every frame as a PNG file. And that will add about ~1s for each frame. This video was about 300 frames, so I would expect about 5 min longer. Maybe you plot for each frame, that could also add a few seconds. You should be able to run the PNG part in parallel, but still. and the short video resolution is only like 360x360, so maybe you can get away with using lower resolutions. But it is nice to have higher resolutions versions for your videos.🤷‍♂️ Still it sounds very reasonable.

  • @jackbaiatul9351
    @jackbaiatul935126 күн бұрын

    How many lines?

  • @Nothing_chilly
    @Nothing_chilly26 күн бұрын

    ​@@jackbaiatul9351it probably depends on the image but i think this photo had like lines in the hundreds

  • @virtually_passed
    @virtually_passed26 күн бұрын

    @@jackbaiatul9351 17000

  • @Petch85
    @Petch8527 күн бұрын

    Suggestions... Could you add a progress bar. And leave the final image for a few seconds, such that it is easier to pause at the right time. The short's player sucks, that is not your fault.

  • @virtually_passed
    @virtually_passed27 күн бұрын

    Good ideas thanks. Instead of a progress bar would you like a line counter?

  • @Petch85
    @Petch8526 күн бұрын

    @@virtually_passed A line counter would be cool. Cause we have no idea how many lines are used in the different pictures. If you make it a x of x lines, then it dabbles as a progress bar. Also if yt could fix the shorts player then that would also have show the progressbar😛.

  • @Petch85
    @Petch8527 күн бұрын

    It is creacy how good this looks. How about more stialysed drawings? Things with outlines and a much more limited color palette. I guess a white background and sharp edges are tuff. But maybe something like manga/comics or a logo or something.

  • @virtually_passed
    @virtually_passed27 күн бұрын

    It handles low frequency color changes best. This usually means close-ups work well, especially high detailed closeups. Manga will probably work but without much detail in the characters faces it'll just appear a bit smudged. Distant small objects often turn out pretty poorly in my view. Ive tried logos before. It's a bit of a gamble but most of the time they don't turn out so well.

  • @Petch85
    @Petch8527 күн бұрын

    maybe do one with color🤔

  • @virtually_passed
    @virtually_passed27 күн бұрын

    On the way 😁

  • @Petch85
    @Petch8527 күн бұрын

    @@virtually_passed And I am here for it🙂

  • @virtually_passed
    @virtually_passed27 күн бұрын

    @@Petch85 Just released it: kzread.infoWmcTLaClCrE

  • @Petch85
    @Petch8527 күн бұрын

    @@virtually_passed omg quacy that you just fulfill my request withing 4 hours. 😂 also I am sub, I am not going to miss your uploads👍

  • @m10h20
    @m10h2029 күн бұрын

    great Video. Thank You. But i don't understand all of the equations completely. What did i need to run your code on my PC with my owne images? Yes i need Math lap but which version. On the web page from Math lap i can buy 1000+ different versions. Thank You

  • @virtually_passed
    @virtually_passed29 күн бұрын

    Hi! That's ok if you don't understand all the equations. My MATLAB script runs all of that for you so you don't need to know what's going on under the hood. You can download my MATLAB script on my patreon. It should run on any of the latest versions (2018b and up)

  • @m10h20
    @m10h2029 күн бұрын

    That means i only need the "Basic" math lab version, and i am good to go? Is the script on your patron only for BW images or also for color ?

  • @virtually_passed
    @virtually_passed28 күн бұрын

    @@m10h20 yes. So far it's only for circular BW images. I'm currently working on perfecting my scripts for color string art and rectangular string art.

  • @m10h20
    @m10h2028 күн бұрын

    Thank you very much I will test it.

  • @m10h20
    @m10h2023 күн бұрын

    @@virtually_passed Hey I successful run your code to Create my own image. One side node Mathlab need 1 extension "Image Processing Toolbox" to run the Code. But I have one question. Where can I get the output as file? I tried to write all coordinates in to a File. The Problem that the End of Line are not the start from the next line. what did I wrong?

  • @elyasdevlogger2343
    @elyasdevlogger234329 күн бұрын

    That look so cool keep going :)

  • @virtually_passed
    @virtually_passed29 күн бұрын

    Thanks! I'm pretty new to YT shorts. I'm thinking of making the whole video sped up to last max 6 seconds. I'm curious what you think :)

  • @elyasdevlogger2343
    @elyasdevlogger234328 күн бұрын

    With string art you dont want to speed it up .@@virtually_passed

  • @jacobhofer9502
    @jacobhofer950229 күн бұрын

    Your old video popped into my recommendations, id already seen it so i checked if you had an update and was so pleasantly surprised that youd just made this video!

  • @ernestjesly
    @ernestjeslyАй бұрын

    what is the previous video of this?

  • @MohaMMeDiN55
    @MohaMMeDiN55Ай бұрын

    This is the best explanation about what radius of gyration really is exactly! Thank you for sharing.

  • @user-nw5pc2lt5l
    @user-nw5pc2lt5lАй бұрын

    Sir I love you from my heart just because of your excellent sound and teaching.

  • @user-ez1bv3zg6c
    @user-ez1bv3zg6cАй бұрын

    where is the fourier transform that u promised in last video ?

  • @virtually_passed
    @virtually_passedАй бұрын

    The FFT method that I alluded to last video was lightning fast, but the results (in my opinion) weren't as good as the results you can get using the radon method. I managed to use the FFT by boiling the problem into a convolution. More details are available at my Patreon if you like.

  • @azttm
    @azttmАй бұрын

    There was a paper on this topic, that might interest you as well: repository.kaust.edu.sa/bitstream/handle/10754/656489/2018.EG.Birsak.StringArt.pdf

  • @jerrytjohn92
    @jerrytjohn92Ай бұрын

    This is great! Just out of curiousity, why'd you chose to use the CMY values and not the RGB? Wouldn't it work with Red, Green and Blue string?

  • @virtually_passed
    @virtually_passed23 күн бұрын

    Hey sorry for the late reply. It's because CMYK is subtractive, meaning these colors absorb light, which is a crude but hopefully roughly accurate model of how the strings interact. I think it is possible to do it with RGB but it'll involve several tweaks to my algorithm. It turns out colour is very complicated and I'm still learning a lot about it

  • @SophiaChen-bv8rp
    @SophiaChen-bv8rpАй бұрын

    you are saving my friends math project

  • @thisismy181
    @thisismy181Ай бұрын

    Nice work! After your first video i went down a similar rabbit hole and ended up with the exact same algorithm as you, but eventually realised that it essentially is the same algorithm as the greedy one. Ther must be a better solution than greedy!

  • @virtually_passed
    @virtually_passedАй бұрын

    You're right! My FFT algorithm avoids greedy and it's lightning fast. However the results are worse than the radon method in my opinion. I also have a sneaking suspicion that a modified inverse radon transformation could be used to solve this string art problem. That would be the holy grail. I've yet to crack that egg though :)

  • @thisismy181
    @thisismy181Ай бұрын

    Yeah that would be ideal. I also thought about truncating the single line radon transforms to just the high intensity bow tie section and then solving it as a deconvolution, which would essentially be a faster approximated version of your initial optimisation algorithm, but ran in to the same binary problem. I wonder if there's a space in which the single strings are related by just a translation.

  • @thisismy181
    @thisismy181Ай бұрын

    Also your images all look wayyy better than mine in general. I don't think the line profiling work you did can be understated!

  • @virtually_passed
    @virtually_passedАй бұрын

    @@thisismy181 Wow!! I had the exact same idea originally. Indeed it only works if you leave it unconstrained. If you try and turn it into a constrained optimization problem it becomes too computationally heavy to be practical.

  • @virtually_passed
    @virtually_passedАй бұрын

    @@thisismy181 Thanks! yeah the calculations shown at 4:56 are a pretty heavy simplification. There's actually a few more steps that I didn't show for simplicity.

  • @kutlokenosi3116
    @kutlokenosi3116Ай бұрын

    3:57 line 3 was a little excited to get streched out into a vector XD! Greate video. I love seeing math and programming come together!

  • @virtually_passed
    @virtually_passedАй бұрын

    New video on string art is out! kzread.info/dash/bejne/lnagtc-gZbeXY7A.htmlsi=KTr8aD_GwLb8t2u5

  • @funkdefied1
    @funkdefied1Ай бұрын

    That iterative process to place lines seems like the perfect use case for the Bend programming language.

  • @Stebanoid
    @StebanoidАй бұрын

    I wonder what the result would be if you chose not the brightest spot in the Radon transform space, but the line which radon transform has the highest correlation to the Radon transform of the image.

  • @virtually_passed
    @virtually_passedАй бұрын

    Interesting idea.

  • @AJMansfield1
    @AJMansfield1Ай бұрын

    Using the Radon transform here would make chaining lines end-to-end pretty fast, computationally -- given a fixed starting point, the possible lines would form a 1-dimensional curve in that space that should be quite fast to scan for the next maximum.

  • @virtually_passed
    @virtually_passedАй бұрын

    I agree. In fact, what you could do is convert from radon space (alpha,s) to "nail space" (psi_1,psi_2). Then when searching for the next maximum don't bother searching the entire domain for the maximum, instead only search in a vertical line - since the psi_2 from a previous iteration becomes the psi_2 for the next iteration

  • @victorwidell9751
    @victorwidell9751Ай бұрын

    CMYK only works if the threads are transparent, like ink.

  • @virtually_passed
    @virtually_passedАй бұрын

    At the moment I model my lines as partially transparent. Although I'm still unsure if this is the best possible model for them. This is the most difficult frontier that I'm facing at the moment in string art haha

  • @victorwidell9751
    @victorwidell9751Ай бұрын

    ​@@virtually_passed That should work for a black thread, as covering up a light background partially with black is equivalent to reducing the total brightness with some factor. But consider a white thread. In the CMYK model, it would be completely transparent - have no effect. In reality it would reduce the light passing through from the background just as much as a black thread, but then ADD it's own brightness,

  • @virtually_passed
    @virtually_passedАй бұрын

    @@victorwidell9751 I really like the way you think about this. In your opinion, what do you think is the best way to model the thread?

  • @victorwidell9751
    @victorwidell9751Ай бұрын

    @@virtually_passed What was the purpose of the partial transparency? Just antialiasing? Perhaps skip all that and compensate with higher resolution on the transformed space if it introduces aliasing? I’d model the thread as just fully opaque. I’m assuming that you can use any colorspace as long as it supports linear interpolation. That way you can use any number of colors really. And any color. But if you have multiple layers of different colors, each of them will cover the ones below. you should probably start the optimization with the top layer where they will be more relevant for the final image, and add more layers below. You could possibly use multiple layers of each color.

  • @vlmath314
    @vlmath314Ай бұрын

    the transformation between line-space and point-space reminds me the Hough transform, dont know if it's usfull here ...

  • @critical_always
    @critical_alwaysАй бұрын

    I loved your previous video, pleased to see the followup showing up. I think you single handedly pushed this kind of art ahead by a huge step.

  • @virtually_passed
    @virtually_passedАй бұрын

    Thanks! I found one academic paper on the subject before I started which only focused on a simple least squares approach (similar to what I showed in my first video). There isn't any literature out there about using the radon transform to do string art :P

  • @loneaccordionist
    @loneaccordionistАй бұрын

    ​@@virtually_passedAny plans on publishing a paper on the more advanced method? Happy to take a crack at it. Super interesting concept!

  • @PumpiPie
    @PumpiPieАй бұрын

    Isent this the same as calculating the intensity of all possibal line and choose the darkes possibal line to draw on? But the radon transformation is calculating it in a way that is fast insted of check all possibal lines for every line? 🤔🤔👍

  • @PumpiPie
    @PumpiPieАй бұрын

    And whan drawing the HP image. Did the lines have some transparency to it? Or are thay solid black?

  • @PumpiPie
    @PumpiPieАй бұрын

    Can you also post some image off results using the different algorithms on the same images? ❤

  • @virtually_passed
    @virtually_passedАй бұрын

    @@PumpiPie With regards to your first question, yes, that is basically what i'm doing. With regards to your second question, i modelled each string as black with high transparency (you can prove that two highly transparent images overlapped on each other add in darkness). With regards to your third question, my previous video shows results using a different algorithm. But it might not be comparing apples and apples because the lines are defined slightly differently

  • @PumpiPie
    @PumpiPieАй бұрын

    ​@@virtually_passed 2 question) Compared to a real life version. Is it more realistic to add some transparency to the lines on the final piece? Or are it more realistic to use solid lines? 😀 Thanks for taking the time to answer. Will have a look on your patreon when i get vacation :) Keep up the good work :) Are there coming more videos soon?

  • @smcclure3545
    @smcclure3545Ай бұрын

    add a 3rd spatial dimension with virtual, translucent strings. then realize these could be sub-luminal laser emitters (like in the tilt-five device) in a flourescing gas instead of pins with strings.... where beams overlap they excite the gas to levels of luminosity then 🎉 you don't need a second pin, maybe see what it looks like with half a sphere, and boom, volumetric imagery baby!