Finding Strange Attractors

Поділитися
Вставка
  • Опубліковано 29 лип 2023
  • After playing with randomly created strange attractors for a bit in recent times, I thought making a short introduction video could be fun, so here it is :)
    This also is my entry for #some3

КОМЕНТАРІ • 52

  • @dmitry-diehl
    @dmitry-diehl 11 місяців тому +22

    Thank you for the video. I tried to find information on generating strange attractors six months ago, but couldn't. Thank you UA-cam algorithms for bringing me here

    • @verymuchtom
      @verymuchtom  11 місяців тому +3

      Thanks dude! Yeah the UA-cam algorithm truly works in mysterious ways sometimes 😂

  • @Pingu_astrocat21
    @Pingu_astrocat21 Місяць тому +1

    Your channel is so awesome!! Learning about all this :) Thank you

  • @negativebudgetproductions4908
    @negativebudgetproductions4908 11 місяців тому +9

    Very cool video! I have played around with strange attractors a long time ago (question 2872160 on math stackexchange) with a different function having only 4 parameters. As I wanted to make a Lyapunov map of the entire parameter space it was a bit annoying to have so many parameters, and this function here has 12 parameters now, so I guess you can only take very limited slices of the parameter space if you want to make a Lyapunov map. It would be interesting to see if this system here exhibits similar behaviour to the one I looked at, that is are there regions in the 2D plane that converge to different parts of the attractor. It can happen that a point can either land in a chaotic region and stay within it or land in a convergent cycle region and stay there, there can be multiple of these behaviours coexisting. (This is another added difficulty of drawing the Lyapunov map, it may look a bit different depending on if you use a constant or a random starting point.)
    A crude way to make a bifurcation diagram for these is to render the fractal instead of the x,y plane instead in the x,time or y,time plane and overlay the trajectory of many starting points.
    Another thing I noticed is that your map contains the mandelbrot set, in a way. If a3 = 1 and a5 = -1 and b4 = 2 and the rest zero , then a1 becomes the real component of c in the mandelbrot set and b1 the imaginary component. The equation then is equivalent to the mandelbrot set which can easily be seen by setting z = a + ib and multiplying out the equation, of course.
    In summary a very nice video!

    • @verymuchtom
      @verymuchtom  11 місяців тому +1

      Thank you for that comment, I really appreciate it! :) Making a Lyapunov map is definietly something that has been on my mind as well for some time now. A few months ago, I've played a bit with those, after watching the amazing video by Desdenova on the topic (coinicidentally my fractals, using sine functions as well, looked very similar to the ones in your post). So that's something that I want to tackle again when I find the time to do so, although maybe on a set of equations with less parameters, perhaps the Danca fractal :D
      Also that the mandelbrot set is included is definetly a cool bonus, i haven't even thought about that.

  • @ivanrodionov9724
    @ivanrodionov9724 11 місяців тому +2

    Very cool!

  • @Ucodia
    @Ucodia 6 місяців тому +1

    What a fantastic video and exploration. I was myself wondering for a while how does one can discover new chaotic attractor systems and you sure have answered this. Thanks to the reference to Paul Bourke's website I was able to create my own JavaScript implementation and I am having so much fun exploring it :) I wish to see more of videos like this one, thank you!

    • @verymuchtom
      @verymuchtom  6 місяців тому

      Thank you for the kind message! Yeah i’ve also spend a weekend or two exploring all of the different fractals presented on his website, it’s an amazing resource!

  • @magran17
    @magran17 11 місяців тому +2

    Instant new subscriber! Great work..

    • @verymuchtom
      @verymuchtom  11 місяців тому

      thank you so much, i’m glad you liked the video :)

  • @captainchicky3744
    @captainchicky3744 11 місяців тому +2

    Very nicely made!

  • @HouseMusicLover001
    @HouseMusicLover001 11 місяців тому

    The oscillation/jumping between states reminds me of quantum spin

  • @cybermonkmusic
    @cybermonkmusic 10 місяців тому

    hmm this might help me find the long side of my blanket

  • @raiinaii
    @raiinaii 10 місяців тому

    Cool video

  • @ninjajakee
    @ninjajakee 11 місяців тому +2

    Such a cool video, would love to see more! I‘ve been experimenting with particle simulations recently and have been wondering if there‘s ways to find a mathematic formula for the path of a particle and this seems to be quiet similar!

    • @Andres186000
      @Andres186000 10 місяців тому +1

      In general there is no so-called "closed form solution" to particle trajectories/paths, that is to say that you can't write some formula that you evaluate for whatever time you want to know the location of the particle at and get back such a location. There are however methods to approximate the location of particles experiencing forces, and those are called ODE (ordinary differential equation) solvers or partial differential equation solvers for more complicated systems. It can actually be quite easy to get started making such simulations if you are comfortable coding and using packages like scipy for python, using the ode45 or ode15s functions in MATLAB if you have access to MATLAB, or DifferentialEquations.jl if you are fine with Julia.

  • @polymorphic59
    @polymorphic59 9 місяців тому

    Would love to have 4:46 as a wallpaper lol

  • @shadamethyst1258
    @shadamethyst1258 11 місяців тому +4

    I made a little attractor visualization tools a few weeks ago, I'll make sure to add this as a feature :p
    I wonder how the lyapunov term can be calculated for continuous attractors. Would it be the integral of the log of the derivative of the position difference between two arbitrary points evolving on the attractor?

    • @verymuchtom
      @verymuchtom  11 місяців тому

      Oh wow, that sounds really cool, please let me know when you've added it, I'd love to see the results :)
      For continuous systems I'm honestly not certain how the lyapunov exponent would be calculated. I searched for "time continuous lyapunov exponent" and got some papers but they are a bit beyond my understanding :D
      I'd be way cruder and just compare start with two almost identical points and just measure their distance after e.g. every millisecond.

  • @loganhoward2398
    @loganhoward2398 11 місяців тому +2

    Really cool video and great visulisations, by any chance do you have any of the values for the equations that result in the caotic systems, as aposed to ones that converge/go to infinity or repeat?

    • @verymuchtom
      @verymuchtom  11 місяців тому

      Hi, I'm glad you liked the video! :)
      Here's a set of values that will result in chaotic behavior, the first array contains the a values, the second the b values
      [1.06523, 0.75537, -1.58331, -0.91507, 0.78673, 1.06912]
      [0.01703, -1.15372, 0.32726, -0.38913, 0.02824, 1.20794]

  • @CEOofGameDev
    @CEOofGameDev 6 місяців тому +1

    I wonder if one could figure out if there is an equation for determining all the possible sets of constants that result in chaotic behavior for that equation. If there is, I'm willing to bet it has something to do with the golden ratio.

    • @verymuchtom
      @verymuchtom  6 місяців тому

      I thought about that a little bit as well, the problem can be limited to only varying one parameter and keeping the others constant. In that case it should be very similar to a bifurcation diagram but with an x,y and r component. In that case the relationship between when the system is chaotic vs when not should be closely related to the Feigenbaum constant. For all parameters.. honestly who knows 😅

  • @polymorphic59
    @polymorphic59 9 місяців тому

    Will you post some of the colored graphs as images or prints?

    • @verymuchtom
      @verymuchtom  9 місяців тому

      Hi, sure thing :)
      You can download the images in full quality here: drive.google.com/drive/folders/12HifiiRnZ0p6QYpO8BblNdb1r4AlLK0W?usp=sharing
      I also have an Inprnt store if you'd like to buy a print, but I also have no problem with you just printing it yourself www.inprnt.com/gallery/nottom/

  • @yuli5524
    @yuli5524 10 місяців тому

    Super new to higher math concepts but I've been exploring in my free time. What did you use to render your models, and how much computational time does a render take?

    • @verymuchtom
      @verymuchtom  10 місяців тому

      Hi dude! To render my models, so those showing the distances and so on, I am using Blender (free program). The render times for the scenes in the video were relatively short because there weren’t that many elements. The animations had around 480 frames each and took around a minute or two to render on the GPU in 4k and using the Eevee render engine :)

  • @fredolivier1431
    @fredolivier1431 11 місяців тому +3

    this is an incredible video. amazing animations and mathematical explanation. Could be useful for Neural Network Profiling...

    • @verymuchtom
      @verymuchtom  11 місяців тому +1

      Hey dude thank you so much for the kind words, I’m glad you enjoyed the video! :) Gotta be honest I don’t know much about neural networks but it’s cool to know how many different fields of applications for one topic exist!

    • @FunkyTurtle
      @FunkyTurtle 11 місяців тому +1

      can you detail a bit further? i know a bit about NNs but can't see the relation here

    • @fredolivier1431
      @fredolivier1431 11 місяців тому

      @@FunkyTurtle the possible avenues for dealing with the interpretability problem arising large neural networks are few. The systems as you know are not deterministic.
      How can we describe the character of a neural network?
      The patterns it's finding in deeper layers are so difficult - they cant really be explained.
      But the system is not fully chaotic there might be a possibility of reaching some degree of explicability. We just need a way to think about them - not as truly understandable systems nor as chaos. Gary Wang does a good video on this in a podcast.
      I think there is a parallel between models/networks that are stable and systems that Dont explode as of the video - although we cannot give much 'semantic meaning' to mathematical attractors, there are famous ones and they exist, perhaps we could also use them to describe deeply complex systems like NN's at a 'profiling level'.
      Some networks might display more evidence of one attractor on a given task. TLDR: NNs can function like the videos 'changing parameters over time' - Although the networks function on higher dimensions, we want to, like in the video, map a non deterministic system that has an attractor. In the case of NN's the attractor is being correct. In the case of the video the attractor is the changing variable.

  • @halihammer
    @halihammer 10 місяців тому

    Hey, very cool video! I appreciate the short but concise explanation. I wonder if you have experience with languages like Matlab or Python and if you can tell me if it is worth switching to Julia for faster and more efficient code?

    • @verymuchtom
      @verymuchtom  10 місяців тому +2

      Hi, glad you enjoyed the video :)
      I use both Python and Julia in my day to day work, but I learned Julia first and Python second, which might sway my judgement, Matlab I never really got into, so I can't really say much about that.
      In my opinion Julia is the nicer programming language, specifically for my usecases, which are data analysis and well stuff like done in this video. Whenever large amounts of calcuations have to be performed the substancial difference in efficiency really adds up, especially because Julia is incredibly simple to multithread, giving an extra performance boost (I know stuff like Numba exists for Python which will also increase performance but I never really looked into it). But in fairness in a lot of usecases the performance difference is not even noticable.
      More over you can use a lot of Python libraries in Julia via the PyCall and PyPlot packages.
      What also has to be said is that the syntax of Julia and Python are incredibly similar, so if you're already familiar with Python I bet you'll get the hang of Julia quickly and could just give it a try. A few things are different, like indexing starting with 1 and the syntax for array operations but other than that it feels like almost the same language.
      Really the only reason for me to even learn Python is that it's the standard and my colleagues wanted me to write in a language that they can read, for when I inevitably needed their help debugging my code :D

    • @halihammer
      @halihammer 10 місяців тому

      @@verymuchtom Thx for the quick answer! I will definitely look into Julia in the near future, as I especially need the fast calculation speed.

  • @lucianchauvin8587
    @lucianchauvin8587 11 місяців тому +2

    What are you using to create these visualizations?

    • @lucianchauvin8587
      @lucianchauvin8587 11 місяців тому

      Specifically the coloring

    • @lucianchauvin8587
      @lucianchauvin8587 11 місяців тому

      Like when it curves a lot do you just increase the brightness of the color?

    • @verymuchtom
      @verymuchtom  11 місяців тому

      There a different ways of coloring, what is used in most of these visualisations is false coloring using one color for high intensity regions e.g. yellow or orange and another color for low intensity regions e.g. blue, this can be done in DaVinci resolve (free to use software) for animations or GIMP (also free) for images. The output images of produced by the code in that case are grayscale.
      Alternatively you can take the distance between to subsequent points as the color value. To implement that you need to produce an RGB image to begin with. I work in Julia, using the Image.jl library. In that the mapping I use looks as follows:
      RGB.(sqrt.(canvas/findmax(canvas)[1]),0.,tanh.(canvas2/findmax(canvas2)[1])/3)
      canvas is the intensity matrix, and canvas2 is the avergage speeds at those points in the matrix. The matrices themselves are discrete representations of the xy-plane.

    • @lucianchauvin8587
      @lucianchauvin8587 11 місяців тому

      @@verymuchtom Ah okay thank you. Really amazing video man. I've done a bunch of stuff with strange attractors and made a whole visualizer on my website for them. With mine I graphed the solution curves of the SA that are described with autonomous differential equations rather than iterative map. This looks better though cause you dont just get a line haha.

  • @javierguallart8250
    @javierguallart8250 9 місяців тому

    Really nice video, congratulations! Would you mind sharing your implementation? I mean the code you show on 4:24.

    • @verymuchtom
      @verymuchtom  9 місяців тому +1

      Thanks dude! You can download the Julia code from this Google Drive folder: drive.google.com/drive/folders/12HifiiRnZ0p6QYpO8BblNdb1r4AlLK0W?usp=sharing
      There are two jl files one for randomly searching for good parameters and a second one for creating animations from an input set of parameters :)
      Just keep in mind the code isn't what one might call optimized :D

    • @javierguallart8250
      @javierguallart8250 9 місяців тому

      @@verymuchtom thank you very much! :D

  • @philipm3173
    @philipm3173 7 місяців тому

    Brilliant! Can you share the function for the one displayed at 4:47?

    • @verymuchtom
      @verymuchtom  6 місяців тому

      Hi, I’d love to, but sadly my bookkeeping is horrible and I did not save the values for the parameters anywhere :(

    • @philipm3173
      @philipm3173 6 місяців тому

      @@verymuchtom alas

  • @Hexer1985
    @Hexer1985 10 місяців тому

    Das allgemeine Prinzip dahinter ist soweit klar. Aber ich wüsste nicht mal, in welcher Programmiersprache man so etwas schreiben könnte oder müsste, damit das so aussieht.

    • @verymuchtom
      @verymuchtom  10 місяців тому

      Hi, also ich hab meinen Code in Julia geschrieben, einfach weil ich mit der Programmiersprache am meisten vertraut bin. Aber an sich sollte so ziemlich jede Sprache, die in der Lage ist ein Bild zu speichern einen äquivalentes Resultat liefern können. Letztendlich sind die eigentlichen mathematischen Operationen, die der Computer ausführen muss, nicht sonderlich komplex :)

  • @Blahblahdust
    @Blahblahdust 4 місяці тому

    Is there anywhere online I can download your code from? I'd love to play around with it myself :).

    • @verymuchtom
      @verymuchtom  4 місяці тому

      Yeah, the code and the images are available on my Google drive: drive.google.com/drive/folders/12HifiiRnZ0p6QYpO8BblNdb1r4AlLK0W?usp=sharing
      Have fun tinkering around :)

    • @Blahblahdust
      @Blahblahdust 4 місяці тому

      @@verymuchtom Hey thanks a lot this is really cool! I'm new to Julia and was having a hard time getting any animations done. So I'm curious to see how you did it. Thanks so much for uploading this video and sharing your code! :D

    • @verymuchtom
      @verymuchtom  Місяць тому

      Late answer, sorry bout that 😅 In case that’s still an open question: The way I did it in this code is certainly not the ideal way, in most cases you’d probably want to use an already existing graphics package like makie or plots. They come with their own quite capable animation suite which you can read up on in their documentation (i know they might be a bit overwhelming for beginners but don’t thread, it takes some practice). In my code I wrote up everything from scratch using a package that can convert matrices to images, mainly for the challenge, fun but maybe not ideal